CMS 3D CMS Logo

DTDDUFileReader.h

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

Generated on Tue Jun 9 17:39:23 2009 for CMSSW by  doxygen 1.5.4