artdaq_core  v1_07_01
 All Classes Namespaces Functions
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/Fragments.hh"
14 
15 namespace artdaq {
17  public:
18 
19  FragmentGenerator() = default;
20 
21  virtual ~FragmentGenerator() = default;
22 
23  // Obtain the next collection of Fragments. Return false to indicate
24  // end-of-data. Fragments may or may not be in the same event;
25  // Fragments may or may not have the same FragmentID. Fragments
26  // will all be part of the same Run and SubRun.
27  virtual bool getNext(FragmentPtrs & output) = 0;
28 
29 
30  // John F., 12/11/13 -- uncertain what the meaning of the comment below is
31 
32  // This generator produces fragments with what distinct IDs (*not*
33  // types)?
34  virtual std::vector<Fragment::fragment_id_t> fragmentIDs() = 0;
35 
36  };
37 
38 }
39 
40 #endif /* artdaq_core_Generators_FragmentGenerator_hh */