CMS 3D CMS Logo

BxTiming.h

Go to the documentation of this file.
00001 #ifndef BxTiming_H
00002 #define BxTiming_H
00003 
00004 /*\class BxTiming
00005  *\description common FED timing DQM module
00006  *\author N.Leonardo, A.Holzner, T.Christiansen, I.Mikulec
00007  *\date 08.03
00008  */
00009 
00010 // system, common includes
00011 #include <memory>
00012 #include <string>
00013 #include "FWCore/ServiceRegistry/interface/Service.h"
00014 #include "FWCore/Framework/interface/Frameworkfwd.h"
00015 #include "FWCore/Framework/interface/EDAnalyzer.h"
00016 #include "FWCore/Framework/interface/Event.h"
00017 #include "FWCore/Framework/interface/MakerMacros.h"
00018 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00019 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00020 // dqm includes
00021 #include "DQMServices/Core/interface/DQMStore.h"
00022 #include "DQMServices/Core/interface/MonitorElement.h"
00023 
00024 
00025 class BxTiming : public edm::EDAnalyzer {
00026 
00027  public:
00028 
00029   explicit BxTiming(const edm::ParameterSet&);
00030   ~BxTiming();
00031 
00032  protected:
00033 
00034   virtual void beginJob(const edm::EventSetup&) ;
00035   virtual void analyze(const edm::Event&, const edm::EventSetup&);
00036   virtual void endJob() ;
00037 
00038  private:
00039 
00040   // input
00041   edm::InputTag fedSource_;
00042   edm::InputTag gtSource_;
00043 
00044   // debug verbose level
00045   int verbose_;
00046   int verbose() {return verbose_;}
00047 
00054   int calcBxDiff(int bx1, int bx2);
00055 
00056   // counters
00057   int nEvt_;
00058 
00059   // root output file name
00060   std::string histFile_;
00061 
00062   // dqm histogram folder
00063   std::string histFolder_;
00064 
00065   // dqm common
00066   DQMStore* dbe;
00067  
00068   // running in filter farm? (use reduced set of me's)
00069   bool runInFF_;
00070 
00071   // readout l1 systems
00072   static const int norb_ = 3564;  // bx per orbit
00073   static const int half_norb_ = norb_ / 2; // for calculating the difference between two BX numbers
00074 
00075   static const int nbig_ = 10000; // larger than bx spread
00076   static const int nttype_ = 6;   // number of trigger types (physics, cal,...)
00077 
00078   std::vector<int>  listGtBits_;  // selected gt bit numbers for synch monitoring
00079 
00080   enum nsys {NSYS=9};
00081   enum syslist {ETP=0, HTP, GCT, CTP, CTF, DTP, DTF, RPC, GLT};
00082   std::pair<int,int> fedRange_[NSYS];
00083   int nfed_;   // number of feds
00084   int fedRef_; // reference fed
00085 
00086   // bx spread counters
00087   static const int nspr_=3; // delta, min, max  
00088   int nBxDiff[1500][nspr_];
00089   int nBxOccy[1500][nspr_];
00090 
00092   MonitorElement* hBxDiffAllFed;              // bx shift wrt reference fed, for all feds
00093   MonitorElement* hBxDiffSysFed[NSYS];        // bx shift wrt reference fed, per subsystem
00094   MonitorElement* hBxOccyAllFed;              // bx occupancy, for all fed's
00095   MonitorElement**hBxOccyOneFed;              // bx occupancy, per each fed
00096                                               
00097   MonitorElement* hBxDiffAllFedSpread[nspr_]; // bx shift wrt ref fed: mean shift, min, max
00098   MonitorElement* hBxOccyAllFedSpread[nspr_]; // bx occupancy: mean shift, min, max
00099 
00100   MonitorElement* hBxOccyGtTrigType[nttype_]; // gt bx occupancy per trigger type
00101   MonitorElement**hBxOccyTrigBit[NSYS];       // subsystem bx occupancy per selected trigger bit 
00102 
00103 };
00104 
00105 #endif

Generated on Tue Jun 9 17:33:09 2009 for CMSSW by  doxygen 1.5.4