artdaq  v2_03_00
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Public Attributes | List of all members
artdaq::detail::RawEventQueueReader Struct Reference

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

#include <artdaq/ArtModules/detail/RawEventQueueReader.hh>

Public Member Functions

 RawEventQueueReader (RawEventQueueReader const &)=delete
 Copy Constructor is deleted.
 
RawEventQueueReaderoperator= (RawEventQueueReader const &)=delete
 Copy Assignment operator is deleted. More...
 
 RawEventQueueReader (fhicl::ParameterSet const &ps, art::ProductRegistryHelper &help, art::SourceHelper const &pm)
 RawEventQueueReader Constructor. More...
 
 RawEventQueueReader (fhicl::ParameterSet const &ps, art::ProductRegistryHelper &help, art::SourceHelper const &pm, art::MasterProductRegistry &)
 RawEventQueueReader Constructor. More...
 
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 RawEventQueueReader. 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.
 
RawEventQueue & incoming_events
 The events from the EventStore.
 
artdaq::detail::seconds waiting_time
 The amount of time to wait for an event from the queue.
 
bool resume_after_timeout
 Whether to resume if the dequeue action times out.
 
std::string pretend_module_name
 The module name to store data under.
 
std::string unidentified_instance_name
 The name to use for unknown Fragment types.
 
bool shutdownMsgReceived
 Whether a shutdown message has been received.
 
bool outputFileCloseNeeded
 If an explicit output file close message is needed.
 
size_t bytesRead
 running total of number of bytes dequeued
 
std::map< Fragment::type_t,
std::string > 
fragment_type_map_
 The Fragment type names that this RawEventQueueReader knows about.
 
unsigned readNext_calls_
 The number of times readNext has been called.
 

Detailed Description

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

Definition at line 26 of file RawEventQueueReader.hh.

Constructor & Destructor Documentation

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

RawEventQueueReader Constructor.

Parameters
psParameterSet used for configuring RawEventQueueReader
helpart::ProductRegistryHelper which is used to inform art about different Fragment types
pmart::SourceHelper used to initalize the SourceHelper member
* RawEventQueueReader accepts the following Parameters:
* "waiting_time" (Default: 86400.0): The maximum amount of time to wait for an event from the queue
* "resume_after_timeout" (Default: true): Whether to continue receiving data after a timeout
* "raw_data_label" (Default: "daq"): The label to use for all raw data
* 

Definition at line 15 of file RawEventQueueReader.cc.

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

RawEventQueueReader Constructor.

Parameters
psParameterSet used for configuring RawEventQueueReader
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 74 of file RawEventQueueReader.hh.

Member Function Documentation

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

Whether more data is expected from the RawEventQueueReader.

Returns
True unless a shutdown message has been received in readNext

Definition at line 94 of file RawEventQueueReader.hh.

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

Copy Assignment operator is deleted.

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

Emulate opening a file.

Parameters
[out]fbart::FileBlock object

Definition at line 40 of file RawEventQueueReader.cc.

bool artdaq::detail::RawEventQueueReader::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.

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 46 of file RawEventQueueReader.cc.


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