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 <cstdint>
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 
48  void swap(uint64_t& word);
49 
50  virtual bool checkEndOfFile();
51 
52 private:
54 
57 
58  int dduID;
59 
63 
64  static const int dduWordLength = 8;
65 };
66 #endif
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
uint64_t word
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:13
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
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.