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];
117 nread =
inputFile.
read(dataPointer<int>(&LastCounter), ros8WordLenght);
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);
T getUntrackedParameter(std::string const &, T const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
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.
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
int close()
Close file if necessary.
void resize(size_t newsize)
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]
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
~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