Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:19:14

0001 #ifndef DaqSource_DTNewROS8FileReader_h
0002 #define DaqSource_DTNewROS8FileReader_h
0003 
0004 /** \class DTNewROS8FileReader
0005  *  Read DT ROS8 raw data files
0006  *  From DTROS8FileReader
0007  *
0008  *  $Date: 2015/12/17$
0009  */
0010 
0011 #include "FWCore/Framework/interface/one/EDProducer.h"
0012 #include "IORawData/DTCommissioning/plugins/RawFile.h"
0013 #include "FWCore/Framework/interface/Event.h"
0014 #include "FWCore/Framework/interface/EventSetup.h"
0015 #include "DataFormats/Provenance/interface/EventID.h"
0016 #include "DataFormats/FEDRawData/interface/FEDRawDataCollection.h"
0017 #include <fstream>
0018 
0019 class DTNewROS8FileReader : public edm::one::EDProducer<> {
0020 public:
0021   /// Constructor
0022   DTNewROS8FileReader(const edm::ParameterSet& pset);
0023 
0024   /// Destructor
0025   ~DTNewROS8FileReader() override;
0026 
0027   /// Generate and fill FED raw data for a full event
0028   virtual int fillRawData(edm::Event& e,
0029                           //              edm::Timestamp& tstamp,
0030                           FEDRawDataCollection*& data);
0031 
0032   void produce(edm::Event&, edm::EventSetup const&) override;
0033 
0034   virtual bool checkEndOfFile();
0035 
0036 private:
0037   RawFile inputFile;
0038 
0039   edm::RunNumber_t runNumber;
0040   edm::EventNumber_t eventNum;
0041 
0042   static const int ros8WordLenght = 4;
0043 };
0044 #endif