artdaq  v3_09_01
art::ArtdaqInputHelper< U > Class Template Reference

This template class provides a unified interface for reading data into art. More...

#include <artdaq/ArtModules/ArtdaqInputHelper.hh>

Public Member Functions

 ArtdaqInputHelper (const ArtdaqInputHelper &)=delete
 Copy Constructor is deleted.
 
ArtdaqInputHelperoperator= (const ArtdaqInputHelper &)=delete
 Copy Assignment operator is deleted. More...
 
 ~ArtdaqInputHelper ()
 ArtdaqInputHelper Destructor.
 
 ArtdaqInputHelper (const fhicl::ParameterSet &ps, art::ProductRegistryHelper &helper, art::SourceHelper const &pm)
 ArtdaqInputHelper Constructor. More...
 
void closeCurrentFile ()
 Called by art to close the input source. No-Op.
 
void readFile (const std::string &, art::FileBlock *&fb)
 Emulate reading a file. More...
 
bool hasMoreData () const
 Whether additional events are expected from the source. More...
 
bool readNext (art::RunPrincipal *const inR, art::SubRunPrincipal *const inSR, art::RunPrincipal *&outR, art::SubRunPrincipal *&outSR, art::EventPrincipal *&outE)
 Read the next event from the communication wrapper. More...
 

Detailed Description

template<typename U>
class art::ArtdaqInputHelper< U >

This template class provides a unified interface for reading data into art.

Template Parameters
UThe class responsible for delivering data

JCF, May-27-2016 ArtdaqInputHelper is a template class which takes, as a parameter, a class which it uses to receive data; the instance of this class is called "communicationWrapper_". As of this writing, this wrapper class is implemented by NetMonWrapper (for reading data into the aggregator from the eventbuilder) and TransferWrapper (for reading data into an art process). This class presents a unified approach to handling art provenance, regardless of the communication protocol used to read data in.

Definition at line 91 of file ArtdaqInputHelper.hh.

Constructor & Destructor Documentation

template<typename U >
art::ArtdaqInputHelper< U >::ArtdaqInputHelper ( const fhicl::ParameterSet &  ps,
art::ProductRegistryHelper &  helper,
art::SourceHelper const &  pm 
)

ArtdaqInputHelper Constructor.

Parameters
psParameterSet used to confiugre communication wrapper class
helperAn art::ProductRegistryHelper for registering products
pmAn art::SourceHelper for handling provenance

Definition at line 204 of file ArtdaqInputHelper.hh.

Member Function Documentation

template<typename U >
bool art::ArtdaqInputHelper< U >::hasMoreData ( ) const

Whether additional events are expected from the source.

Returns
True if ArtdaqInputHelper has not been shut down

Definition at line 463 of file ArtdaqInputHelper.hh.

template<typename U >
ArtdaqInputHelper& art::ArtdaqInputHelper< U >::operator= ( const ArtdaqInputHelper< U > &  )
delete

Copy Assignment operator is deleted.

Returns
ArtdaqInputHelper copy
template<typename U >
void art::ArtdaqInputHelper< U >::readFile ( const std::string &  ,
art::FileBlock *&  fb 
)

Emulate reading a file.

Parameters
fbOutput art::FileBlock object

Definition at line 453 of file ArtdaqInputHelper.hh.

template<typename U >
bool art::ArtdaqInputHelper< U >::readNext ( art::RunPrincipal *const  inR,
art::SubRunPrincipal *const  inSR,
art::RunPrincipal *&  outR,
art::SubRunPrincipal *&  outSR,
art::EventPrincipal *&  outE 
)

Read the next event from the communication wrapper.

Parameters
inRRunPrincipal input pointer
inSRSubRunPrincipal input pointer
outRRunPrincipal output pointer
outSRSubRunPrincipal output pointer
outEEventPrincipal output pointer
Returns
Whether an event was successfully read from the communication wrapper

Definition at line 944 of file ArtdaqInputHelper.hh.


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