35 const string&
filename =
pset.getUntrackedParameter<
string>(
"fileName");
40 <<
"DTNewROS8FileReader: the input file: " <<
filename <<
" is not present";
43 produces<FEDRawDataCollection>();
89 int numberEventHeadWords = 8;
92 int numberOfWords = 0;
101 int datahead[numberEventHeadWords];
102 for (
int iih = 0; iih < numberEventHeadWords; iih++) {
108 int numberOfDataWords = numberOfWords - numberEventHeadWords - 2;
109 int* eventData =
new int[numberOfDataWords];
121 if (LastCounter != numberOfWords) {
122 cout <<
"[DTNewROS8FileReader]: word counter mismatch exception: " << numberOfWords <<
" " << LastCounter << endl;
144 int adjustment = (eventDataSize / 4) % 2 == 1 ? 4 : 0;
148 fedRawData.resize(eventDataSize + adjustment);
151 copy(reinterpret_cast<unsigned char*>(eventData),
152 reinterpret_cast<unsigned char*>(eventData) + eventDataSize,
162 cout <<
"[DTNewROS8FileReader]: END OF FILE REACHED. " 163 <<
"No information read for the requested event" << endl;
168 cout <<
"[DTNewROS8FileReader]: PROBLEM WITH EVENT INFORMATION ON THE FILE. " 169 <<
"EVENT DATA READING FAILED code= " <<
i << endl;
181 std::unique_ptr<FEDRawDataCollection> bare_product(fedcoll);
RawFile * open(const char *path)
Open file.
DTNewROS8FileReader(const edm::ParameterSet &pset)
Constructor.
edm::EventNumber_t eventNum
int read(void *data, size_t nbytes)
Read from file.
int close()
Close file if necessary.
static const int ros8WordLenght
virtual bool checkEndOfFile()
void produce(edm::Event &, edm::EventSetup const &) override
int eof()
Check end of file.
char data[epos_bytes_allocation]
~DTNewROS8FileReader() override
Destructor.
virtual int fillRawData(edm::Event &e, FEDRawDataCollection *&data)
Generate and fill FED raw data for a full event.
edm::RunNumber_t runNumber