EUDAQ
 All Classes Namespaces Files Functions Variables Pages
MultiFileReader.hh
1 #ifndef MuliFileReader_h__
2 #define MuliFileReader_h__
3 
4 #include "Event.hh"
5 #include "DetectorEvent.hh"
6 
7 #include <string>
8 #include <memory>
9 #include "FileReader.hh"
10 #include "Platform.hh"
11 #include "EventSynchronisationBase.hh"
12 
13 namespace eudaq {
14 
15  class DLLEXPORT multiFileReader {
16  public:
17  multiFileReader(bool sync = true);
18 
19  unsigned RunNumber() const;
20 
21  bool NextEvent(size_t skip = 0);
22  std::string Filename() const { return m_filename; }
23  const DetectorEvent &GetDetectorEvent() const;
24  const eudaq::Event &GetEvent() const;
25 
26  void addFileReader(const std::string &filename,
27  const std::string &filepattern = "");
28  void Interrupt();
29 
30  private:
31  std::string m_filename;
32  std::shared_ptr<eudaq::DetectorEvent> m_ev;
33  std::vector<std::shared_ptr<eudaq::FileReader>> m_fileReaders;
34  SyncBase m_sync;
35  size_t m_eventsToSync;
36  bool m_preaparedForEvents;
37  };
38 }
39 
40 #endif // MuliFileReader_h__
Definition: EventSynchronisationBase.hh:17
Definition: MultiFileReader.hh:15
Definition: DetectorEvent.hh:12
Definition: Event.hh:38