14 std::cout <<
"BxTiming::BxTiming()...\n" << std::flush;
24 (
"HistFolder",
"L1T/BXSynch");
27 if(runInFF_) histFolder_ =
"L1T/BXSynch_EvF";
29 std::cout <<
"Filter farm run setting?" << runInFF_
30 <<
"\n" << std::flush;
36 for(
int i=0;
i<ngtbits;
i++)
41 std::cout <<
"BxTiming: gt bits set for timing dqm:";
62 std::cout <<
"BxTiming::BxTiming constructor...done.\n" << std::flush;
71 std::cout <<
"BxTiming::beginJob() start\n" << std::flush;
88 "PreShower",
"ECAL",
"HCAL",
"GCT",
"CSCTPG",
"CSCTF",
"DTTPG",
"DTTF",
"RPC",
"GT"
91 typedef std::pair<int, int> FEDRange;
93 std::pair<int,int> fedRange[
NSYS] = {
111 {fedRefSys=
i;
break;}
115 refName+=SysLabel[fedRefSys];
121 const int dbx =
nbig_;
128 nfed_ + 1, -0.5, nfed_+0.5,
129 2*dbx+1, -1*dbx-0.5,dbx+0.5
133 lbl.clear();lbl+=
"BxDiffAllFed";lbl+=spreadLabel[
i];
135 lbl.clear();lbl+=
"BxOccyAllFed";lbl+=spreadLabel[
i];
139 lbl.clear();lbl+=
"BxOccyAllFed";
150 lbl.clear();lbl+=SysLabel[
i];lbl+=
"FedBxDiff";
152 nfeds = (nfeds>0)? nfeds:1;
155 2*dbx+1,-1*dbx-0.5,dbx+0.5);
160 lbl.clear();lbl+=
"BxOccyAllFed";
164 lbl.clear(); lbl+=
"BxOccyOneFed";
165 char *
ii =
new char[1000]; std::sprintf(ii,
"%d",
i);lbl+=
ii;
172 lbl.clear();lbl+=
"BxOccyGtTrigType";
173 char *
ii =
new char[10]; std::sprintf(ii,
"%d",
i+1);lbl+=
ii;
182 lbl.clear();lbl+=SysLabel[
i];lbl+=
"BxOccyGtBit";
183 char *
ii =
new char[1000]; std::sprintf(ii,
"%d",
listGtBits_.at(
j)); lbl+=
ii;
193 lbl.clear(); lbl+=
"BX(fed)-BX("; lbl+=refName; lbl+=
")";
196 lbl.clear(); lbl+=
"BX(fed)-BX("; lbl+=refName; lbl+=
") "+spreadLabel[
i];
199 lbl.clear(); lbl+=
"Bx FED occupancy"; lbl+=
" "; lbl+=spreadLabel[
i];
205 lbl.clear(); lbl+=
"Combined FED occupancy";
213 lbl.clear(); lbl+=SysLabel[
i]; lbl+=
" FED ID";
215 lbl.clear(); lbl+=
"BX("; lbl+=SysLabel[
i]; lbl+=
")-BX(";lbl+=refName; lbl+=
")";
221 lbl.clear(); lbl+=
" FED ";
char *
ii =
new char[1000]; std::sprintf(ii,
"%d",
i);lbl+=
ii; lbl+=
" occupancy";
227 lbl.clear(); lbl+=
"GT occupancy for trigger type ";
char *
ii =
new char[10]; std::sprintf(ii,
"%d",
i+1);lbl+=
ii;
235 lbl.clear();lbl+=SysLabel[
i];lbl+=
" Bx occupancy for Trigger bit ";
243 std::cout <<
"BxTiming::beginJob() end.\n" << std::flush;
250 std::cout <<
"BxTiming::endJob Nevents: " <<
nEvt_ <<
"\n" << std::flush;
256 std::cout <<
"BxTiming::endJob() end.\n" << std::flush;
265 std::cout <<
"BxTiming::analyze() start\n" << std::flush;
277 <<
"BxTiming::analyze() | FEDRawDataCollection with input tag "
286 std::vector<bool> gtbits;
288 gtbits.reserve(ngtbits);
for(
int i=0;
i<ngtbits;
i++) gtbits[
i]=
false;
290 gtbits = gtdata->decisionWord();
292 if(gtbits.size()==0) {
293 gtbits.push_back(
true);
295 std::cout <<
"BxTiming::analyze() | unexpected empty decision bits!";
299 std::cout <<
"BxTiming::analyze() gt data valid:" << (int)(gtdata.
isValid()?0:1)
300 <<
" decision word size:" << (
int)(gtbits.size()) <<
" bits: ";
301 for(
size_t i=0;
i!=gtbits.size();
i++) {
302 int ii = gtbits.at(
i)? 1:0;
314 int ttype =
FEDHeader(rawdata->FEDData(812).data()).triggerType();
324 int bx = header.
bxID();
338 <<
" bxRef:" << bxRef
339 <<
" diff:" << bxDiff
342 <<
"\n" << std::flush;
361 std::cout <<
"BxTiming analyze | problem with vector size!\n" << std::endl;
377 if(ttype!=1)
continue;
386 if(nBxDiff[
i][0]<0 || nBxOccy[
i][0]<0)
continue;
393 <<
" Bx-Bx(" <<
fedRef_ <<
")::"
394 <<
" del:" << nBxDiff[
i][0]
395 <<
" min:" << nBxDiff[
i][1]
396 <<
" max:" << nBxDiff[
i][2]
398 <<
" del:" << nBxOccy[
i][0]
399 <<
" min:" << nBxOccy[
i][1]
400 <<
" max:" << nBxOccy[
i][2]
401 <<
"\n" << std::flush;
407 std::cout <<
"BxTiming::analyze() end.\n" << std::flush;
415 int diff = bx1 - bx2;
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * hBxDiffAllFed
histograms
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
MonitorElement * hBxDiffAllFedSpread[nspr_]
std::vector< int > listGtBits_
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
MonitorElement * hBxOccyAllFed
MonitorElement ** hBxOccyOneFed
size_t size() const
Lenght of the data buffer in bytes.
U second(std::pair< T, U > const &p)
virtual void beginJob(void)
MonitorElement * hBxOccyGtTrigType[nttype_]
static const int half_norb_
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
void setVerbose(unsigned level)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
MonitorElement * hBxDiffSysFed[NSYS]
MonitorElement ** hBxOccyTrigBit[NSYS]
char data[epos_bytes_allocation]
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
int calcBxDiff(int bx1, int bx2)
std::pair< int, int > fedRange_[NSYS]
MonitorElement * hBxOccyAllFedSpread[nspr_]
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
BxTiming(const edm::ParameterSet &)
tuple size
Write out results.
void setCurrentFolder(const std::string &fullpath)