CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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>
20 // dqm includes
23 //dataFormats
29 
30 
31 class BxTiming : public edm::EDAnalyzer {
32 
33  public:
34 
35  explicit BxTiming(const edm::ParameterSet&);
36  ~BxTiming();
37 
38  protected:
39 
40  virtual void beginJob(void) ;
41  virtual void beginRun(edm::Run const& iRun, edm::EventSetup const& iSetup);
42  virtual void analyze(const edm::Event&, const edm::EventSetup&);
43  virtual void endJob() ;
44 
45  private:
46 
47  // input
52 
53  // debug verbose level
54  int verbose_;
55  int verbose() {return verbose_;}
56 
63  int calcBxDiff(int bx1, int bx2);
64 
65  // counters
66  int nEvt_;
67 
68  // root output file name
70 
71  // dqm histogram folder
73 
74  // dqm common
76 
77  // running in filter farm? (use reduced set of me's)
78  bool runInFF_;
79 
80  // readout l1 systems
81  static const int norb_ = 3564; // bx per orbit
82  static const int half_norb_ = norb_ / 2; // for calculating the difference between two BX numbers
83 
84  static const int nbig_ = 10000; // larger than bx spread
85  static const int nttype_ = 6; // number of trigger types (physics, cal,...)
86 
87  std::vector<int> listGtBits_; // selected gt bit numbers for synch monitoring
88 
89  enum nsys {NSYS=10};
90  enum syslist {PS=0, ETP, HTP, GCT, CTP, CTF, DTP, DTF, RPC, GLT};
91  std::pair<int,int> fedRange_[NSYS];
92  int nfed_; // number of feds
93  int fedRef_; // reference fed
94 
95  // bx spread counters
96  static const int nspr_=3; // delta, min, max
97  int nBxDiff[1500][nspr_];
98  int nBxOccy[1500][nspr_];
99 
101  MonitorElement* hBxDiffAllFed; // bx shift wrt reference fed, for all feds
102  MonitorElement* hBxDiffSysFed[NSYS]; // bx shift wrt reference fed, per subsystem
103  MonitorElement* hBxOccyAllFed; // bx occupancy, for all fed's
104  MonitorElement**hBxOccyOneFed; // bx occupancy, per each fed
105 
106  MonitorElement* hBxDiffAllFedSpread[nspr_]; // bx shift wrt ref fed: mean shift, min, max
107  MonitorElement* hBxOccyAllFedSpread[nspr_]; // bx occupancy: mean shift, min, max
108 
109  MonitorElement* hBxOccyGtTrigType[nttype_]; // gt bx occupancy per trigger type
110  MonitorElement**hBxOccyTrigBit[NSYS]; // subsystem bx occupancy per selected trigger bit
111 
112 };
113 
114 #endif
static const int nttype_
Definition: BxTiming.h:85
static const int norb_
Definition: BxTiming.h:81
DQMStore * dbe
Definition: BxTiming.h:75
MonitorElement * hBxDiffAllFed
histograms
Definition: BxTiming.h:101
MonitorElement * hBxDiffAllFedSpread[nspr_]
Definition: BxTiming.h:106
std::vector< int > listGtBits_
Definition: BxTiming.h:87
int verbose()
Definition: BxTiming.h:55
std::string histFile_
Definition: BxTiming.h:69
MonitorElement * hBxOccyAllFed
Definition: BxTiming.h:103
MonitorElement ** hBxOccyOneFed
Definition: BxTiming.h:104
static const int nbig_
Definition: BxTiming.h:84
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > gtSource_token_
Definition: BxTiming.h:51
int nBxOccy[1500][nspr_]
Definition: BxTiming.h:98
virtual void beginJob(void)
Definition: BxTiming.cc:66
MonitorElement * hBxOccyGtTrigType[nttype_]
Definition: BxTiming.h:109
int nEvt_
Definition: BxTiming.h:66
int verbose_
Definition: BxTiming.h:54
int nBxDiff[1500][nspr_]
Definition: BxTiming.h:97
virtual void beginRun(edm::Run const &iRun, edm::EventSetup const &iSetup)
Definition: BxTiming.cc:78
static const int half_norb_
Definition: BxTiming.h:82
edm::InputTag fedSource_
Definition: BxTiming.h:48
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Definition: BxTiming.cc:263
bool runInFF_
Definition: BxTiming.h:78
std::string histFolder_
Definition: BxTiming.h:72
edm::InputTag gtSource_
Definition: BxTiming.h:50
edm::EDGetTokenT< FEDRawDataCollection > fedSource_token_
Definition: BxTiming.h:49
int fedRef_
Definition: BxTiming.h:93
MonitorElement * hBxDiffSysFed[NSYS]
Definition: BxTiming.h:102
MonitorElement ** hBxOccyTrigBit[NSYS]
Definition: BxTiming.h:110
int nfed_
Definition: BxTiming.h:92
int calcBxDiff(int bx1, int bx2)
Definition: BxTiming.cc:414
virtual void endJob()
Definition: BxTiming.cc:248
std::pair< int, int > fedRange_[NSYS]
Definition: BxTiming.h:91
MonitorElement * hBxOccyAllFedSpread[nspr_]
Definition: BxTiming.h:107
~BxTiming()
Definition: BxTiming.cc:63
BxTiming(const edm::ParameterSet &)
Definition: BxTiming.cc:4
static const int nspr_
Definition: BxTiming.h:96
Definition: Run.h:41