CMS 3D CMS Logo

BxTiming.h
Go to the documentation of this file.
1 #ifndef BxTiming_H
2 #define BxTiming_H
3 
4 /*\class BxTiming
5  *\description common FED timing DQM module
6  *\author N.Leonardo, A.Holzner, T.Christiansen, I.Mikulec
7  *\date 08.03
8  */
9 
10 // system, common includes
11 #include <memory>
12 #include <string>
19 // dqm includes
21 //dataFormats
29 
30 #define nfed_ FEDNumbering::MAXFEDID + 1
31 
32 class BxTiming : public DQMEDAnalyzer {
33 public:
34  explicit BxTiming(const edm::ParameterSet&);
35  ~BxTiming() override;
36 
37 protected:
38  void analyze(const edm::Event&, const edm::EventSetup&) override;
39  void bookHistograms(DQMStore::IBooker& ibooker, edm::Run const&, edm::EventSetup const&) override;
40 
41 private:
42  // input
47 
48  // debug verbose level
49  int verbose_;
50  int verbose() { return verbose_; }
51 
58  int calcBxDiff(int bx1, int bx2);
59 
60  // counters
61  int nEvt_;
62 
63  // root output file name
65 
66  // dqm histogram folder
68 
69  // running in filter farm? (use reduced set of me's)
70  bool runInFF_;
71 
72  // readout l1 systems
73  static const int norb_ = 3564; // bx per orbit
74  static const int half_norb_ = norb_ / 2; // for calculating the difference between two BX numbers
75 
76  static const int nbig_ = 10000; // larger than bx spread
77  static const int nttype_ = 6; // number of trigger types (physics, cal,...)
78 
79  std::vector<int> listGtBits_; // selected gt bit numbers for synch monitoring
80 
81  enum nsys { NSYS = 10 };
82  enum syslist { PS = 0, ETP, HTP, GCT, CTP, CTF, DTP, DTF, RPC, GLT };
83  std::pair<int, int> fedRange_[NSYS];
84  int fedRef_; // reference fed
85 
86  // bx spread counters
87  static const int nspr_ = 3; // delta, min, max
90 
92  MonitorElement* hBxDiffAllFed; // bx shift wrt reference fed, for all feds
93  MonitorElement* hBxDiffSysFed[NSYS]; // bx shift wrt reference fed, per subsystem
94  MonitorElement* hBxOccyAllFed; // bx occupancy, for all fed's
95  MonitorElement** hBxOccyOneFed; // bx occupancy, per each fed
96 
97  MonitorElement* hBxDiffAllFedSpread[nspr_]; // bx shift wrt ref fed: mean shift, min, max
98  MonitorElement* hBxOccyAllFedSpread[nspr_]; // bx occupancy: mean shift, min, max
99 
100  MonitorElement* hBxOccyGtTrigType[nttype_]; // gt bx occupancy per trigger type
101  MonitorElement** hBxOccyTrigBit[NSYS]; // subsystem bx occupancy per selected trigger bit
102 };
103 
104 #endif
~BxTiming() override
Definition: BxTiming.cc:47
static const int nttype_
Definition: BxTiming.h:77
static const int norb_
Definition: BxTiming.h:73
MonitorElement * hBxDiffAllFed
histograms
Definition: BxTiming.h:92
int nBxOccy[FEDNumbering::MAXFEDID+1][nspr_]
Definition: BxTiming.h:89
MonitorElement * hBxDiffAllFedSpread[nspr_]
Definition: BxTiming.h:97
std::vector< int > listGtBits_
Definition: BxTiming.h:79
int verbose()
Definition: BxTiming.h:50
#define nfed_
Definition: BxTiming.h:30
std::string histFile_
Definition: BxTiming.h:64
MonitorElement * hBxOccyAllFed
Definition: BxTiming.h:94
MonitorElement ** hBxOccyOneFed
Definition: BxTiming.h:95
static const int nbig_
Definition: BxTiming.h:76
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > gtSource_token_
Definition: BxTiming.h:46
MonitorElement * hBxOccyGtTrigType[nttype_]
Definition: BxTiming.h:100
int nEvt_
Definition: BxTiming.h:61
int verbose_
Definition: BxTiming.h:49
static const int half_norb_
Definition: BxTiming.h:74
edm::InputTag fedSource_
Definition: BxTiming.h:43
std::pair< int, int > fedRange_[NSYS]
Definition: BxTiming.h:83
bool runInFF_
Definition: BxTiming.h:70
std::string histFolder_
Definition: BxTiming.h:67
edm::InputTag gtSource_
Definition: BxTiming.h:45
void bookHistograms(DQMStore::IBooker &ibooker, edm::Run const &, edm::EventSetup const &) override
Definition: BxTiming.cc:49
edm::EDGetTokenT< FEDRawDataCollection > fedSource_token_
Definition: BxTiming.h:44
int fedRef_
Definition: BxTiming.h:84
MonitorElement * hBxDiffSysFed[NSYS]
Definition: BxTiming.h:93
MonitorElement ** hBxOccyTrigBit[NSYS]
Definition: BxTiming.h:101
int calcBxDiff(int bx1, int bx2)
Definition: BxTiming.cc:385
int nBxDiff[FEDNumbering::MAXFEDID+1][nspr_]
Definition: BxTiming.h:88
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: BxTiming.cc:245
MonitorElement * hBxOccyAllFedSpread[nspr_]
Definition: BxTiming.h:98
BxTiming(const edm::ParameterSet &)
Definition: BxTiming.cc:4
static const int nspr_
Definition: BxTiming.h:87
Definition: Run.h:45