artdaq_core  v3_01_04
FragmentGenerator.hh
1 #ifndef artdaq_core_Generators_FragmentGenerator_hh
2 #define artdaq_core_Generators_FragmentGenerator_hh
3 
5 // FragmentGenerator is an abstract class that defines the interface for
6 // obtaining events in artdaq. Subclasses are to override the (private) virtual
7 // functions; users of FragmentGenerator are to invoke the public
8 // (non-virtual) functions.
9 //
10 // getNext() will be called only from a single thread
12 
13 #include "artdaq-core/Data/Fragment.hh"
14 
15 namespace artdaq
16 {
26  {
27  public:
28 
32  FragmentGenerator() = default;
33 
37  virtual ~FragmentGenerator() = default;
38 
49  virtual bool getNext(FragmentPtrs& output) = 0;
50 
51 
59  virtual std::vector<Fragment::fragment_id_t> fragmentIDs() = 0;
60  };
61 }
62 
63 #endif /* artdaq_core_Generators_FragmentGenerator_hh */
virtual ~FragmentGenerator()=default
Default Destructor.
virtual std::vector< Fragment::fragment_id_t > fragmentIDs()=0
Which fragment IDs does this FragmentGenerator generate?
virtual bool getNext(FragmentPtrs &output)=0
Obtain the next collection of Fragments.
std::list< FragmentPtr > FragmentPtrs
A std::list of FragmentPtrs.
Definition: Fragment.hh:58
Base class for all FragmentGenerators.
FragmentGenerator()=default
Default Constructor.