CMS 3D CMS Logo

DTSpyReader.h
Go to the documentation of this file.
1 #ifndef DaqSource_DTSpyReader_h
2 #define DaqSource_DTSpyReader_h
3 
19 
20 #include <ostream>
21 #include <fstream>
22 #include <cstdint>
23 
24 class DTSpyReader : public edm::EDProducer {
25 public:
28 
30  ~DTSpyReader() override;
31 
33  virtual int fillRawData(edm::Event& e,
34  // edm::Timestamp& tstamp,
36 
37  void produce(edm::Event&, edm::EventSetup const&) override;
38 
40  bool isHeader(uint64_t word, bool dataTag);
41 
43  bool isTrailer(uint64_t word, bool dataTag, unsigned int wordCount);
44 
46  // std::pair<uint64_t,bool> dmaUnpack();
47  uint64_t dmaUnpack(const uint32_t* dmaData, bool& isData);
48 
50  void swap(uint64_t& word);
51 
52 private:
54 
57 
58  bool debug;
59  int dduID;
60 
61  static const int dduWordLength = 8;
62 };
63 #endif
void produce(edm::Event &, edm::EventSetup const &) override
Definition: DTSpyReader.cc:131
unsigned long long EventNumber_t
~DTSpyReader() override
Destructor.
Definition: DTSpyReader.cc:50
static const int dduWordLength
Definition: DTSpyReader.h:61
edm::EventNumber_t eventNumber
Definition: DTSpyReader.h:56
uint64_t word
DTSpyReader(const edm::ParameterSet &pset)
Constructor.
Definition: DTSpyReader.cc:31
void swap(uint64_t &word)
swapping the lsBits with the msBits
Definition: DTSpyReader.cc:139
Definition: DTSpy.h:15
virtual int fillRawData(edm::Event &e, FEDRawDataCollection *&data)
Generate and fill FED raw data for a full event.
Definition: DTSpyReader.cc:52
unsigned long long uint64_t
Definition: Time.h:13
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
DTSpy * mySpy
Definition: DTSpyReader.h:53
edm::RunNumber_t runNumber
Definition: DTSpyReader.h:55
bool isTrailer(uint64_t word, bool dataTag, unsigned int wordCount)
check for a 64 bits word to be a DDU trailer
Definition: DTSpyReader.cc:179
bool isHeader(uint64_t word, bool dataTag)
check for a 64 bits word to be a DDU header
Definition: DTSpyReader.cc:167
unsigned int RunNumber_t
uint64_t dmaUnpack(const uint32_t *dmaData, bool &isData)
pre-unpack the data if read via DMA
Definition: DTSpyReader.cc:147