Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
arttest::TestOutput Class Reference
Inheritance diagram for arttest::TestOutput:
art::OutputModule art::Observer art::detail::SharedModule art::ModuleBase

Classes

struct  Config
 

Public Types

using Parameters = fhicl::WrappedTable< Config, art::OutputModule::Config::KeysToIgnore >
 
- Public Types inherited from art::OutputModule
using ModuleType = OutputModule
 
using WorkerType = OutputWorker
 
using PluginCollection_t = std::vector< std::unique_ptr< FileCatalogMetadataPlugin >>
 

Public Member Functions

 TestOutput (Parameters const &)
 
- Public Member Functions inherited from art::OutputModule
virtual ~OutputModule () noexcept
 
 OutputModule (fhicl::ParameterSet const &pset)
 
 OutputModule (fhicl::TableFragment< Config > const &pset, fhicl::ParameterSet const &containing_pset)
 
 OutputModule (OutputModule const &)=delete
 
 OutputModule (OutputModule &&)=delete
 
OutputModuleoperator= (OutputModule const &)=delete
 
OutputModuleoperator= (OutputModule &&)=delete
 
int maxEvents () const
 
int remainingEvents () const
 
bool fileIsOpen () const
 
OutputFileStatus fileStatus () const
 
virtual std::string const & lastClosedFileName () const
 
SelectionsArray const & keptProducts () const
 
bool selected (BranchDescription const &) const
 
std::array< bool, NumBranchTypes > const & hasNewlyDroppedBranch () const
 
void selectProducts (ProductTables const &)
 
void doSelectProducts (ProductTables const &)
 
void registerProducts (ProductDescriptions &, ModuleDescription const &)
 
BranchChildren const & branchChildren () const
 
- Public Member Functions inherited from art::Observer
 ~Observer () noexcept
 
 Observer (Observer const &)=delete
 
 Observer (Observer &&)=delete
 
Observeroperator= (Observer const &)=delete
 
Observeroperator= (Observer &&)=delete
 
void registerProducts (ProductDescriptions &, ModuleDescription const &)
 
void fillDescriptions (ModuleDescription const &)
 
std::string const & processName () const
 
bool wantAllEvents () const
 
bool wantEvent (Event const &e)
 
fhicl::ParameterSetID selectorConfig () const
 
Handle< TriggerResultsgetTriggerResults (Event const &e) const
 
- Public Member Functions inherited from art::ModuleBase
virtual ~ModuleBase () noexcept
 
 ModuleBase ()
 
ModuleDescription const & moduleDescription () const
 
void setModuleDescription (ModuleDescription const &)
 
template<typename T , BranchType = InEvent>
ProductToken< T > consumes (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > mayConsume (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 
std::array< std::vector< ProductInfo >, NumBranchTypes > const & getConsumables () const
 
void sortConsumables (std::string const &current_process_name)
 
template<typename T , BranchType BT>
ViewToken< T > consumesView (InputTag const &tag)
 
template<typename T , BranchType BT>
ViewToken< T > mayConsumeView (InputTag const &tag)
 
- Public Member Functions inherited from art::detail::SharedModule
 SharedModule ()
 
 SharedModule (std::string const &moduleLabel)
 
 ~SharedModule () noexcept
 
hep::concurrency::SerialTaskQueueChain * serialTaskQueueChain () const
 
void createQueues ()
 
template<BranchType BT = InEvent, typename... T>
void serialize (T const &...)
 
template<BranchType BT = InEvent>
void async ()
 
template<BranchType , typename... T>
void serialize (T const &...resources)
 

Private Member Functions

void write (art::EventPrincipal &e) override
 
void writeSubRun (art::SubRunPrincipal &) override
 
void writeRun (art::RunPrincipal &) override
 
void endJob () override
 

Private Attributes

unsigned num_pass_
 
unsigned total_
 

Additional Inherited Members

- Protected Member Functions inherited from art::OutputModule
virtual void doRegisterProducts (ProductDescriptions &, ModuleDescription const &)
 
- Protected Member Functions inherited from art::Observer
 Observer (fhicl::ParameterSet const &config)
 
 Observer (std::vector< std::string > const &paths, fhicl::ParameterSet const &config)
 
detail::ProcessAndEventSelectorsprocessAndEventSelectors ()
 

Detailed Description

Definition at line 14 of file TestOutput_module.cc.

Member Typedef Documentation

Definition at line 22 of file TestOutput_module.cc.

Constructor & Destructor Documentation

arttest::TestOutput::TestOutput ( Parameters const &  ps)
explicit

Definition at line 39 of file TestOutput_module.cc.

40  : art::OutputModule(ps().omConfig, ps.get_PSet())
41  , num_pass_{ps().shouldPass()}
42  , total_{0u}
43 {}
static const double ps
Definition: Units.h:103

Member Function Documentation

void arttest::TestOutput::endJob ( )
overrideprivatevirtual

Reimplemented from art::OutputModule.

Definition at line 52 of file TestOutput_module.cc.

53 {
54  mf::LogAbsolute("TestOutputReport") << "TestOutput: should pass " << num_pass_
55  << ", did pass " << total_ << "\n";
56 
57  if (total_ != num_pass_) {
58  throw cet::exception("TestOutputFailure")
59  << "Number passed should be " << num_pass_ << ", but got " << total_
60  << "\n";
61  }
62 }
MaybeLogger_< ELseverityLevel::ELsev_severe, true > LogAbsolute
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
void arttest::TestOutput::write ( art::EventPrincipal e)
overrideprivatevirtual

Implements art::OutputModule.

Definition at line 46 of file TestOutput_module.cc.

47 {
48  ++total_;
49 }
void arttest::TestOutput::writeRun ( art::RunPrincipal )
inlineoverrideprivatevirtual

Implements art::OutputModule.

Definition at line 31 of file TestOutput_module.cc.

32  {}
void arttest::TestOutput::writeSubRun ( art::SubRunPrincipal )
inlineoverrideprivatevirtual

Implements art::OutputModule.

Definition at line 28 of file TestOutput_module.cc.

29  {}

Member Data Documentation

unsigned arttest::TestOutput::num_pass_
private

Definition at line 35 of file TestOutput_module.cc.

unsigned arttest::TestOutput::total_
private

Definition at line 36 of file TestOutput_module.cc.


The documentation for this class was generated from the following file: