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 245 of file BxTiming.cc.

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

References l1GtPatternGenerator_cfi::bx, calcBxDiff(), gather_cfg::cout, FEDRawData::data(), data, L1GlobalTriggerReadoutRecord::decisionWord(), FEDRawDataCollection::FEDData(), fedRange_, fedRef_, fedSource_, fedSource_token_, dqm::impl::MonitorElement::Fill(), 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  lbl += std::to_string(i);
147  hBxOccyOneFed[i] = ibooker.book1D(lbl.data(), lbl.data(), norb_ + 1, -0.5, norb_ + 0.5);
148  }
149 
150  ibooker.setCurrentFolder(histFolder_);
151  for (int i = 0; i < nttype_; i++) {
152  lbl.clear();
153  lbl += "BxOccyGtTrigType";
154  lbl += std::to_string(i + 1);
155  hBxOccyGtTrigType[i] = ibooker.book1D(lbl.data(), lbl.data(), norb_ + 1, -0.5, norb_ + 0.5);
156  }
157 
158  ibooker.setCurrentFolder(histFolder_ + "/SingleBit");
159  for (int i = 0; i < NSYS; i++) {
160  hBxOccyTrigBit[i] = new MonitorElement *[listGtBits_.size()];
161  for (size_t j = 0; j < listGtBits_.size(); j++) {
162  lbl.clear();
163  lbl += SysLabel[i];
164  lbl += "BxOccyGtBit";
165  lbl += std::to_string(listGtBits_.at(j));
166  hBxOccyTrigBit[i][j] = ibooker.book1D(lbl.data(), lbl.data(), norb_ + 1, -0.5, norb_ + 0.5);
167  }
168  }
169  }
170 
172  hBxDiffAllFed->setAxisTitle("FED ID", 1);
173  lbl.clear();
174  lbl += "BX(fed)-BX(";
175  lbl += refName;
176  lbl += ")";
177  hBxDiffAllFed->setAxisTitle(lbl, 2);
178  for (int i = 0; i < nspr_; i++) {
179  lbl.clear();
180  lbl += "BX(fed)-BX(";
181  lbl += refName;
182  lbl += ") " + spreadLabel[i];
183  hBxDiffAllFedSpread[i]->setAxisTitle("FED ID", 1);
185  lbl.clear();
186  lbl += "Bx FED occupancy";
187  lbl += " ";
188  lbl += spreadLabel[i];
189  hBxOccyAllFedSpread[i]->setAxisTitle("FED ID", 1);
191  }
192 
193  hBxOccyAllFed->setAxisTitle("bx", 1);
194  lbl.clear();
195  lbl += "Combined FED occupancy";
196  hBxOccyAllFed->setAxisTitle(lbl, 2);
197 
198  // skip next if running in filter farm
199  if (runInFF_)
200  return;
201 
202  for (int i = 0; i < NSYS; i++) {
203  lbl.clear();
204  lbl += SysLabel[i];
205  lbl += " FED ID";
206  hBxDiffSysFed[i]->setAxisTitle(lbl, 1);
207  lbl.clear();
208  lbl += "BX(";
209  lbl += SysLabel[i];
210  lbl += ")-BX(";
211  lbl += refName;
212  lbl += ")";
213  hBxDiffSysFed[i]->setAxisTitle(lbl, 2);
214  }
215 
216  for (int i = 0; i < nfed_; i++) {
217  hBxOccyOneFed[i]->setAxisTitle("bx", 1);
218  lbl.clear();
219  lbl += " FED ";
220  lbl += std::to_string(i);
221  lbl += " occupancy";
222  hBxOccyOneFed[i]->setAxisTitle(lbl, 2);
223  }
224  for (int i = 0; i < nttype_; i++) {
225  hBxOccyGtTrigType[i]->setAxisTitle("bx", 1);
226  lbl.clear();
227  lbl += "GT occupancy for trigger type ";
228  lbl += std::to_string(i + 1);
229  hBxOccyGtTrigType[i]->setAxisTitle(lbl, 2);
230  }
231 
232  for (int i = 0; i < NSYS; i++) {
233  for (size_t j = 0; j < listGtBits_.size(); j++) {
234  hBxOccyTrigBit[i][j]->setAxisTitle("bx", 1);
235  lbl.clear();
236  lbl += SysLabel[i];
237  lbl += " Bx occupancy for Trigger bit ";
238  lbl += std::to_string(listGtBits_.at(j));
239  hBxOccyTrigBit[i][j]->setAxisTitle(lbl, 2);
240  }
241  }
242 }

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::bookProfile(), fedRange_, fedRef_, first, hBxDiffAllFed, hBxDiffAllFedSpread, hBxDiffSysFed, hBxOccyAllFed, hBxOccyAllFedSpread, hBxOccyGtTrigType, hBxOccyOneFed, hBxOccyTrigBit, histFolder_, mps_fire::i, 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 385 of file BxTiming.cc.

385  {
386  int diff = bx1 - bx2;
387 
388  while (diff < -half_norb_)
389  diff += norb_;
390 
391  while (diff > half_norb_)
392  diff -= norb_;
393 
394  return diff;
395 }

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:89281
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:462
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< FEDRawDataCollection >
FEDNumbering::MINRPCFEDID
Definition: FEDNumbering.h:59
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:385
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
first
auto first
Definition: CAHitNtupletGeneratorKernelsImpl.h:112
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