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