CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTSpyReader.h
Go to the documentation of this file.
1 #ifndef DaqSource_DTSpyReader_h
2 #define DaqSource_DTSpyReader_h
3 
15 
18 
19 #include <ostream>
20 #include <fstream>
21 #include <boost/cstdint.hpp>
22 
23 class DTSpyReader : public DaqBaseReader {
24  public:
26  DTSpyReader(const edm::ParameterSet& pset);
27 
29  virtual ~DTSpyReader();
30 
32  virtual int fillRawData(edm::EventID& eID,
33  edm::Timestamp& tstamp,
35 
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(const uint32_t *dmaData ,bool & isData);
46 
48  void swap(uint64_t & word);
49 
50 
51  private:
52 
54 
57 
58  bool debug;
59  int dduID;
60 
61  static const int dduWordLength = 8;
62 
63 };
64 #endif
65 
66 
67 
unsigned int EventNumber_t
Definition: EventID.h:30
static const int dduWordLength
Definition: DTSpyReader.h:61
edm::EventNumber_t eventNumber
Definition: DTSpyReader.h:56
DTSpyReader(const edm::ParameterSet &pset)
Constructor.
Definition: DTSpyReader.cc:33
void swap(uint64_t &word)
swapping the lsBits with the msBits
Definition: DTSpyReader.cc:131
Definition: DTSpy.h:17
bool isTrailer(uint64_t word, bool dataTag, int wordCount)
check for a 64 bits word to be a DDU trailer
Definition: DTSpyReader.cc:176
virtual ~DTSpyReader()
Destructor.
Definition: DTSpyReader.cc:53
virtual int fillRawData(edm::EventID &eID, edm::Timestamp &tstamp, FEDRawDataCollection *&data)
Generate and fill FED raw data for a full event.
Definition: DTSpyReader.cc:58
unsigned long long uint64_t
Definition: Time.h:15
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
DTSpy * mySpy
Definition: DTSpyReader.h:53
edm::RunNumber_t runNumber
Definition: DTSpyReader.h:55
bool isHeader(uint64_t word, bool dataTag)
check for a 64 bits word to be a DDU header
Definition: DTSpyReader.cc:162
unsigned int RunNumber_t
Definition: EventRange.h:32
uint64_t dmaUnpack(const uint32_t *dmaData, bool &isData)
pre-unpack the data if read via DMA
Definition: DTSpyReader.cc:141