CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes
BxTiming Class Reference

#include <BxTiming.h>

Inheritance diagram for BxTiming:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Member Functions

 BxTiming (const edm::ParameterSet &)
 
 ~BxTiming () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Protected Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &ibooker, edm::Run const &, edm::EventSetup const &) override
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 

Private Types

enum  nsys { NSYS = 10 }
 
enum  syslist {
  PS = 0, ETP, HTP, GCT,
  CTP, CTF, DTP, DTF,
  RPC, GLT
}
 

Private Member Functions

int calcBxDiff (int bx1, int bx2)
 
int verbose ()
 

Private Attributes

std::pair< int, int > fedRange_ [NSYS]
 
int fedRef_
 
edm::InputTag fedSource_
 
edm::EDGetTokenT< FEDRawDataCollectionfedSource_token_
 
edm::InputTag gtSource_
 
edm::EDGetTokenT< L1GlobalTriggerReadoutRecordgtSource_token_
 
MonitorElementhBxDiffAllFed
 histograms More...
 
MonitorElementhBxDiffAllFedSpread [nspr_]
 
MonitorElementhBxDiffSysFed [NSYS]
 
MonitorElementhBxOccyAllFed
 
MonitorElementhBxOccyAllFedSpread [nspr_]
 
MonitorElementhBxOccyGtTrigType [nttype_]
 
MonitorElement ** hBxOccyOneFed
 
MonitorElement ** hBxOccyTrigBit [NSYS]
 
std::string histFile_
 
std::string histFolder_
 
std::vector< int > listGtBits_
 
int nBxDiff [FEDNumbering::MAXFEDID+1][nspr_]
 
int nBxOccy [FEDNumbering::MAXFEDID+1][nspr_]
 
int nEvt_
 
bool runInFF_
 
int verbose_
 

Static Private Attributes

static const int half_norb_ = norb_ / 2
 
static const int nbig_ = 10000
 
static const int norb_ = 3564
 
static const int nspr_ = 3
 
static const int nttype_ = 6
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 33 of file BxTiming.h.

Member Enumeration Documentation

◆ nsys

enum BxTiming::nsys
private
Enumerator
NSYS 

Definition at line 82 of file BxTiming.h.

82 { NSYS = 10 };

◆ syslist

enum BxTiming::syslist
private
Enumerator
PS 
ETP 
HTP 
GCT 
CTP 
CTF 
DTP 
DTF 
RPC 
GLT 

Definition at line 83 of file BxTiming.h.

83 { PS = 0, ETP, HTP, GCT, CTP, CTF, DTP, DTF, RPC, GLT };

Constructor & Destructor Documentation

◆ BxTiming()

BxTiming::BxTiming ( const edm::ParameterSet iConfig)
explicit

Definition at line 4 of file BxTiming.cc.

4  {
5  verbose_ = iConfig.getUntrackedParameter<int>("VerboseFlag", 0);
6  if (verbose())
7  std::cout << "BxTiming::BxTiming()...\n" << std::flush;
8 
9  fedRef_ = iConfig.getUntrackedParameter<int>("ReferenceFedId", 813);
10  fedSource_ = iConfig.getUntrackedParameter<edm::InputTag>("FedSource", edm::InputTag("source"));
11  fedSource_token_ = consumes<FEDRawDataCollection>(
12  iConfig.getUntrackedParameter<edm::InputTag>("FedSource", edm::InputTag("source")));
13  gtSource_ = iConfig.getUntrackedParameter<edm::InputTag>("GtSource", edm::InputTag("gtUnpack"));
14  gtSource_token_ = consumes<L1GlobalTriggerReadoutRecord>(
15  iConfig.getUntrackedParameter<edm::InputTag>("GtSource", edm::InputTag("gtUnpack")));
16  histFile_ = iConfig.getUntrackedParameter<std::string>("HistFile", "");
17  histFolder_ = iConfig.getUntrackedParameter<std::string>("HistFolder", "L1T/BXSynch");
18 
19  runInFF_ = iConfig.getUntrackedParameter<bool>("RunInFilterFarm", true);
20  if (runInFF_)
21  histFolder_ = "L1T/BXSynch_EvF";
22  if (verbose())
23  std::cout << "Filter farm run setting?" << runInFF_ << "\n" << std::flush;
24 
25  listGtBits_ = iConfig.getUntrackedParameter<std::vector<int> >("GtBitList", std::vector<int>(1, 0));
26  if (listGtBits_.size() == 1 && listGtBits_.at(0) == -1) {
27  int ngtbits = 128;
28  listGtBits_.reserve(ngtbits);
29  for (int i = 0; i < ngtbits; i++)
30  listGtBits_[i] = i;
31  }
32 
33  if (verbose()) {
34  std::cout << "BxTiming: gt bits set for timing dqm:";
35  std::cout << "nbits:" << listGtBits_.size() << " list: ";
36  for (size_t i = 0; i != listGtBits_.size(); i++)
37  std::cout << listGtBits_.at(i) << " ";
38  std::cout << "\n" << std::flush;
39  }
40 
41  nEvt_ = 0;
42 
43  if (verbose())
44  std::cout << "BxTiming::BxTiming constructor...done.\n" << std::flush;
45 }

References gather_cfg::cout, fedRef_, fedSource_, fedSource_token_, edm::ParameterSet::getUntrackedParameter(), gtSource_, gtSource_token_, histFile_, histFolder_, mps_fire::i, HLT_FULL_cff::InputTag, listGtBits_, nEvt_, runInFF_, AlCaHLTBitMon_QueryRunRegistry::string, verbose(), and verbose_.

◆ ~BxTiming()

BxTiming::~BxTiming ( )
override

Definition at line 47 of file BxTiming.cc.

47 {}

Member Function Documentation

◆ analyze()

void BxTiming::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprotectedvirtual

get the raw data - if not found, return

Reimplemented from DQMEDAnalyzer.

Definition at line 263 of file BxTiming.cc.

263  {
264  if (verbose())
265  std::cout << "BxTiming::analyze() start\n" << std::flush;
266 
267  nEvt_++;
268 
271  iEvent.getByToken(fedSource_token_, rawdata);
272 
273  if (!rawdata.isValid()) {
274  if (verbose())
275  std::cout << "BxTiming::analyze() | FEDRawDataCollection with input tag " << fedSource_ << " not found.";
276 
277  return;
278  }
279 
280  // get the GT bits
282  iEvent.getByToken(gtSource_token_, gtdata);
283  std::vector<bool> gtbits;
284  int ngtbits = 128;
285  gtbits.reserve(ngtbits);
286  for (int i = 0; i < ngtbits; i++)
287  gtbits[i] = false;
288  if (gtdata.isValid())
289  gtbits = gtdata->decisionWord();
290 
291  if (gtbits.empty()) {
292  gtbits.push_back(true); // gtdata->decision();
293  if (verbose())
294  std::cout << "BxTiming::analyze() | unexpected empty decision bits!";
295  }
296 
297  if (verbose()) {
298  std::cout << "BxTiming::analyze() gt data valid:" << (int)(gtdata.isValid() ? 0 : 1)
299  << " decision word size:" << (int)(gtbits.size()) << " bits: ";
300  for (size_t i = 0; i != gtbits.size(); i++) {
301  int ii = gtbits.at(i) ? 1 : 0;
302  std::cout << ii;
303  }
304  std::cout << ".\n" << std::flush;
305  }
306 
307  // get reference bx
308  int bxRef = FEDHeader(rawdata->FEDData(fedRef_).data()).bxID();
309 
310  // triggerType
311  // trigger types: physics (1), calibration (2), random (3), traced physics (5), test (6)
312  int ttype = static_cast<double>(iEvent.eventAuxiliary().experimentType());
313 
314  // loop over feds
315  for (int i = 0; i < FEDNumbering::MAXFEDID + 1; i++) {
316  const FEDRawData &data = rawdata->FEDData(i);
317  size_t size = data.size();
318 
319  if (!size)
320  continue;
321  FEDHeader header(data.data());
322  //int lvl1id = header.lvl1ID(); //Level-1 event number generated by the TTC system
323  int bx = header.bxID(); // The bunch crossing number
324 
325  int bxDiff = calcBxDiff(bx, bxRef); // deviation from reference bx
326 
327  //min
328  if (nBxDiff[i][1] > bxDiff)
329  nBxDiff[i][1] = bxDiff;
330  if (nBxOccy[i][1] > bx)
331  nBxOccy[i][1] = bx;
332  //max
333  if (nBxDiff[i][2] < bxDiff)
334  nBxDiff[i][2] = bxDiff;
335  if (nBxOccy[i][2] < bx)
336  nBxOccy[i][2] = bx;
337 
338  if (verbose())
339  std::cout << " fed:" << i << " bx:" << bx << " bxRef:" << bxRef << " diff:" << bxDiff << " nBxDiff"
340  << " del:" << nBxDiff[i][0] << " min:" << nBxDiff[i][1] << " max:" << nBxDiff[i][2] << " nBxOccy"
341  << " del:" << nBxOccy[i][0] << " min:" << nBxOccy[i][1] << " max:" << nBxOccy[i][2] << "\n"
342  << std::flush;
343 
344  hBxDiffAllFed->Fill(i, bxDiff);
345 
346  //if(ttype==1) //skip if not a physics trigger
348 
349  // done if running in filter farm
350  if (runInFF_)
351  continue;
352 
353  for (int j = 0; j < NSYS; j++)
354  if (i >= fedRange_[j].first && i <= fedRange_[j].second)
355  hBxDiffSysFed[j]->Fill(i, bxDiff);
356 
357  for (size_t k = 0; k != listGtBits_.size(); k++) {
358  if ((int)gtbits.size() <= listGtBits_.at(k)) {
359  if (verbose())
360  std::cout << "BxTiming analyze | problem with vector size!\n" << std::endl;
361  continue;
362  } else if (!gtbits.at(listGtBits_.at(k)))
363  continue;
364  for (int j = 0; j < NSYS; j++) {
365  if (i >= fedRange_[j].first && i <= fedRange_[j].second) {
366  hBxOccyTrigBit[j][k]->Fill(bx);
367  }
368  }
369  }
370 
371  if (i >= fedRange_[GLT].first && i <= fedRange_[GLT].second) //GT fed
372  if (ttype < nttype_)
373  hBxOccyGtTrigType[ttype - 1]->Fill(bx);
374 
375  if (ttype != 1)
376  continue; //skip if not a physics trigger
377  //hBxOccyAllFed->Fill(bx);
378  hBxOccyOneFed[i]->Fill(bx);
379  }
380 
381  for (int i = 0; i < nfed_; i++) {
382  nBxDiff[i][0] = nBxDiff[i][2] - nBxDiff[i][1];
383  nBxOccy[i][0] = nBxOccy[i][2] - nBxOccy[i][1];
384  if (nBxDiff[i][0] < 0 || nBxOccy[i][0] < 0)
385  continue;
386  for (int j = 0; j < nspr_; j++) {
389  }
390  if (verbose())
391  std::cout << "BxTiming fed:" << i << " Bx-Bx(" << fedRef_ << ")::"
392  << " del:" << nBxDiff[i][0] << " min:" << nBxDiff[i][1] << " max:" << nBxDiff[i][2] << " Occy: "
393  << " del:" << nBxOccy[i][0] << " min:" << nBxOccy[i][1] << " max:" << nBxOccy[i][2] << "\n"
394  << std::flush;
395  }
396 
397  if (verbose())
398  std::cout << "BxTiming::analyze() end.\n" << std::flush;
399 }

References l1GtPatternGenerator_cfi::bx, calcBxDiff(), gather_cfg::cout, FEDRawData::data(), data, L1GlobalTriggerReadoutRecord::decisionWord(), FEDRawDataCollection::FEDData(), fedRange_, fedRef_, fedSource_, fedSource_token_, dqm::impl::MonitorElement::Fill(), dqmdumpme::first, GLT, gtSource_token_, hBxDiffAllFed, hBxDiffAllFedSpread, hBxDiffSysFed, hBxOccyAllFed, hBxOccyAllFedSpread, hBxOccyGtTrigType, hBxOccyOneFed, hBxOccyTrigBit, RecoTauValidation_cfi::header, mps_fire::i, iEvent, cuy::ii, createfilelist::int, edm::HandleBase::isValid(), dqmiolumiharvest::j, dqmdumpme::k, listGtBits_, FEDNumbering::MAXFEDID, nBxDiff, nBxOccy, nEvt_, nfed_, nspr_, NSYS, nttype_, runInFF_, edm::second(), dqm::impl::MonitorElement::setBinContent(), findQualityFiles::size, and verbose().

◆ bookHistograms()

void BxTiming::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

initialize counters

book the histograms

labeling (cosmetics added here)

Implements DQMEDAnalyzer.

Definition at line 49 of file BxTiming.cc.

49  {
51 
53  for (int i = 0; i < nfed_; i++) {
54  nBxDiff[i][0] = 0;
55  nBxDiff[i][1] = nbig_;
56  nBxDiff[i][2] = -1 * nbig_;
57  nBxOccy[i][0] = 0;
58  nBxOccy[i][1] = nbig_;
59  nBxOccy[i][2] = -1 * nbig_;
60  }
61 
62  std::string lbl("");
63  std::string SysLabel[NSYS] = {"PreShower", "ECAL", "HCAL", "GCT", "CSCTPG", "CSCTF", "DTTPG", "DTTF", "RPC", "GT"};
64 
65  typedef std::pair<int, int> FEDRange;
66 
67  std::pair<int, int> fedRange[NSYS] = {
78  };
79  for (int i = 0; i < NSYS; i++)
80  fedRange_[i] = fedRange[i];
81 
82  int fedRefSys = -1;
83  for (int i = 0; i < NSYS; i++)
84  if (fedRef_ >= fedRange_[i].first && fedRef_ <= fedRange_[i].second) {
85  fedRefSys = i;
86  break;
87  }
88  std::string refName("");
89  std::string spreadLabel[nspr_] = {"Spread", "Min", "Max"};
90  if (fedRefSys >= 0)
91  refName += SysLabel[fedRefSys];
92  else
93  refName += fedRef_;
94 
96 
97  const int dbx = nbig_;
98 
100 
101  hBxDiffAllFed = ibooker.bookProfile(
102  "BxDiffAllFed", "BxDiffAllFed", nfed_ + 1, -0.5, nfed_ + 0.5, 2 * dbx + 1, -1 * dbx - 0.5, dbx + 0.5);
103 
104  for (int i = 0; i < nspr_; i++) {
105  lbl.clear();
106  lbl += "BxDiffAllFed";
107  lbl += spreadLabel[i];
108  hBxDiffAllFedSpread[i] = ibooker.book1D(lbl.data(), lbl.data(), nfed_ + 1, -0.5, nfed_ + 0.5);
109  lbl.clear();
110  lbl += "BxOccyAllFed";
111  lbl += spreadLabel[i];
112  hBxOccyAllFedSpread[i] = ibooker.book1D(lbl.data(), lbl.data(), nfed_ + 1, -0.5, nfed_ + 0.5);
113 
114  lbl.clear();
115  lbl += "BxOccyAllFed";
116  hBxOccyAllFed = ibooker.book1D(lbl.data(), lbl.data(), norb_ + 1, -0.5, norb_ + 0.5);
117  }
118 
119  // following histos defined only when not runing in the ff
120  if (!runInFF_) {
121  ibooker.setCurrentFolder(histFolder_);
122 
123  for (int i = 0; i < NSYS; i++) {
124  lbl.clear();
125  lbl += SysLabel[i];
126  lbl += "FedBxDiff";
127  int nfeds = fedRange_[i].second - fedRange_[i].first + 1;
128  nfeds = (nfeds > 0) ? nfeds : 1;
129  hBxDiffSysFed[i] = ibooker.bookProfile(lbl.data(),
130  lbl.data(),
131  nfeds,
132  fedRange_[i].first - 0.5,
133  fedRange_[i].second + 0.5,
134  2 * dbx + 1,
135  -1 * dbx - 0.5,
136  dbx + 0.5);
137  }
138 
139  lbl.clear();
140  lbl += "BxOccyAllFed";
142  ibooker.setCurrentFolder(histFolder_ + "/SingleFed");
143  for (int i = 0; i < nfed_; i++) {
144  lbl.clear();
145  lbl += "BxOccyOneFed";
146  char *ii = new char[1000];
147  std::sprintf(ii, "%d", i);
148  lbl += ii;
149  hBxOccyOneFed[i] = ibooker.book1D(lbl.data(), lbl.data(), norb_ + 1, -0.5, norb_ + 0.5);
150  delete[] ii;
151  }
152 
153  ibooker.setCurrentFolder(histFolder_);
154  for (int i = 0; i < nttype_; i++) {
155  lbl.clear();
156  lbl += "BxOccyGtTrigType";
157  char *ii = new char[16];
158  std::sprintf(ii, "%d", i + 1);
159  lbl += ii;
160  hBxOccyGtTrigType[i] = ibooker.book1D(lbl.data(), lbl.data(), norb_ + 1, -0.5, norb_ + 0.5);
161  delete[] ii;
162  }
163 
164  ibooker.setCurrentFolder(histFolder_ + "/SingleBit");
165  for (int i = 0; i < NSYS; i++) {
166  hBxOccyTrigBit[i] = new MonitorElement *[listGtBits_.size()];
167  for (size_t j = 0; j < listGtBits_.size(); j++) {
168  lbl.clear();
169  lbl += SysLabel[i];
170  lbl += "BxOccyGtBit";
171  char *ii = new char[1000];
172  std::sprintf(ii, "%d", listGtBits_.at(j));
173  lbl += ii;
174  hBxOccyTrigBit[i][j] = ibooker.book1D(lbl.data(), lbl.data(), norb_ + 1, -0.5, norb_ + 0.5);
175  delete[] ii;
176  }
177  }
178  }
179 
181  hBxDiffAllFed->setAxisTitle("FED ID", 1);
182  lbl.clear();
183  lbl += "BX(fed)-BX(";
184  lbl += refName;
185  lbl += ")";
186  hBxDiffAllFed->setAxisTitle(lbl, 2);
187  for (int i = 0; i < nspr_; i++) {
188  lbl.clear();
189  lbl += "BX(fed)-BX(";
190  lbl += refName;
191  lbl += ") " + spreadLabel[i];
192  hBxDiffAllFedSpread[i]->setAxisTitle("FED ID", 1);
194  lbl.clear();
195  lbl += "Bx FED occupancy";
196  lbl += " ";
197  lbl += spreadLabel[i];
198  hBxOccyAllFedSpread[i]->setAxisTitle("FED ID", 1);
200  }
201 
202  hBxOccyAllFed->setAxisTitle("bx", 1);
203  lbl.clear();
204  lbl += "Combined FED occupancy";
205  hBxOccyAllFed->setAxisTitle(lbl, 2);
206 
207  // skip next if running in filter farm
208  if (runInFF_)
209  return;
210 
211  for (int i = 0; i < NSYS; i++) {
212  lbl.clear();
213  lbl += SysLabel[i];
214  lbl += " FED ID";
215  hBxDiffSysFed[i]->setAxisTitle(lbl, 1);
216  lbl.clear();
217  lbl += "BX(";
218  lbl += SysLabel[i];
219  lbl += ")-BX(";
220  lbl += refName;
221  lbl += ")";
222  hBxDiffSysFed[i]->setAxisTitle(lbl, 2);
223  }
224 
225  for (int i = 0; i < nfed_; i++) {
226  hBxOccyOneFed[i]->setAxisTitle("bx", 1);
227  lbl.clear();
228  lbl += " FED ";
229  char *ii = new char[1000];
230  std::sprintf(ii, "%d", i);
231  lbl += ii;
232  lbl += " occupancy";
233  hBxOccyOneFed[i]->setAxisTitle(lbl, 2);
234  delete[] ii;
235  }
236  for (int i = 0; i < nttype_; i++) {
237  hBxOccyGtTrigType[i]->setAxisTitle("bx", 1);
238  lbl.clear();
239  lbl += "GT occupancy for trigger type ";
240  char *ii = new char[16];
241  std::sprintf(ii, "%d", i + 1);
242  lbl += ii;
243  hBxOccyGtTrigType[i]->setAxisTitle(lbl, 2);
244  delete[] ii;
245  }
246 
247  for (int i = 0; i < NSYS; i++) {
248  for (size_t j = 0; j < listGtBits_.size(); j++) {
249  hBxOccyTrigBit[i][j]->setAxisTitle("bx", 1);
250  lbl.clear();
251  lbl += SysLabel[i];
252  lbl += " Bx occupancy for Trigger bit ";
253  char *ii = new char[10];
254  std::sprintf(ii, "%d", listGtBits_.at(j));
255  lbl += ii;
256  hBxOccyTrigBit[i][j]->setAxisTitle(lbl, 2);
257  delete[] ii;
258  }
259  }
260 }

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::bookProfile(), fedRange_, fedRef_, dqmdumpme::first, hBxDiffAllFed, hBxDiffAllFedSpread, hBxDiffSysFed, hBxOccyAllFed, hBxOccyAllFedSpread, hBxOccyGtTrigType, hBxOccyOneFed, hBxOccyTrigBit, histFolder_, mps_fire::i, cuy::ii, dqmiolumiharvest::j, listGtBits_, FEDNumbering::MAXCSCFEDID, FEDNumbering::MAXCSCTFFEDID, FEDNumbering::MAXDTFEDID, FEDNumbering::MAXDTTFFEDID, FEDNumbering::MAXECALFEDID, FEDNumbering::MAXHCALFEDID, FEDNumbering::MAXPreShowerFEDID, FEDNumbering::MAXRPCFEDID, FEDNumbering::MAXTriggerEGTPFEDID, FEDNumbering::MAXTriggerGTPFEDID, FEDNumbering::MINCSCFEDID, FEDNumbering::MINCSCTFFEDID, FEDNumbering::MINDTFEDID, FEDNumbering::MINDTTFFEDID, FEDNumbering::MINECALFEDID, FEDNumbering::MINHCALFEDID, FEDNumbering::MINPreShowerFEDID, FEDNumbering::MINRPCFEDID, FEDNumbering::MINTriggerGCTFEDID, FEDNumbering::MINTriggerGTPFEDID, nbig_, nBxDiff, nBxOccy, nfed_, norb_, nspr_, NSYS, nttype_, runInFF_, edm::second(), dqm::impl::MonitorElement::setAxisTitle(), dqm::implementation::NavigatorBase::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

◆ calcBxDiff()

int BxTiming::calcBxDiff ( int  bx1,
int  bx2 
)
private

calculates the difference (closest distance) between two bunch crossing numbers. This is similar to calculating delta phi between two vectors.

Calculates bx1 - bx2 but makes sure that the value is in the range -num_bx_per_orbit / 2 .. + num_bx_per_orbit / 2 .

Definition at line 403 of file BxTiming.cc.

403  {
404  int diff = bx1 - bx2;
405 
406  while (diff < -half_norb_)
407  diff += norb_;
408 
409  while (diff > half_norb_)
410  diff -= norb_;
411 
412  return diff;
413 }

References change_name::diff, half_norb_, and norb_.

Referenced by analyze().

◆ verbose()

int BxTiming::verbose ( )
inlineprivate

Definition at line 51 of file BxTiming.h.

51 { return verbose_; }

References verbose_.

Referenced by analyze(), and BxTiming().

Member Data Documentation

◆ fedRange_

std::pair<int, int> BxTiming::fedRange_[NSYS]
private

Definition at line 84 of file BxTiming.h.

Referenced by analyze(), and bookHistograms().

◆ fedRef_

int BxTiming::fedRef_
private

Definition at line 85 of file BxTiming.h.

Referenced by analyze(), bookHistograms(), and BxTiming().

◆ fedSource_

edm::InputTag BxTiming::fedSource_
private

Definition at line 44 of file BxTiming.h.

Referenced by analyze(), and BxTiming().

◆ fedSource_token_

edm::EDGetTokenT<FEDRawDataCollection> BxTiming::fedSource_token_
private

Definition at line 45 of file BxTiming.h.

Referenced by analyze(), and BxTiming().

◆ gtSource_

edm::InputTag BxTiming::gtSource_
private

Definition at line 46 of file BxTiming.h.

Referenced by BxTiming().

◆ gtSource_token_

edm::EDGetTokenT<L1GlobalTriggerReadoutRecord> BxTiming::gtSource_token_
private

Definition at line 47 of file BxTiming.h.

Referenced by analyze(), and BxTiming().

◆ half_norb_

const int BxTiming::half_norb_ = norb_ / 2
staticprivate

Definition at line 75 of file BxTiming.h.

Referenced by calcBxDiff().

◆ hBxDiffAllFed

MonitorElement* BxTiming::hBxDiffAllFed
private

histograms

Definition at line 93 of file BxTiming.h.

Referenced by analyze(), and bookHistograms().

◆ hBxDiffAllFedSpread

MonitorElement* BxTiming::hBxDiffAllFedSpread[nspr_]
private

Definition at line 98 of file BxTiming.h.

Referenced by analyze(), and bookHistograms().

◆ hBxDiffSysFed

MonitorElement* BxTiming::hBxDiffSysFed[NSYS]
private

Definition at line 94 of file BxTiming.h.

Referenced by analyze(), and bookHistograms().

◆ hBxOccyAllFed

MonitorElement* BxTiming::hBxOccyAllFed
private

Definition at line 95 of file BxTiming.h.

Referenced by analyze(), and bookHistograms().

◆ hBxOccyAllFedSpread

MonitorElement* BxTiming::hBxOccyAllFedSpread[nspr_]
private

Definition at line 99 of file BxTiming.h.

Referenced by analyze(), and bookHistograms().

◆ hBxOccyGtTrigType

MonitorElement* BxTiming::hBxOccyGtTrigType[nttype_]
private

Definition at line 101 of file BxTiming.h.

Referenced by analyze(), and bookHistograms().

◆ hBxOccyOneFed

MonitorElement** BxTiming::hBxOccyOneFed
private

Definition at line 96 of file BxTiming.h.

Referenced by analyze(), and bookHistograms().

◆ hBxOccyTrigBit

MonitorElement** BxTiming::hBxOccyTrigBit[NSYS]
private

Definition at line 102 of file BxTiming.h.

Referenced by analyze(), and bookHistograms().

◆ histFile_

std::string BxTiming::histFile_
private

Definition at line 65 of file BxTiming.h.

Referenced by BxTiming().

◆ histFolder_

std::string BxTiming::histFolder_
private

Definition at line 68 of file BxTiming.h.

Referenced by bookHistograms(), and BxTiming().

◆ listGtBits_

std::vector<int> BxTiming::listGtBits_
private

Definition at line 80 of file BxTiming.h.

Referenced by analyze(), bookHistograms(), and BxTiming().

◆ nbig_

const int BxTiming::nbig_ = 10000
staticprivate

Definition at line 77 of file BxTiming.h.

Referenced by bookHistograms().

◆ nBxDiff

int BxTiming::nBxDiff[FEDNumbering::MAXFEDID+1][nspr_]
private

Definition at line 89 of file BxTiming.h.

Referenced by analyze(), and bookHistograms().

◆ nBxOccy

int BxTiming::nBxOccy[FEDNumbering::MAXFEDID+1][nspr_]
private

Definition at line 90 of file BxTiming.h.

Referenced by analyze(), and bookHistograms().

◆ nEvt_

int BxTiming::nEvt_
private

Definition at line 62 of file BxTiming.h.

Referenced by analyze(), and BxTiming().

◆ norb_

const int BxTiming::norb_ = 3564
staticprivate

Definition at line 74 of file BxTiming.h.

Referenced by bookHistograms(), and calcBxDiff().

◆ nspr_

const int BxTiming::nspr_ = 3
staticprivate

Definition at line 88 of file BxTiming.h.

Referenced by analyze(), and bookHistograms().

◆ nttype_

const int BxTiming::nttype_ = 6
staticprivate

Definition at line 78 of file BxTiming.h.

Referenced by analyze(), and bookHistograms().

◆ runInFF_

bool BxTiming::runInFF_
private

Definition at line 71 of file BxTiming.h.

Referenced by analyze(), bookHistograms(), and BxTiming().

◆ verbose_

int BxTiming::verbose_
private

Definition at line 50 of file BxTiming.h.

Referenced by BxTiming(), and verbose().

change_name.diff
diff
Definition: change_name.py:13
BxTiming::nttype_
static const int nttype_
Definition: BxTiming.h:78
FEDNumbering::MINECALFEDID
Definition: FEDNumbering.h:43
mps_fire.i
i
Definition: mps_fire.py:428
BxTiming::norb_
static const int norb_
Definition: BxTiming.h:74
BxTiming::runInFF_
bool runInFF_
Definition: BxTiming.h:71
BxTiming::nEvt_
int nEvt_
Definition: BxTiming.h:62
BxTiming::fedRef_
int fedRef_
Definition: BxTiming.h:85
BxTiming::nBxOccy
int nBxOccy[FEDNumbering::MAXFEDID+1][nspr_]
Definition: BxTiming.h:90
BxTiming::gtSource_token_
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > gtSource_token_
Definition: BxTiming.h:47
gather_cfg.cout
cout
Definition: gather_cfg.py:144
BxTiming::nbig_
static const int nbig_
Definition: BxTiming.h:77
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89287
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
BxTiming::listGtBits_
std::vector< int > listGtBits_
Definition: BxTiming.h:80
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
nfed_
#define nfed_
Definition: BxTiming.h:31
BxTiming::hBxDiffAllFedSpread
MonitorElement * hBxDiffAllFedSpread[nspr_]
Definition: BxTiming.h:98
FEDNumbering::MAXCSCFEDID
Definition: FEDNumbering.h:52
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
FEDNumbering::MINPreShowerFEDID
Definition: FEDNumbering.h:31
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
BxTiming::histFolder_
std::string histFolder_
Definition: BxTiming.h:68
BxTiming::hBxOccyGtTrigType
MonitorElement * hBxOccyGtTrigType[nttype_]
Definition: BxTiming.h:101
BxTiming::hBxOccyAllFedSpread
MonitorElement * hBxOccyAllFedSpread[nspr_]
Definition: BxTiming.h:99
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
BxTiming::RPC
Definition: BxTiming.h:83
edm::Handle
Definition: AssociativeIterator.h:50
FEDNumbering::MINRPCFEDID
Definition: FEDNumbering.h:59
dqmdumpme.first
first
Definition: dqmdumpme.py:55
FEDRawData::data
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:24
FEDRawData
Definition: FEDRawData.h:19
BxTiming::hBxDiffAllFed
MonitorElement * hBxDiffAllFed
histograms
Definition: BxTiming.h:93
BxTiming::calcBxDiff
int calcBxDiff(int bx1, int bx2)
Definition: BxTiming.cc:403
FEDNumbering::MINTriggerGCTFEDID
Definition: FEDNumbering.h:65
BxTiming::DTF
Definition: BxTiming.h:83
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
BxTiming::NSYS
Definition: BxTiming.h:82
BxTiming::verbose_
int verbose_
Definition: BxTiming.h:50
dqm::implementation::IBooker::bookProfile
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:322
FEDNumbering::MAXTriggerGTPFEDID
Definition: FEDNumbering.h:62
dqmdumpme.k
k
Definition: dqmdumpme.py:60
FEDNumbering::MAXTriggerEGTPFEDID
Definition: FEDNumbering.h:64
BxTiming::gtSource_
edm::InputTag gtSource_
Definition: BxTiming.h:46
FEDRawDataCollection::FEDData
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
Definition: FEDRawDataCollection.cc:19
BxTiming::CTF
Definition: BxTiming.h:83
BxTiming::histFile_
std::string histFile_
Definition: BxTiming.h:65
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
FEDNumbering::MAXDTFEDID
Definition: FEDNumbering.h:56
BxTiming::ETP
Definition: BxTiming.h:83
L1GlobalTriggerReadoutRecord::decisionWord
const DecisionWord & decisionWord(int bxInEventValue) const
Definition: L1GlobalTriggerReadoutRecord.cc:186
createfilelist.int
int
Definition: createfilelist.py:10
iEvent
int iEvent
Definition: GenABIO.cc:224
FEDNumbering::MINCSCFEDID
Definition: FEDNumbering.h:51
FEDNumbering::MAXPreShowerFEDID
Definition: FEDNumbering.h:32
FEDNumbering::MINDTFEDID
Definition: FEDNumbering.h:55
BxTiming::nBxDiff
int nBxDiff[FEDNumbering::MAXFEDID+1][nspr_]
Definition: BxTiming.h:89
BxTiming::fedSource_
edm::InputTag fedSource_
Definition: BxTiming.h:44
BxTiming::fedSource_token_
edm::EDGetTokenT< FEDRawDataCollection > fedSource_token_
Definition: BxTiming.h:45
BxTiming::GLT
Definition: BxTiming.h:83
BxTiming::GCT
Definition: BxTiming.h:83
BxTiming::half_norb_
static const int half_norb_
Definition: BxTiming.h:75
FEDNumbering::MINDTTFFEDID
Definition: FEDNumbering.h:57
BxTiming::CTP
Definition: BxTiming.h:83
dqm::impl::MonitorElement::setBinContent
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
Definition: MonitorElement.cc:691
BxTiming::fedRange_
std::pair< int, int > fedRange_[NSYS]
Definition: BxTiming.h:84
FEDNumbering::MAXCSCTFFEDID
Definition: FEDNumbering.h:54
FEDNumbering::MAXDTTFFEDID
Definition: FEDNumbering.h:58
FEDNumbering::MINHCALFEDID
Definition: FEDNumbering.h:47
BxTiming::nspr_
static const int nspr_
Definition: BxTiming.h:88
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
BxTiming::hBxOccyAllFed
MonitorElement * hBxOccyAllFed
Definition: BxTiming.h:95
BxTiming::hBxOccyOneFed
MonitorElement ** hBxOccyOneFed
Definition: BxTiming.h:96
RecoTauValidation_cfi.header
header
Definition: RecoTauValidation_cfi.py:292
FEDNumbering::MAXRPCFEDID
Definition: FEDNumbering.h:60
BxTiming::verbose
int verbose()
Definition: BxTiming.h:51
FEDNumbering::MINCSCTFFEDID
Definition: FEDNumbering.h:53
FEDNumbering::MAXHCALFEDID
Definition: FEDNumbering.h:48
BxTiming::PS
Definition: BxTiming.h:83
BxTiming::hBxOccyTrigBit
MonitorElement ** hBxOccyTrigBit[NSYS]
Definition: BxTiming.h:102
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
FEDHeader
Definition: FEDHeader.h:14
BxTiming::hBxDiffSysFed
MonitorElement * hBxDiffSysFed[NSYS]
Definition: BxTiming.h:94
dqm::impl::MonitorElement::setAxisTitle
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:800
cuy.ii
ii
Definition: cuy.py:590
edm::InputTag
Definition: InputTag.h:15
FEDNumbering::MAXECALFEDID
Definition: FEDNumbering.h:44
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
BxTiming::DTP
Definition: BxTiming.h:83
FEDNumbering::MAXFEDID
Definition: FEDNumbering.h:26
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
BxTiming::HTP
Definition: BxTiming.h:83
FEDNumbering::MINTriggerGTPFEDID
Definition: FEDNumbering.h:61