Go to the documentation of this file.00001 #ifndef PhysicsTools_PatAlgos_PATTriggerProducer_h
00002 #define PhysicsTools_PatAlgos_PATTriggerProducer_h
00003
00004
00005
00006
00007
00008
00009
00010
00011
00040 #include "FWCore/Framework/interface/Frameworkfwd.h"
00041 #include "FWCore/Framework/interface/EDProducer.h"
00042
00043 #include <string>
00044
00045 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00046 #include "FWCore/Utilities/interface/InputTag.h"
00047
00048 #include "L1Trigger/GlobalTriggerAnalyzer/interface/L1GtUtils.h"
00049 #include "HLTrigger/HLTcore/interface/HLTConfigProvider.h"
00050
00051 namespace pat {
00052
00053 class PATTriggerProducer : public edm::EDProducer {
00054
00055 public:
00056
00057 explicit PATTriggerProducer( const edm::ParameterSet & iConfig );
00058 ~PATTriggerProducer() {};
00059
00060 private:
00061
00062 virtual void beginRun( edm::Run & iRun, const edm::EventSetup & iSetup );
00063 virtual void beginLuminosityBlock( edm::LuminosityBlock & iLuminosityBlock, const edm::EventSetup & iSetup );
00064 virtual void produce( edm::Event & iEvent, const edm::EventSetup & iSetup );
00065
00066 std::string nameProcess_;
00067 bool autoProcessName_;
00068 bool onlyStandAlone_;
00069 bool firstInRun_;
00070
00071 L1GtUtils l1GtUtils_;
00072 edm::ParameterSet * l1PSet_;
00073 bool addL1Algos_;
00074 edm::InputTag tagL1GlobalTriggerObjectMaps_;
00075 edm::InputTag tagL1ExtraMu_;
00076 edm::InputTag tagL1ExtraNoIsoEG_;
00077 edm::InputTag tagL1ExtraIsoEG_;
00078 edm::InputTag tagL1ExtraCenJet_;
00079 edm::InputTag tagL1ExtraForJet_;
00080 edm::InputTag tagL1ExtraTauJet_;
00081 edm::InputTag tagL1ExtraETM_;
00082 edm::InputTag tagL1ExtraHTM_;
00083 bool autoProcessNameL1ExtraMu_;
00084 bool autoProcessNameL1ExtraNoIsoEG_;
00085 bool autoProcessNameL1ExtraIsoEG_;
00086 bool autoProcessNameL1ExtraCenJet_;
00087 bool autoProcessNameL1ExtraForJet_;
00088 bool autoProcessNameL1ExtraTauJet_;
00089 bool autoProcessNameL1ExtraETM_;
00090 bool autoProcessNameL1ExtraHTM_;
00091 bool mainBxOnly_;
00092 bool saveL1Refs_;
00093
00094 HLTConfigProvider hltConfig_;
00095 bool hltConfigInit_;
00096 edm::InputTag tagTriggerResults_;
00097 edm::InputTag tagTriggerEvent_;
00098 std::string hltPrescaleLabel_;
00099 std::string labelHltPrescaleTable_;
00100 trigger::HLTPrescaleTable hltPrescaleTableRun_;
00101 trigger::HLTPrescaleTable hltPrescaleTableLumi_;
00102 bool addPathModuleLabels_;
00103 std::vector< std::string > exludeCollections_;
00104
00105 class ModuleLabelToPathAndFlags {
00106 public:
00107 struct PathAndFlags {
00108 PathAndFlags(const std::string &name, unsigned int index, bool last, bool l3) : pathName(name), pathIndex(index), lastFilter(last), l3Filter(l3) {}
00109 PathAndFlags() {}
00110 std::string pathName;
00111 unsigned int pathIndex;
00112 bool lastFilter;
00113 bool l3Filter;
00114 };
00115 void init(const HLTConfigProvider &conf) ;
00116 void clear() { map_.clear(); }
00117 const std::vector<PathAndFlags> & operator[](const std::string & filter) const {
00118 std::map<std::string,std::vector<PathAndFlags> >::const_iterator it = map_.find(filter);
00119 return (it == map_.end() ? empty_ : it->second);
00120 }
00121 private:
00122 void insert(const std::string & filter, const std::string &path, unsigned int pathIndex, bool lastFilter, bool l3Filter) {
00123 map_[filter].push_back(PathAndFlags(path, pathIndex, lastFilter, l3Filter));
00124 }
00125 std::map<std::string,std::vector<PathAndFlags> > map_;
00126 const std::vector<PathAndFlags> empty_;
00127 };
00128 ModuleLabelToPathAndFlags moduleLabelToPathAndFlags_;
00129
00130 };
00131 }
00132
00133
00134 #endif