CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/IORawData/DTCommissioning/src/DTSpyReader.h

Go to the documentation of this file.
00001 #ifndef DaqSource_DTSpyReader_h
00002 #define DaqSource_DTSpyReader_h
00003 
00012 #include <IORawData/DaqSource/interface/DaqBaseReader.h>
00013 #include <IORawData/DTCommissioning/src/RawFile.h>
00014 #include "IORawData/DTCommissioning/src/DTSpy.h"
00015 
00016 #include <DataFormats/FEDRawData/interface/FEDRawData.h>
00017 #include "DataFormats/Provenance/interface/EventID.h"
00018 
00019 #include <ostream>
00020 #include <fstream>
00021 #include <boost/cstdint.hpp>
00022 
00023 class DTSpyReader : public DaqBaseReader {
00024  public:
00026   DTSpyReader(const edm::ParameterSet& pset);
00027 
00029   virtual ~DTSpyReader();
00030 
00032   virtual int fillRawData(edm::EventID& eID,
00033                           edm::Timestamp& tstamp, 
00034                           FEDRawDataCollection*& data);
00035 
00036 
00038   bool isHeader(uint64_t word, bool dataTag);
00039 
00041   bool isTrailer(uint64_t word, bool dataTag, int wordCount);
00042 
00044   //  std::pair<uint64_t,bool> dmaUnpack();
00045   uint64_t dmaUnpack(const uint32_t *dmaData ,bool & isData);
00046 
00048   void swap(uint64_t & word);
00049  
00050 
00051  private:
00052 
00053   DTSpy * mySpy;
00054 
00055   edm::RunNumber_t runNumber;
00056   edm::EventNumber_t eventNumber;
00057 
00058   bool debug;
00059   int dduID; 
00060 
00061   static const int dduWordLength = 8;
00062 
00063 };
00064 #endif
00065 
00066 
00067