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 
19 
20 #include <ostream>
21 #include <fstream>
22 #include <boost/cstdint.hpp>
23 
24 class DTSpyReader : public edm::EDProducer {
25  public:
28 
30  virtual ~DTSpyReader();
31 
33  virtual int fillRawData(edm::Event& e,
34 // edm::Timestamp& tstamp,
36 
37  virtual void produce(edm::Event&, edm::EventSetup const&);
38 
40  bool isHeader(uint64_t word, bool dataTag);
41 
43  bool isTrailer(uint64_t word, bool dataTag, 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 
unsigned long long EventNumber_t
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
bool isTrailer(uint64_t word, bool dataTag, int wordCount)
check for a 64 bits word to be a DDU trailer
Definition: DTSpyReader.cc:190
virtual ~DTSpyReader()
Destructor.
Definition: DTSpyReader.cc:55
virtual int fillRawData(edm::Event &e, FEDRawDataCollection *&data)
Generate and fill FED raw data for a full event.
Definition: DTSpyReader.cc:60
virtual void produce(edm::Event &, edm::EventSetup const &)
Definition: DTSpyReader.cc:137
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 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