CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/DQM/DTMonitorModule/src/DTLocalTriggerBaseTask.h

Go to the documentation of this file.
00001 #ifndef DTLocalTriggerBaseTask_H
00002 #define DTLocalTriggerBaseTask_H
00003 
00004 /*
00005  * \file DTLocalTriggerBaseTask.h
00006  *
00007  * $Date: 2011/06/10 13:23:26 $
00008  * $Revision: 1.1 $
00009  * \author C. Battilana - CIEMAT
00010  *
00011 */
00012 
00013 #include "FWCore/Framework/interface/Frameworkfwd.h"
00014 #include "FWCore/Framework/interface/EDAnalyzer.h"
00015 #include "DataFormats/Common/interface/Handle.h"
00016 #include "FWCore/Framework/interface/ESHandle.h"
00017 #include <FWCore/Framework/interface/LuminosityBlock.h>
00018 
00019 #include "FWCore/Framework/interface/Event.h"
00020 #include "FWCore/Framework/interface/MakerMacros.h"
00021 
00022 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00023 
00024 #include "DQMServices/Core/interface/DQMStore.h"
00025 #include "DQMServices/Core/interface/MonitorElement.h"
00026 #include "FWCore/ServiceRegistry/interface/Service.h"
00027 
00028 #include "DataFormats/DTDigi/interface/DTLocalTriggerCollection.h"
00029 
00030 #include <vector>
00031 #include <string>
00032 #include <map>
00033 
00034 class DTGeometry;
00035 class DTTrigGeomUtils;
00036 class DTChamberId;
00037 class DTRecSegment4D;
00038 class L1MuDTChambPhDigi;
00039 class L1MuDTChambThDigi;
00040 class DTTPGCompareUnit;
00041 class DTTimeEvolutionHisto;
00042 
00043 class DTLocalTriggerBaseTask: public edm::EDAnalyzer{
00044   
00045   friend class DTMonitorModule;
00046   
00047  public:
00048   
00050   DTLocalTriggerBaseTask(const edm::ParameterSet& ps );
00051   
00053   virtual ~DTLocalTriggerBaseTask();
00054   
00055  protected:
00056   
00057   // BeginJob
00058   void beginJob();
00059 
00061   void beginRun(const edm::Run& , const edm::EventSetup&);
00062 
00064   void analyze(const edm::Event& e, const edm::EventSetup& c);
00065 
00067   void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& context) ;
00068 
00070   void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& context) ;
00071   
00073   void endJob(void);
00074   
00075  private:
00076 
00078   void runDCCAnalysis(std::vector<L1MuDTChambPhDigi>* phTrigs, std::vector<L1MuDTChambThDigi>* thTrigs);
00079 
00081   void runDDUAnalysis(edm::Handle<DTLocalTriggerCollection>& trigsDDU);
00082 
00084   void runDDUvsDCCAnalysis();
00085 
00087   std::string& topFolder(std::string type) { return baseFolder[type == "DCC"]; }
00088   
00090   void bookHistos(const DTChamberId& chamb);
00091 
00093   void bookHistos(int wh);
00094   
00096   void setQLabels(MonitorElement* me, short int iaxis);
00097 
00098   int nEvents;
00099   int nEventsInLS;
00100   int nLumis;
00101   
00102   std::string baseFolder[2];
00103   bool tpMode;
00104   bool detailedAnalysis;
00105   bool processDCC;
00106   bool processDDU;
00107 
00108   int targetBXDDU;
00109   int targetBXDCC;
00110   int bestAccRange;
00111   
00112   DQMStore* theDQMStore;
00113   edm::ParameterSet theParams;
00114   DTTrigGeomUtils* theTrigGeomUtils;
00115   std::vector<std::string> theTypes;
00116 
00117   std::map<uint32_t,DTTPGCompareUnit> theCompMap;
00118   std::map<int,std::map<std::string,MonitorElement*> > wheelHistos;
00119   std::map<uint32_t,std::map<std::string,MonitorElement*> > chamberHistos;
00120   std::map<uint32_t,DTTimeEvolutionHisto* > trendHistos;
00121   MonitorElement* nEventMonitor;
00122 
00123 };
00124 
00125 #endif