File indexing completed on 2024-04-06 12:19:14
0001 #ifndef DaqSource_DTROS25FileReader_h
0002 #define DaqSource_DTROS25FileReader_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include "FWCore/Framework/interface/one/EDProducer.h"
0013 #include "IORawData/DTCommissioning/plugins/RawFile.h"
0014 #include "FWCore/Framework/interface/Event.h"
0015 #include "FWCore/Framework/interface/EventSetup.h"
0016 #include "DataFormats/Provenance/interface/EventID.h"
0017 #include "DataFormats/FEDRawData/interface/FEDRawDataCollection.h"
0018
0019 #include <ostream>
0020 #include <fstream>
0021 #include <cstdint>
0022
0023 class DTROS25FileReader : public edm::one::EDProducer<> {
0024 public:
0025
0026 DTROS25FileReader(const edm::ParameterSet& pset);
0027
0028
0029 ~DTROS25FileReader() override;
0030
0031
0032 virtual int fillRawData(edm::Event& e,
0033
0034 FEDRawDataCollection*& data);
0035
0036 void produce(edm::Event&, edm::EventSetup const&) override;
0037
0038
0039 bool isHeader(uint32_t word);
0040
0041
0042 bool isTrailer(uint32_t word);
0043
0044
0045 void swap(uint32_t& word);
0046
0047 virtual bool checkEndOfFile();
0048
0049 private:
0050 RawFile inputFile;
0051
0052 edm::RunNumber_t runNumber;
0053 edm::EventNumber_t eventNumber;
0054
0055 static const int rosWordLenght = 4;
0056 };
0057 #endif