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 
17 
18 #include <ostream>
19 #include <fstream>
20 #include <boost/cstdint.hpp>
21 
23  public:
26 
28  virtual ~DTDDUFileReader();
29 
31  virtual int fillRawData(edm::Event& e,
32 // edm::Timestamp& tstamp,
34 
35  virtual void produce(edm::Event&, edm::EventSetup const&);
36 
38  bool isHeader(uint64_t word, bool dataTag);
39 
41  bool isTrailer(uint64_t word, bool dataTag, 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
virtual void produce(edm::Event &, edm::EventSetup const &)
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
uint64_t dmaUnpack(bool &isData, int &nread)
pre-unpack the data if read via DMA
unsigned int RunNumber_t
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.