9 #include <boost/cstdint.hpp>
14 namePattern_(pset.getUntrackedParameter<std::string>(
"FilenamePattern",
"/tmp/HTB_%06d.root"))
18 std::vector<edm::ParameterSet>::iterator
j;
19 for (j=names.begin(); j!=names.end(); j++) {
20 std::string
name=j->getUntrackedParameter<std::string>(
"Name");
21 int num=j->getUntrackedParameter<
int>(
"Number");
35 ri_.
setInfo(
"DAQSofwareRelease",
"UNKNOWN -- HcalTBWriter");
36 gethostname(buffer,1024);
55 edm::LogInfo(
"HCAL") <<
"Opening " << fname <<
" for writing HCAL-format file.";
56 file_=
new TFile(fname,
"RECREATE");
82 tree_=
new TTree(
"CMSRAW",
"CMS Common Data Format Tree");
86 for (
int i=0;
i<2048;
i++) {
88 if (frd.
size()<16)
continue;
94 snprintf(sname,64,
"Chunk%03d",
i);
100 tree_->Branch(name.c_str(),
"CDFChunk",&(chunkList_[
j]));
103 if (name==
"HCAL_Trigger" || name==
"SliceTest_Trigger")
trigChunk_=
j;
137 const char* seqid=
"";
138 int eventNo=
id.event();
T getUntrackedParameter(std::string const &, T const &) const
uint32_t triggerTime_base
StandardTrgMsgBlk stdBlock
static const HistoName names[]
CDFEventInfo * eventInfo_
struct StandardTrgMsgBlkStruct StandardTrgMsgBlk
bool getByType(Handle< PROD > &result) const
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)