00001 #ifndef CommonTools_TriggerUtils_PrescaleWeightProvider_h 00002 #define CommonTools_TriggerUtils_PrescaleWeightProvider_h 00003 00004 00005 // -*- C++ -*- 00006 // 00007 // Package: CommonTools/TriggerUtils 00008 // Class: PrescaleWeightProvider 00009 // 00010 // $Id: PrescaleWeightProvider.h,v 1.1 2010/08/23 18:44:13 avetisya Exp $ 00011 // 00026 #include <vector> 00027 #include <string> 00028 00029 #include "FWCore/Framework/interface/Run.h" 00030 #include "FWCore/Framework/interface/Event.h" 00031 #include "FWCore/Framework/interface/EventSetup.h" 00032 00033 #include "HLTrigger/HLTcore/interface/HLTConfigProvider.h" 00034 #include "DataFormats/L1GlobalTrigger/interface/L1GtTriggerMenuLite.h" 00035 00036 00037 class PrescaleWeightProvider { 00038 00039 bool configured_; 00040 bool init_; 00041 HLTConfigProvider hltConfig_; 00042 edm::Handle< L1GtTriggerMenuLite > triggerMenuLite_; 00043 00044 std::vector< std::string > l1SeedPaths_; 00045 00046 // configuration parameters 00047 unsigned verbosity_; // optional (default: 0) 00048 edm::InputTag triggerResults_; // optional (default: "TriggerResults::HLT") 00049 edm::InputTag l1GtTriggerMenuLite_; // optional (default: "l1GtTriggerMenuLite") 00050 std::vector< std::string > hltPaths_; 00051 00052 public: 00053 00054 PrescaleWeightProvider( const edm::ParameterSet & config ); // to be called from the ED module's c'tor 00055 ~PrescaleWeightProvider() {} 00056 00057 void initRun( const edm::Run & run, const edm::EventSetup & setup ); // to be called from the ED module's beginRun() method 00058 int prescaleWeight ( const edm::Event & event, const edm::EventSetup & setup ); // to be called from the ED module's event loop method 00059 00060 private: 00061 00062 void parseL1Seeds( const std::string & l1Seeds ); 00063 00064 }; 00065 00066 00067 #endif