CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTDDUFileReader.h
Go to the documentation of this file.
1 #ifndef DaqSource_DTDDUFileReader_h
2 #define DaqSource_DTDDUFileReader_h
3 
15 
16 #include <ostream>
17 #include <fstream>
18 #include <boost/cstdint.hpp>
19 
21  public:
24 
26  virtual ~DTDDUFileReader();
27 
29  virtual int fillRawData(edm::EventID& eID,
30  edm::Timestamp& tstamp,
32 
33 
35  bool isHeader(uint64_t word, bool dataTag);
36 
38  bool isTrailer(uint64_t word, bool dataTag, int wordCount);
39 
41  // std::pair<uint64_t,bool> dmaUnpack();
42  uint64_t dmaUnpack(bool & isData, int & nread);
43 
44 
46  void swap(uint64_t & word);
47 
48 
49  virtual bool checkEndOfFile();
50 
51  private:
52 
54 
57 
58  int dduID;
59 
63 
64  static const int dduWordLength = 8;
65 
66 };
67 #endif
68 
69 
70 
unsigned int EventNumber_t
Definition: EventID.h:30
virtual bool checkEndOfFile()
DTDDUFileReader(const edm::ParameterSet &pset)
Constructor.
bool isHeader(uint64_t word, bool dataTag)
check for a 64 bits word to be a DDU header
void swap(uint64_t &word)
swapping the lsBits with the msBits
edm::RunNumber_t runNumber
edm::EventNumber_t eventNumber
unsigned long long uint64_t
Definition: Time.h:15
virtual int fillRawData(edm::EventID &eID, edm::Timestamp &tstamp, FEDRawDataCollection *&data)
Generate and fill FED raw data for a full event.
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
uint64_t dmaUnpack(bool &isData, int &nread)
pre-unpack the data if read via DMA
unsigned int RunNumber_t
Definition: EventRange.h:32
bool isTrailer(uint64_t word, bool dataTag, int wordCount)
check for a 64 bits word to be a DDU trailer
static const int dduWordLength
virtual ~DTDDUFileReader()
Destructor.