artdaq_demo_hdf5  v1_01_03
artdaq::detail::HDFFileReader Struct Reference

The HDFFileReader is a class which implements the methods needed by art::Source. More...

#include <artdaq-demo-hdf5/ArtModules/detail/HDFFileReader.hh>

Public Member Functions

 HDFFileReader (HDFFileReader const &)=delete
 Copy Constructor is deleted.
 
HDFFileReaderoperator= (HDFFileReader const &)=delete
 Copy Assignment operator is deleted. More...
 
 HDFFileReader (HDFFileReader &&)=delete
 Move Constructor is deleted.
 
HDFFileReaderoperator= (HDFFileReader &&)=delete
 Move Assignment operator is deleted. More...
 
 HDFFileReader (fhicl::ParameterSet const &ps, art::ProductRegistryHelper &help, art::SourceHelper const &pm)
 HDFFileReader Constructor. More...
 
 HDFFileReader (fhicl::ParameterSet const &ps, art::ProductRegistryHelper &help, art::SourceHelper const &pm, art::MasterProductRegistry &)
 HDFFileReader Constructor. More...
 
virtual ~HDFFileReader ()
 HDFFileReader destructor.
 
void closeCurrentFile ()
 Emulate closing a file. No-Op.
 
void readFile (std::string const &, art::FileBlock *&fb)
 Emulate opening a file. More...
 
bool hasMoreData () const
 Whether more data is expected from the HDFFileReader. More...
 
bool readNext (art::RunPrincipal *const &inR, art::SubRunPrincipal *const &inSR, art::RunPrincipal *&outR, art::SubRunPrincipal *&outSR, art::EventPrincipal *&outE)
 Dequeue a RawEvent and declare its Fragment contents to art, creating Run, SubRun, and EventPrincipal objects as necessary. More...
 

Public Attributes

art::SourceHelper const & pmaker
 An art::SourceHelper instance.
 
std::string pretend_module_name
 The module name to store data under.
 
bool shutdownMsgReceived
 Whether a shutdown message has been received.
 
size_t bytesRead
 running total of number of bytes received
 
std::chrono::steady_clock::time_point last_read_time
 Time last read was completed.
 
unsigned readNext_calls_
 The number of times readNext has been called.
 
std::unique_ptr
< artdaq::hdf5::FragmentDataset
inputFile_
 The Dataset plugin which this input source will be reading from.
 

Detailed Description

The HDFFileReader is a class which implements the methods needed by art::Source.

Definition at line 37 of file HDFFileReader.hh.

Constructor & Destructor Documentation

artdaq::detail::HDFFileReader::HDFFileReader ( fhicl::ParameterSet const &  ps,
art::ProductRegistryHelper &  help,
art::SourceHelper const &  pm 
)
inline

HDFFileReader Constructor.

Parameters
psParameterSet used for configuring HDFFileReader
helpart::ProductRegistryHelper which is used to inform art about different Fragment types
pmart::SourceHelper used to initalize the SourceHelper member
* HDFFileReader accepts the following Parameters:
* "raw_data_label" (Default: "daq"): The label to use for all raw data
* "shared_memory_key" (Default: 0xBEE7): The key for the shared memory segment
* 

Definition at line 80 of file HDFFileReader.hh.

artdaq::detail::HDFFileReader::HDFFileReader ( fhicl::ParameterSet const &  ps,
art::ProductRegistryHelper &  help,
art::SourceHelper const &  pm,
art::MasterProductRegistry &   
)
inline

HDFFileReader Constructor.

Parameters
psParameterSet used for configuring HDFFileReader
helpart::ProductRegistryHelper which is used to inform art about different Fragment types
pmart::SourceHelper used to initalize the SourceHelper member

This constructor calls the three-parameter constructor, the art::MasterProductRegistry parameter is discarded.

Definition at line 137 of file HDFFileReader.hh.

Member Function Documentation

bool artdaq::detail::HDFFileReader::hasMoreData ( ) const
inline

Whether more data is expected from the HDFFileReader.

Returns
True unless a shutdown message has been received in readNext

Definition at line 166 of file HDFFileReader.hh.

HDFFileReader& artdaq::detail::HDFFileReader::operator= ( HDFFileReader const &  )
delete

Copy Assignment operator is deleted.

Returns
HDFFileReader copy
HDFFileReader& artdaq::detail::HDFFileReader::operator= ( HDFFileReader &&  )
delete

Move Assignment operator is deleted.

Returns
HDFFileReader copy
void artdaq::detail::HDFFileReader::readFile ( std::string const &  ,
art::FileBlock *&  fb 
)
inline

Emulate opening a file.

Parameters
[out]fbart::FileBlock object

Definition at line 156 of file HDFFileReader.hh.

bool artdaq::detail::HDFFileReader::readNext ( art::RunPrincipal *const &  inR,
art::SubRunPrincipal *const &  inSR,
art::RunPrincipal *&  outR,
art::SubRunPrincipal *&  outSR,
art::EventPrincipal *&  outE 
)
inline

Dequeue a RawEvent and declare its Fragment contents to art, creating Run, SubRun, and EventPrincipal objects as necessary.

Parameters
[in]inRInput art::RunPrincipal
[in]inSRInput art::SubRunPrincipal
[out]outROutput art::RunPrincipal
[out]outSROutput art::SubRunPrincipal
[out]outEOutput art::EventPrincipal
Returns
Whether an event was returned

Definition at line 182 of file HDFFileReader.hh.


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