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;
87 std::string SysLabel[
NSYS] = {
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;}
112 std::string refName(
"");
113 std::string spreadLabel[
nspr_] = {
"Spread",
"Min",
"Max"};
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 ";
236 char *ii =
new char[10]; std::sprintf(ii,
"%d",
listGtBits_.at(
j)); lbl+=ii;
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 std::vector<bool> gtbits;
279 gtbits.reserve(ngtbits);
for(
int i=0;
i<ngtbits;
i++) gtbits[
i]=
false;
281 gtbits = gtdata->decisionWord();
283 if(gtbits.size()==0) {
284 gtbits.push_back(
true);
286 std::cout <<
"BxTiming::analyze() | unexpected empty decision bits!";
290 std::cout <<
"BxTiming::analyze() gt data valid:" << (int)(gtdata.
isValid()?0:1)
291 <<
" decision word size:" << (
int)(gtbits.size()) <<
" bits: ";
292 for(
size_t i=0;
i!=gtbits.size();
i++) {
293 int ii = gtbits.at(
i)? 1:0;
305 int ttype =
FEDHeader(rawdata->FEDData(812).data()).triggerType();
315 int bx = header.
bxID();
329 <<
" bxRef:" << bxRef
330 <<
" diff:" << bxDiff
333 <<
"\n" << std::flush;
352 std::cout <<
"BxTiming analyze | problem with vector size!\n" << std::endl;
368 if(ttype!=1)
continue;
377 if(nBxDiff[
i][0]<0 || nBxOccy[
i][0]<0)
continue;
384 <<
" Bx-Bx(" <<
fedRef_ <<
")::"
385 <<
" del:" << nBxDiff[
i][0]
386 <<
" min:" << nBxDiff[
i][1]
387 <<
" max:" << nBxDiff[
i][2]
389 <<
" del:" << nBxOccy[
i][0]
390 <<
" min:" << nBxOccy[
i][1]
391 <<
" max:" << nBxOccy[
i][2]
392 <<
"\n" << std::flush;
398 std::cout <<
"BxTiming::analyze() end.\n" << std::flush;
406 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]
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)