12 : namePattern_(pset.getUntrackedParameter<
std::
string>(
"FilenamePattern",
"/tmp/HTB_%06d.root")) {
16 std::vector<edm::ParameterSet>::iterator
j;
17 for (j = names.begin(); j != names.end(); j++) {
19 int num = j->getUntrackedParameter<
int>(
"Number");
30 if (
file_ !=
nullptr) {
33 ri_.
setInfo(
"DAQSofwareRelease",
"UNKNOWN -- HcalTBWriter");
34 gethostname(buffer, 1024);
50 if (
file_ ==
nullptr) {
53 edm::LogInfo(
"HCAL") <<
"Opening " << fname <<
" for writing HCAL-format file.";
54 file_ =
new TFile(fname,
"RECREATE");
79 tree_ =
new TTree(
"CMSRAW",
"CMS Common Data Format Tree");
83 for (
int i = 0;
i < 2048;
i++) {
93 snprintf(sname, 64,
"Chunk%03d",
i);
99 tree_->Branch(name.c_str(),
"CDFChunk", &(chunkList_[
j]));
102 if (name ==
"HCAL_Trigger" || name ==
"SliceTest_Trigger")
131 char runNumberSequenceId[16];
136 int runno =
id.run();
137 const char* seqid =
"";
138 int eventNo =
id.event();
149 bunchNo = head.
bxID();
153 eventInfo_->
Set(runno, seqid, eventNo, l1aNo, orbitNo, bunchNo);
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
uint32_t triggerTime_base
StandardTrgMsgBlk stdBlock
CDFEventInfo * eventInfo_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< FEDRawDataCollection > tok_raw_
struct StandardTrgMsgBlkStruct StandardTrgMsgBlk
const std::string names[nVars_]
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
#define DEFINE_FWK_MODULE(type)
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
std::map< int, int > chunkMap_
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
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
void analyze(const edm::Event &e, const edm::EventSetup &es) override
std::map< int, std::string > blockToName_