CMS 3D CMS Logo

DTDDUFileReader.h
Go to the documentation of this file.
1 #ifndef DaqSource_DTDDUFileReader_h
2 #define DaqSource_DTDDUFileReader_h
3 
17 
18 #include <ostream>
19 #include <fstream>
20 #include <cstdint>
21 
23 public:
26 
28  ~DTDDUFileReader() override;
29 
31  virtual int fillRawData(edm::Event& e,
32  // edm::Timestamp& tstamp,
34 
35  void produce(edm::Event&, edm::EventSetup const&) override;
36 
38  bool isHeader(uint64_t word, bool dataTag);
39 
41  bool isTrailer(uint64_t word, bool dataTag, unsigned int wordCount);
42 
44  // std::pair<uint64_t,bool> dmaUnpack();
45  uint64_t dmaUnpack(bool& isData, int& nread);
46 
48  void swap(uint64_t& word);
49 
50  virtual bool checkEndOfFile();
51 
52 private:
54 
57 
58  int dduID;
59 
63 
64  static const int dduWordLength = 8;
65 };
66 #endif
edm::RunNumber_t
unsigned int RunNumber_t
Definition: RunLumiEventNumber.h:14
EDProducer.h
FEDRawDataCollection
Definition: FEDRawDataCollection.h:18
DTDDUFileReader::dduID
int dduID
Definition: DTDDUFileReader.h:58
DTDDUFileReader::dduWordLength
static const int dduWordLength
Definition: DTDDUFileReader.h:64
DTDDUFileReader::DTDDUFileReader
DTDDUFileReader(const edm::ParameterSet &pset)
Constructor.
Definition: DTDDUFileReader.cc:31
DTDDUFileReader::runNumber
edm::RunNumber_t runNumber
Definition: DTDDUFileReader.h:55
DTDDUFileReader::inputFile
RawFile inputFile
Definition: DTDDUFileReader.h:53
DTDDUFileReader::dmaUnpack
uint64_t dmaUnpack(bool &isData, int &nread)
pre-unpack the data if read via DMA
Definition: DTDDUFileReader.cc:176
RawFile.h
word
uint64_t word
Definition: CTPPSTotemDataFormatter.cc:29
DTDDUFileReader::skipEvents
int skipEvents
Definition: DTDDUFileReader.h:61
DTDDUFileReader
Definition: DTDDUFileReader.h:22
DTDDUFileReader::checkEndOfFile
virtual bool checkEndOfFile()
Definition: DTDDUFileReader.cc:228
EventID.h
HLTBitAnalyser_cfi.isData
isData
Definition: HLTBitAnalyser_cfi.py:29
edm::EventNumber_t
unsigned long long EventNumber_t
Definition: RunLumiEventNumber.h:12
DTDDUFileReader::isTrailer
bool isTrailer(uint64_t word, bool dataTag, unsigned int wordCount)
check for a 64 bits word to be a DDU trailer
Definition: DTDDUFileReader.cc:215
DTDDUFileReader::fillRawData
virtual int fillRawData(edm::Event &e, FEDRawDataCollection *&data)
Generate and fill FED raw data for a full event.
Definition: DTDDUFileReader.cc:62
edm::ParameterSet
Definition: ParameterSet.h:36
Event.h
DTDDUFileReader::eventNumber
edm::EventNumber_t eventNumber
Definition: DTDDUFileReader.h:56
FEDRawDataCollection.h
edm::EventSetup
Definition: EventSetup.h:57
DTDDUFileReader::numberOfHeaderWords
int numberOfHeaderWords
Definition: DTDDUFileReader.h:62
DTDDUFileReader::~DTDDUFileReader
~DTDDUFileReader() override
Destructor.
Definition: DTDDUFileReader.cc:60
EventSetup.h
edm::EDProducer
Definition: EDProducer.h:36
gctErrorAnalyzer_cfi.dataTag
dataTag
Definition: gctErrorAnalyzer_cfi.py:28
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
cond::uint64_t
unsigned long long uint64_t
Definition: Time.h:13
DTDDUFileReader::produce
void produce(edm::Event &, edm::EventSetup const &) override
Definition: DTDDUFileReader.cc:160
edm::Event
Definition: Event.h:73
DTDDUFileReader::readFromDMA
bool readFromDMA
Definition: DTDDUFileReader.h:60
DTDDUFileReader::isHeader
bool isHeader(uint64_t word, bool dataTag)
check for a 64 bits word to be a DDU header
Definition: DTDDUFileReader.cc:202
DTDDUFileReader::swap
void swap(uint64_t &word)
swapping the lsBits with the msBits
Definition: DTDDUFileReader.cc:168
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
RawFile
Definition: RawFile.h:14
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37