CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/DQMOffline/Trigger/interface/FourVectorHLTClient.h

Go to the documentation of this file.
00001 #ifndef FOURVECTORHLTCLIENT_H
00002 #define FOURVECTORHLTCLIENT_H
00003 /*
00004 
00005    source for module FourVectorHLTClient
00006    author:  Vladimir Rekovic, U Minn. 
00007    version: 01
00008    date:  28 Oct 2008
00009 */
00010 //$Id: FourVectorHLTClient.h,v 1.11 2011/06/15 16:22:47 bjk Exp $
00011 
00012 #include "FWCore/Framework/interface/Frameworkfwd.h"
00013 #include "FWCore/Framework/interface/Event.h"
00014 #include "FWCore/Framework/interface/MakerMacros.h"
00015 #include <FWCore/Framework/interface/EDAnalyzer.h>
00016 #include "DQMServices/Core/interface/DQMStore.h"
00017 #include "DQMServices/Core/interface/MonitorElement.h"
00018 #include "HLTrigger/HLTcore/interface/HLTConfigProvider.h"
00019 
00020 #include <memory>
00021 #include <iostream>
00022 #include <fstream>
00023 #include <string>
00024 #include <vector>
00025 #include <map>
00026 #include <TH1F.h>
00027 #include <TH2F.h>
00028 #include <TProfile2D.h>
00029 
00030 
00031 class FourVectorHLTClient: public edm::EDAnalyzer {
00032 
00033 public:
00034 
00036   FourVectorHLTClient(const edm::ParameterSet& ps);
00037   
00039   virtual ~FourVectorHLTClient();
00040  
00041 protected:
00042 
00044   void beginJob();
00045 
00047   void beginRun(const edm::Run& r, const edm::EventSetup& c);
00048 
00050   void analyze(const edm::Event& e, const edm::EventSetup& c) ;
00051 
00052   void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg, 
00053                             const edm::EventSetup& context) ;
00054 
00056   void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg, 
00057                           const edm::EventSetup& c);
00058 
00060   void endRun(const edm::Run& r, const edm::EventSetup& c);
00061 
00063   void endJob();
00064 
00065   void normalizeHLTMatrix();
00066 
00067 private:
00068 
00069   void initialize();
00070   void calculateRatio(TH1F* effHist, TH1F* denHist); 
00071   TString removeVersions(TString histVersion);
00072 
00073   TH1F * get1DHisto(std::string meName, DQMStore * dbi);
00074   TH2F * get2DHisto(std::string meName, DQMStore * dbi);
00075   TProfile2D * get2DProfile(std::string meName, DQMStore * dbi);
00076   TProfile * get1DProfile(std::string meName, DQMStore * dbi);
00077   edm::ParameterSet parameters_;
00078 
00079   // -------- member data --------
00080   DQMStore* dbe_;  
00081   TString sourceDir_;
00082   TString clientDir_;
00083   TString customEffDir_;
00084   std::string processname_;
00085 
00086   std::vector<TString> hltMEName; // names of all MEs (histos)
00087   std::vector<TString> hltPathName; // names of hlt paths from MEs (histos)
00088   //TObjArray* hltPathNameColl; // duplicate of the above, more robust
00089   std::vector<MonitorElement*> hltMEs;
00090         std::vector<std::pair<std::string, std::string> > custompathnamepairs_;
00091 
00092   std::vector<MonitorElement*> v_ME_HLTPassPass_;
00093   std::vector<MonitorElement*> v_ME_HLTPassPass_Normalized_;
00094   std::vector<MonitorElement*> v_ME_HLTPass_Normalized_Any_;
00095 
00096   std::string pathsSummaryFolder_ ;
00097   std::string pathsSummaryHLTCorrelationsFolder_ ;
00098   std::string pathsSummaryFilterCountsFolder_ ;
00099   std::string pathsSummaryFilterEfficiencyFolder_ ;
00100 
00101   int counterLS_;      
00102   int counterEvt_;     
00103   int prescaleLS_;     
00104   int prescaleEvt_;    
00105   int nChannels;
00106   Float_t reportSummary;
00107   Float_t summarySum;
00108   Float_t summaryContent[20];
00109 
00110   HLTConfigProvider hltConfig_;
00111   MonitorElement * reportSummary_;
00112   MonitorElement * reportSummaryContent_[20];
00113   MonitorElement * reportSummaryMap_;
00114   MonitorElement * testHLTEff_;
00115   MonitorElement * klmgrvTest_;
00116 
00117 
00118 };
00119 
00120 #endif