CMS 3D CMS Logo

DTDDUFileReader.h
Go to the documentation of this file.
1 #ifndef DaqSource_DTDDUFileReader_h
2 #define DaqSource_DTDDUFileReader_h
3 
17 
18 #include <ostream>
19 #include <fstream>
20 #include <boost/cstdint.hpp>
21 
23  public:
26 
28  ~DTDDUFileReader() override;
29 
31  virtual int fillRawData(edm::Event& e,
32 // edm::Timestamp& tstamp,
34 
35  void produce(edm::Event&, edm::EventSetup const&) override;
36 
38  bool isHeader(uint64_t word, bool dataTag);
39 
41  bool isTrailer(uint64_t word, bool dataTag, unsigned int wordCount);
42 
44  // std::pair<uint64_t,bool> dmaUnpack();
45  uint64_t dmaUnpack(bool & isData, int & nread);
46 
47 
49  void swap(uint64_t & word);
50 
51 
52  virtual bool checkEndOfFile();
53 
54  private:
55 
57 
60 
61  int dduID;
62 
66 
67  static const int dduWordLength = 8;
68 
69 };
70 #endif
71 
72 
73 
virtual int fillRawData(edm::Event &e, FEDRawDataCollection *&data)
Generate and fill FED raw data for a full event.
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
unsigned long long EventNumber_t
void produce(edm::Event &, edm::EventSetup const &) override
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
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
bool isTrailer(uint64_t word, bool dataTag, unsigned int wordCount)
check for a 64 bits word to be a DDU trailer
uint64_t dmaUnpack(bool &isData, int &nread)
pre-unpack the data if read via DMA
unsigned int RunNumber_t
static const int dduWordLength
~DTDDUFileReader() override
Destructor.