60 <<
"\n If negative value, the size is retrieved from the trailer." <<
"\n" 70 <<
"\nFED Id for DAQ GT record: " 78 <<
"\nError: failed to open text file = " <<
m_textFileName <<
"\n" 83 produces<FEDRawDataCollection>();
110 <<
"\nCleaning the text file\n" 122 <<
"\nComputing raw data size with getRecordSize() method." 128 <<
"\nComputed raw data size: " << rawDataSize
159 rawData.
resize(rawDataSize);
163 <<
"\n Size of raw data: " << rawData.
size() <<
"\n" 174 int sizeL =
sizeof(lineInt);
176 int fedBlockSize = 8;
177 int maskBlock = 0xff;
181 while (std::getline(
m_textFile, lineString)) {
183 if (lineString.empty()) {
188 std::istringstream iss(lineString);
190 iss >> std::hex >> lineInt;
193 <<
std::dec << std::setw(4) << std::setfill(
'0') << iLine <<
": " 194 << std::hex << std::setw(sizeL*2) << lineInt
199 for (
int j = 0; j < sizeL; j++) {
200 char blockContent = (lineInt >> (fedBlockSize * j)) & maskBlock;
201 rawData.
data()[iLine*sizeL + j] = blockContent;
virtual int getDataSize()
get the size of the record
T getUntrackedParameter(std::string const &, T const &) const
int m_daqGtFedId
FED ID for the system.
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
std::string m_textFileName
file name for the text file
size_t size() const
Lenght of the data buffer in bytes.
void resize(size_t newsize)
std::string m_textFileType
file type for the text file
void beginJob() override
beginning of job stuff
L1GtTextToRaw(const edm::ParameterSet &)
constructor(s)
int m_rawDataSize
raw event size (including header and trailer) in units of 8 bits
void produce(edm::Event &, const edm::EventSetup &) override
loop over events
virtual void cleanTextFile()
clean the text file, if needed
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
unsigned long long cms_uint64_t
std::ifstream m_textFile
the file itself
void endJob() override
end of job stuff
~L1GtTextToRaw() override
destructor