artdaq_core  v3_06_00
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 {
25 {
26 public:
30  FragmentGenerator() = default;
31 
35  virtual ~FragmentGenerator() = default;
36 
47  virtual bool getNext(FragmentPtrs& output) = 0;
48 
56  virtual std::vector<Fragment::fragment_id_t> fragmentIDs() = 0;
57 
58 private:
59  FragmentGenerator(FragmentGenerator const&) = delete;
61  FragmentGenerator& operator=(FragmentGenerator const&) = delete;
62  FragmentGenerator& operator=(FragmentGenerator&&) = delete;
63 };
64 } // namespace artdaq
65 
66 #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:59
Base class for all FragmentGenerators.
FragmentGenerator()=default
Default Constructor.