19 m_quiet( pset.getUntrackedParameter<
bool>("quiet",
true)),
20 m_onlyRemapped( pset.getUntrackedParameter<
bool>("onlyRemapped",
false))
27 unpackSetup(pset.getUntrackedParameter<std::vector<std::string> >(
"streams",std::vector<std::string>()));
28 produces<FEDRawDataCollection>();
32 for (std::vector<std::string>::const_iterator
i=params.begin();
i!=params.end();
i++) {
33 unsigned long pos=
i->find(
':');
34 std::string streamName=
i->substr(0,pos);
36 if (pos!=std::string::npos)
37 remapTo=atoi(
i->c_str()+pos+1);
41 edm::LogInfo(
"HCAL") << streamName <<
" --> " << remapTo << endl;
43 edm::LogInfo(
"HCAL") << streamName <<
" using fedid in file" << endl;
63 m_file=TFile::Open(filename.c_str());
65 edm::LogError(
"HCAL") <<
"Unable to open " << filename << endl;
75 edm::LogError(
"HCAL") <<
"Unable to find CMSRAW tree" << endl;
80 edm::LogInfo(
"HCAL") <<
"Opening '" << filename <<
"' with " <<
m_tree->GetEntries() <<
" events.\n";
83 TObjArray* lb=
m_tree->GetListOfBranches();
85 for (
int i=0;
i<lb->GetSize();
i++) {
86 TBranch*
b=(TBranch*)lb->At(
i);
88 if (!strcmp(b->GetClassName(),
"CDFEventInfo")) {
92 if (strcmp(b->GetClassName(),
"CDFChunk"))
continue;
97 edm::LogInfo(
"HCAL") <<
"Also reading branch " << b->GetName();
145 setTime(present_time + time_between_events);
171 unsigned int*
header=(
unsigned int*)fed.
data();
172 header[0]=(header[0]&0xFFF000FFu)|(
id<<8);
176 edm::LogInfo(
"HCAL") <<
"Reading " << len <<
" bytes for FED " <<
id << std::endl;
virtual bool produce(edm::Event &e)
virtual void setRunAndEventInfo()
void openFile(const std::string &filename)
void resize(size_t newsize)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Global information about an event such as event number and run number.
unsigned long long TimeValue_t
UInt_t getRunNumber() const
get the run number
CDFChunk * m_chunks[CHUNK_COUNT]
int m_chunkIds[CHUNK_COUNT]
void unpackSetup(const std::vector< std::string > ¶ms)
char data[epos_bytes_allocation]
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
CDFEventInfo * m_eventInfo
Int_t getDataLength() const
std::map< std::string, int > m_sourceIdRemap
ULong64_t getEventNumber() const
get the event number
tuple size
Write out results.