Public Member Functions | List of all members
arttest::ToyReader Class Referencefinal
Inheritance diagram for arttest::ToyReader:
arttest::ToySource

Public Member Functions

 ToyReader (fhicl::ParameterSet const &ps, art::ProductRegistryHelper &help, art::SourceHelper const &sHelper)
 
void readFile (std::string const &name, art::FileBlock *&fb) override
 
- Public Member Functions inherited from arttest::ToySource
 ToySource (fhicl::ParameterSet const &ps, art::ProductRegistryHelper &help, art::SourceHelper const &sHelper)
 
virtual ~ToySource ()=default
 
void closeCurrentFile ()
 
bool readNext (art::RunPrincipal const *const inR, art::SubRunPrincipal const *const inSR, art::RunPrincipal *&outR, art::SubRunPrincipal *&outSR, art::EventPrincipal *&outE)
 

Additional Inherited Members

- Protected Types inherited from arttest::ToySource
using vv_t = std::vector< std::tuple< int, int, int >>
 
using iter = vv_t::const_iterator
 
- Static Protected Member Functions inherited from arttest::ToySource
static void throw_exception_from (const char *funcname)
 
- Protected Attributes inherited from arttest::ToySource
iter current_ {}
 
iter end_ {}
 
fhicl::ParameterSet data_
 
vv_t fileData_ {}
 
art::SourceHelper const & sHelper_
 
std::string currentFilename_ {}
 
bool const throw_on_construction_
 
bool const throw_on_closeCurrentFile_
 
bool const throw_on_readNext_
 
bool const throw_on_readFile_
 
art::TypeLabel vtl_
 

Detailed Description

Definition at line 34 of file ToyRawInput_source.cc.

Constructor & Destructor Documentation

arttest::ToyReader::ToyReader ( fhicl::ParameterSet const &  ps,
art::ProductRegistryHelper help,
art::SourceHelper const &  sHelper 
)

Definition at line 43 of file ToyRawInput_source.cc.

46  : ToySource(ps, help, sHelper)
47 {}
static const double ps
Definition: Units.h:103
ToySource(fhicl::ParameterSet const &ps, art::ProductRegistryHelper &help, art::SourceHelper const &sHelper)
Definition: ToySource.cc:12

Member Function Documentation

void arttest::ToyReader::readFile ( std::string const &  name,
art::FileBlock *&  fb 
)
overridevirtual

Implements arttest::ToySource.

Definition at line 50 of file ToyRawInput_source.cc.

51 {
53  throw_exception_from("readFile");
56  << "ToyReader expects to find a parameter representing a file's\n"
57  << "contents whose name is " << name << "\n";
58  }
60  current_ = fileData_.begin();
61  end_ = fileData_.end();
62  fb = new art::FileBlock(art::FileFormatVersion(1, "ToyReader 2011a"),
64 }
std::string currentFilename_
Definition: ToySource.h:53
static void throw_exception_from(const char *funcname)
Definition: ToySource.cc:121
bool get_if_present(std::string const &key, T &value) const
Definition: ParameterSet.h:208
bool const throw_on_readFile_
Definition: ToySource.h:57
fhicl::ParameterSet data_
Definition: ToySource.h:49
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66

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