DataLoggerSimulator.h
Go to the documentation of this file.
1 /*
2  * File: DataLoggerSimulator.h
3  * Author: denis
4  *
5  * This class simulates a Data Logger in NOvA DAQ
6  *
7  * Created on February 15, 2012, 10:27 AM
8  */
9 
10 #ifndef _DATALOGGERSIMULATOR_H
11 #define _DATALOGGERSIMULATOR_H
12 
13 #include "DAQDataFormats/RawEvent.h"
14 #include "DAQDataFormats/RawRunHeader.h"
15 
16 // forward declarations
17 namespace daqdataformats{
18  class RawDataBlock;
19  class RawTrigger;
20 }
21 
22 namespace mcdatadaq {
23 
25  public:
26  DataLoggerSimulator(); ///< Constructor
27  ~DataLoggerSimulator(); ///< Destructor
28 
29  /// Given all DataBlocks from the BufferNodes, produce Event Object
30  /// and also add it to the Run Object
31  bool produceEvent(const std::vector<daqdataformats::RawDataBlock*>&,
33 
34  /// Advance to the next event - clear Event and advance it's number
35  bool nextEvent();
36 
37  private:
38  /// Write Event Object into output file
39  bool writeEvent();
40  /// Write Run Object into output file
41  bool writeRun();
42 
43  private:
46 
47  FILE* fOutputEventFile; ///< File for events
48  FILE* fOutputRunFile; ///< File for the run
49  };// end of class DataLoggerSimulator
50 }// end of namespace mcdatadaq
51 #endif /* _DATALOGGERSIMULATOR_H */
52 
Class to hold the data from the global trigger in the correct format.
Definition: RawTrigger.h:40
FILE * fOutputEventFile
File for events.
Something conflicts with RandomNumberGenerator. Keep DAQSimulator.h include below Art Framework inclu...
daqdataformats::RawRunHeader fCurrentRunHeader
Run Object.
FILE * fOutputRunFile
File for the run.
Class to hold the data from the FEBs in correct formats.
daqdataformats::RawEvent fCurrentEvent
Event Object.