40 <<
"DTROS25FileReader: the input file: " << filename <<
" is not present";
55 vector<uint32_t> eventData;
56 size_t estimatedEventDimension = 102400;
57 eventData.reserve(estimatedEventDimension);
75 if ( nread<=0 )
throw 1;
82 eventData.push_back(word);
98 int adjustment = (eventDataSize/4)%2 == 1 ? 4 : 0;
102 fedRawData.
resize(eventDataSize+adjustment);
104 copy(reinterpret_cast<unsigned char*>(&eventData[0]),
105 reinterpret_cast<unsigned char*>(&eventData[0]) + eventDataSize, fedRawData.
data());
113 cout<<
"[DTROS25FileReader]: ERROR! failed to get the trailer"<<endl;
118 cout<<
"[DTROS25FileReader]:"
119 <<
" ERROR! ROS data exceeding estimated event dimension. Event size = "
120 <<eventData.size()<<endl;
133 uint16_t msBits_tmp = newWorld->
msBits;
135 newWorld->
lsBits = msBits_tmp;
142 if ( (word >> 24 ) == 31 ) {
154 if ( (word >> 24 ) == 63 ) {
T getUntrackedParameter(std::string const &, T const &) const
edm::RunNumber_t runNumber
edm::EventNumber_t eventNumber
static const int rosWordLenght
RawFile * open(const char *path)
Open file.
int read(void *data, size_t nbytes)
Read from file.
bool isTrailer(uint32_t word)
check for a 32 bits word to be a ROS25 trailer
virtual bool checkEndOfFile()
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
int close()
Close file if necessary.
void resize(size_t newsize)
virtual ~DTROS25FileReader()
Destructor.
DTROS25FileReader(const edm::ParameterSet &pset)
Constructor.
int eof()
Check end of file.
virtual int fillRawData(edm::EventID &eID, edm::Timestamp &tstamp, FEDRawDataCollection *&data)
Generate and fill FED raw data for a full event.
char data[epos_bytes_allocation]
void swap(uint32_t &word)
swapping the lsBits with the msBits
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
bool isHeader(uint32_t word)
check for a 32 bits word to be a ROS25 header