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 <boost/cstdint.hpp>
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 
53  private:
54 
56 
59 
60  bool debug;
61  int dduID;
62 
63  static const int dduWordLength = 8;
64 
65 };
66 #endif
67 
68 
69 
void produce(edm::Event &, edm::EventSetup const &) override
Definition: DTSpyReader.cc:137
unsigned long long EventNumber_t
~DTSpyReader() override
Destructor.
Definition: DTSpyReader.cc:55
static const int dduWordLength
Definition: DTSpyReader.h:63
edm::EventNumber_t eventNumber
Definition: DTSpyReader.h:58
DTSpyReader(const edm::ParameterSet &pset)
Constructor.
Definition: DTSpyReader.cc:33
void swap(uint64_t &word)
swapping the lsBits with the msBits
Definition: DTSpyReader.cc:145
Definition: DTSpy.h:17
virtual int fillRawData(edm::Event &e, FEDRawDataCollection *&data)
Generate and fill FED raw data for a full event.
Definition: DTSpyReader.cc:60
unsigned long long uint64_t
Definition: Time.h:15
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
DTSpy * mySpy
Definition: DTSpyReader.h:55
edm::RunNumber_t runNumber
Definition: DTSpyReader.h:57
bool isTrailer(uint64_t word, bool dataTag, unsigned int wordCount)
check for a 64 bits word to be a DDU trailer
Definition: DTSpyReader.cc:190
bool isHeader(uint64_t word, bool dataTag)
check for a 64 bits word to be a DDU header
Definition: DTSpyReader.cc:176
unsigned int RunNumber_t
uint64_t dmaUnpack(const uint32_t *dmaData, bool &isData)
pre-unpack the data if read via DMA
Definition: DTSpyReader.cc:155