|
|
Go to the documentation of this file.
18 m_quiet(
pset.getUntrackedParameter<
bool>(
"quiet",
true)),
19 m_onlyRemapped(
pset.getUntrackedParameter<
bool>(
"onlyRemapped",
false)) {
25 unpackSetup(
pset.getUntrackedParameter<std::vector<std::string> >(
"streams", std::vector<std::string>()));
26 produces<FEDRawDataCollection>();
30 for (std::vector<std::string>::const_iterator
i =
params.begin();
i !=
params.end();
i++) {
31 unsigned long pos =
i->find(
':');
34 if (
pos != std::string::npos)
35 remapTo = atoi(
i->c_str() +
pos + 1);
37 m_sourceIdRemap.insert(std::pair<std::string, int>(streamName, remapTo));
39 edm::LogInfo(
"HCAL") << streamName <<
" --> " << remapTo << endl;
41 edm::LogInfo(
"HCAL") << streamName <<
" using fedid in file" << endl;
73 edm::LogError(
"HCAL") <<
"Unable to find CMSRAW tree" << endl;
81 TObjArray* lb =
m_tree->GetListOfBranches();
83 for (
int i = 0;
i < lb->GetSize();
i++) {
84 TBranch*
b = (TBranch*)lb->At(
i);
87 if (!strcmp(
b->GetClassName(),
"CDFEventInfo")) {
91 if (strcmp(
b->GetClassName(),
"CDFChunk"))
98 edm::LogInfo(
"HCAL") <<
"Also reading branch " <<
b->GetName();
150 time = present_time + time_between_events;
155 auto bare_product = std::make_unique<FEDRawDataCollection>();
169 unsigned int*
header = (
unsigned int*)fed.
data();
174 edm::LogInfo(
"HCAL") <<
"Reading " << len <<
" bytes for FED " <<
id << std::endl;
bool setRunAndEventInfo(edm::EventID &id, edm::TimeValue_t &time, edm::EventAuxiliary::ExperimentType &) override
void openFile(const std::string &filename)
LuminosityBlockNumber_t luminosityBlock() const
Log< level::Info, false > LogInfo
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
CDFEventInfo * m_eventInfo
UInt_t getRunNumber() const
get the run number
Int_t getDataLength() const
void produce(edm::Event &e) override
CDFChunk * m_chunks[CHUNK_COUNT]
void unpackSetup(const std::vector< std::string > ¶ms)
int m_chunkIds[CHUNK_COUNT]
std::map< std::string, int > m_sourceIdRemap
std::vector< std::string > fileNames(unsigned iCatalog) const
Log< level::Error, false > LogError
unsigned int timeBetweenEvents() const
Global information about an event such as event number and run number.
TimeValue_t presentTime() const
HcalTBSource(const edm::ParameterSet &pset, edm::InputSourceDescription const &desc)
void resize(size_t newsize)
char data[epos_bytes_allocation]
ULong64_t getEventNumber() const
get the event number
unsigned long long TimeValue_t