artdaq::detail::SharedMemoryReader< getDefaultTypes > Struct Template Reference

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

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

List of all members.

Public Member Functions

 SharedMemoryReader (SharedMemoryReader const &)
 Copy Constructor is deleted.
SharedMemoryReaderoperator= (SharedMemoryReader const &)
 Copy Assignment operator is deleted.
 SharedMemoryReader (fhicl::ParameterSet const &ps, art::ProductRegistryHelper &help, art::SourceHelper const &pm)
 SharedMemoryReader Constructor.
 SharedMemoryReader (fhicl::ParameterSet const &ps, art::ProductRegistryHelper &help, art::SourceHelper const &pm, art::MasterProductRegistry &)
 SharedMemoryReader Constructor.
virtual ~SharedMemoryReader ()
 SharedMemoryReader destructor.
void closeCurrentFile ()
 Emulate closing a file. No-Op.
void readFile (std::string const &, art::FileBlock *&fb)
 Emulate opening a file.
bool hasMoreData () const
 Whether more data is expected from the SharedMemoryReader.
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.

Public Attributes

art::SourceHelper const & pmaker
 An art::SourceHelper instance.
std::unique_ptr
< SharedMemoryEventReceiver > 
incoming_events
 The events from the EventStore.
double 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 received
std::map< Fragment::type_t,
std::string > 
fragment_type_map_
 The Fragment type names that this SharedMemoryReader knows about.
unsigned readNext_calls_
 The number of times readNext has been called.

Detailed Description

template<std::map< artdaq::Fragment::type_t, std::string > getDefaultTypes = artdaq::Fragment::MakeSystemTypeMap>
struct artdaq::detail::SharedMemoryReader< getDefaultTypes >

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

Definition at line 36 of file SharedMemoryReader.hh.


Constructor & Destructor Documentation

template<std::map< artdaq::Fragment::type_t, std::string > getDefaultTypes = artdaq::Fragment::MakeSystemTypeMap>
artdaq::detail::SharedMemoryReader< getDefaultTypes >::SharedMemoryReader ( fhicl::ParameterSet const &  ps,
art::ProductRegistryHelper &  help,
art::SourceHelper const &  pm 
) [inline]

SharedMemoryReader Constructor.

Parameters:
ps ParameterSet used for configuring SharedMemoryReader
help art::ProductRegistryHelper which is used to inform art about different Fragment types
pm art::SourceHelper used to initalize the SourceHelper member
			 * SharedMemoryReader 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
			 * "shared_memory_key" (Default: 0xBEE7): The key for the shared memory segment
			 * 

Definition at line 75 of file SharedMemoryReader.hh.

template<std::map< artdaq::Fragment::type_t, std::string > getDefaultTypes = artdaq::Fragment::MakeSystemTypeMap>
artdaq::detail::SharedMemoryReader< getDefaultTypes >::SharedMemoryReader ( fhicl::ParameterSet const &  ps,
art::ProductRegistryHelper &  help,
art::SourceHelper const &  pm,
art::MasterProductRegistry &   
) [inline]

SharedMemoryReader Constructor.

Parameters:
ps ParameterSet used for configuring SharedMemoryReader
help art::ProductRegistryHelper which is used to inform art about different Fragment types
pm art::SourceHelper used to initalize the SourceHelper member

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

Definition at line 125 of file SharedMemoryReader.hh.


Member Function Documentation

template<std::map< artdaq::Fragment::type_t, std::string > getDefaultTypes = artdaq::Fragment::MakeSystemTypeMap>
bool artdaq::detail::SharedMemoryReader< getDefaultTypes >::hasMoreData (  )  const [inline]

Whether more data is expected from the SharedMemoryReader.

Returns:
True unless a shutdown message has been received in readNext

Definition at line 155 of file SharedMemoryReader.hh.

template<std::map< artdaq::Fragment::type_t, std::string > getDefaultTypes = artdaq::Fragment::MakeSystemTypeMap>
SharedMemoryReader& artdaq::detail::SharedMemoryReader< getDefaultTypes >::operator= ( SharedMemoryReader< getDefaultTypes > const &   ) 

Copy Assignment operator is deleted.

Returns:
SharedMemoryReader copy
template<std::map< artdaq::Fragment::type_t, std::string > getDefaultTypes = artdaq::Fragment::MakeSystemTypeMap>
void artdaq::detail::SharedMemoryReader< getDefaultTypes >::readFile ( std::string const &  ,
art::FileBlock *&  fb 
) [inline]

Emulate opening a file.

Parameters:
[out] fb art::FileBlock object

Definition at line 145 of file SharedMemoryReader.hh.

template<std::map< artdaq::Fragment::type_t, std::string > getDefaultTypes = artdaq::Fragment::MakeSystemTypeMap>
bool artdaq::detail::SharedMemoryReader< getDefaultTypes >::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] inR Input art::RunPrincipal
[in] inSR Input art::SubRunPrincipal
[out] outR Output art::RunPrincipal
[out] outSR Output art::SubRunPrincipal
[out] outE Output art::EventPrincipal
Returns:
Whether an event was returned

Definition at line 167 of file SharedMemoryReader.hh.


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

Generated on 15 Apr 2018 for artdaq by  doxygen 1.6.1