9 #include <boost/cstdint.hpp>
14 namePattern_(pset.getUntrackedParameter<std::
string>(
"FilenamePattern",
"/tmp/HTB_%06d.root"))
20 std::vector<edm::ParameterSet>::iterator
j;
21 for (j=names.begin(); j!=names.end(); j++) {
23 int num=j->getUntrackedParameter<
int>(
"Number");
37 ri_.
setInfo(
"DAQSofwareRelease",
"UNKNOWN -- HcalTBWriter");
38 gethostname(buffer,1024);
57 edm::LogInfo(
"HCAL") <<
"Opening " << fname <<
" for writing HCAL-format file.";
58 file_=
new TFile(fname,
"RECREATE");
84 tree_=
new TTree(
"CMSRAW",
"CMS Common Data Format Tree");
88 for (
int i=0;
i<2048;
i++) {
90 if (frd.
size()<16)
continue;
96 snprintf(sname,64,
"Chunk%03d",
i);
102 tree_->Branch(name.c_str(),
"CDFChunk",&(chunkList_[
j]));
105 if (name==
"HCAL_Trigger" || name==
"SliceTest_Trigger")
trigChunk_=
j;
139 const char* seqid=
"";
140 int eventNo=
id.event();
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
uint32_t triggerTime_base
StandardTrgMsgBlk stdBlock
static const HistoName names[]
CDFEventInfo * eventInfo_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< FEDRawDataCollection > tok_raw_
struct StandardTrgMsgBlkStruct StandardTrgMsgBlk
size_t size() const
Lenght of the data buffer in bytes.
void setInfo(const char *key, const char *value)
add some information to the run info
void store(TFile *toFile)
void Set(UInt_t runNo, const char *seqid, ULong64_t eventNo, UInt_t l1aNo, ULong64_t orbitNo, UInt_t bunchNo)
setter routine
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
HcalTBWriter(const edm::ParameterSet &pset)
void adoptBuffer(ULong64_t *buffer, Int_t length)
Global information about an event such as event number and run number.
uint32_t triggerTime_usec
std::map< int, int > chunkMap_
char runNumberSequenceId[16]
CDFChunk * chunkList_[1024]
void buildTree(const FEDRawDataCollection &raw)
void extractEventInfo(const FEDRawDataCollection &raw, const edm::EventID &id)
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
struct newExtendedTrgMsgBlkStruct newExtendedTrgMsgBlk
std::map< int, std::string > blockToName_
virtual void analyze(const edm::Event &e, const edm::EventSetup &es)