CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
EgHLTOfflineSource Class Reference

#include <EgHLTOfflineSource.h>

Inheritance diagram for EgHLTOfflineSource:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

void addEleTrigPath (const std::string &name)
 
void addPhoTrigPath (const std::string &name)
 
virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob ()
 
virtual void beginRun (const edm::Run &run, const edm::EventSetup &c)
 
 EgHLTOfflineSource (const edm::ParameterSet &)
 
virtual void endJob ()
 
virtual void endRun (const edm::Run &run, const edm::EventSetup &c)
 
void filterTriggers (const HLTConfigProvider &hltConfig)
 
void getHLTFilterNamesUsed (std::vector< std::string > &filterNames) const
 
virtual ~EgHLTOfflineSource ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

 EgHLTOfflineSource (const EgHLTOfflineSource &rhs)
 
EgHLTOfflineSourceoperator= (const EgHLTOfflineSource &rhs)
 

Private Attributes

egHLT::BinData binData_
 
egHLT::CutMasks cutMasks_
 
DQMStoredbe_
 
std::vector< std::string > diEleTightLooseTrigNames_
 
std::vector< std::string > diPhoTightLooseTrigNames_
 
std::string dirName_
 
MonitorElementdqmErrsMonElem_
 
std::vector
< egHLT::EleHLTFilterMon * > 
eleFilterMonHists_
 
std::vector< std::string > eleHLTFilterNames2Leg_
 
std::vector< std::string > eleHLTFilterNames_
 
std::vector
< egHLT::MonElemContainer
< egHLT::OffEle > * > 
eleMonElems_
 
std::vector< std::string > eleTightLooseTrigNames_
 
bool filterInactiveTriggers_
 
std::string hltTag_
 
bool isSetup_
 
int nrEventsProcessed_
 
MonitorElementnrEventsProcessedMonElem_
 
egHLT::OffEvt offEvt_
 
egHLT::OffHelper offEvtHelper_
 
std::vector
< egHLT::PhoHLTFilterMon * > 
phoFilterMonHists_
 
std::vector< std::string > phoHLTFilterNames_
 
std::vector
< egHLT::MonElemContainer
< egHLT::OffPho > * > 
phoMonElems_
 
std::vector< std::string > phoTightLooseTrigNames_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 56 of file EgHLTOfflineSource.h.

Constructor & Destructor Documentation

EgHLTOfflineSource::EgHLTOfflineSource ( const EgHLTOfflineSource rhs)
inlineprivate

Definition at line 92 of file EgHLTOfflineSource.h.

92 {}
EgHLTOfflineSource::EgHLTOfflineSource ( const edm::ParameterSet iConfig)
explicit

Definition at line 24 of file EgHLTOfflineSource.cc.

References binData_, cutMasks_, dbe_, diEleTightLooseTrigNames_, diPhoTightLooseTrigNames_, dirName_, eleHLTFilterNames2Leg_, eleHLTFilterNames_, eleTightLooseTrigNames_, filterInactiveTriggers_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hltTag_, offEvtHelper_, cppFunctionSkipper::operator, phoHLTFilterNames_, phoTightLooseTrigNames_, egHLT::CutMasks::setup(), egHLT::BinData::setup(), egHLT::OffHelper::setup(), DQMStore::setVerbose(), and AlCaHLTBitMon_QueryRunRegistry::string.

24  :
26 {
27  dbe_ = edm::Service<DQMStore>().operator->(); //only one chance to get this, if we ever have another shot, remember to check isSetup is okay
28  if (!dbe_) {
29  //our one and only error message ever logged
30  edm::LogInfo("EgHLTOfflineSource") << "unable to get DQMStore service?";
31  }
32  if(iConfig.getUntrackedParameter<bool>("DQMStore", false)) {
33  dbe_->setVerbose(0);
34  }
35 
36 
37  binData_.setup(iConfig.getParameter<edm::ParameterSet>("binData"));
38  cutMasks_.setup(iConfig.getParameter<edm::ParameterSet>("cutMasks"));
39  eleHLTFilterNames_ = iConfig.getParameter<std::vector<std::string> >("eleHLTFilterNames");
40  eleHLTFilterNames2Leg_ = iConfig.getParameter<std::vector<std::string> >("eleHLTFilterNames2Leg");
41  phoHLTFilterNames_ = iConfig.getParameter<std::vector<std::string> >("phoHLTFilterNames");
42  eleTightLooseTrigNames_ = iConfig.getParameter<std::vector<std::string> >("eleTightLooseTrigNames");
43  diEleTightLooseTrigNames_ = iConfig.getParameter<std::vector<std::string> >("diEleTightLooseTrigNames");
44  phoTightLooseTrigNames_ = iConfig.getParameter<std::vector<std::string> >("phoTightLooseTrigNames");
45  diPhoTightLooseTrigNames_ = iConfig.getParameter<std::vector<std::string> >("diPhoTightLooseTrigNames");
46 
47  filterInactiveTriggers_ =iConfig.getParameter<bool>("filterInactiveTriggers");
48  hltTag_ = iConfig.getParameter<std::string>("hltTag");
49 
50 
51  dirName_=iConfig.getParameter<std::string>("DQMDirName");//"HLT/EgHLTOfflineSource_" + iConfig.getParameter<std::string>("@module_label");
52 
53 
54  offEvtHelper_.setup(iConfig);
55 
56 }
std::vector< std::string > diPhoTightLooseTrigNames_
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
egHLT::OffHelper offEvtHelper_
std::vector< std::string > phoTightLooseTrigNames_
std::vector< std::string > eleHLTFilterNames2Leg_
void setup(const edm::ParameterSet &conf)
Definition: EgHLTBinData.cc:6
void setVerbose(unsigned level)
Definition: DQMStore.cc:548
std::vector< std::string > eleTightLooseTrigNames_
std::vector< std::string > phoHLTFilterNames_
void setup(const edm::ParameterSet &conf)
std::vector< std::string > diEleTightLooseTrigNames_
std::vector< std::string > eleHLTFilterNames_
egHLT::BinData binData_
egHLT::CutMasks cutMasks_
void setup(const edm::ParameterSet &conf)
Definition: EgHLTCutMasks.h:23
EgHLTOfflineSource::~EgHLTOfflineSource ( )
virtual

Definition at line 59 of file EgHLTOfflineSource.cc.

References eleFilterMonHists_, eleMonElems_, i, phoFilterMonHists_, and phoMonElems_.

60 {
61  // LogDebug("EgHLTOfflineSource") << "destructor called";
62  for(size_t i=0;i<eleFilterMonHists_.size();i++){
63  delete eleFilterMonHists_[i];
64  }
65  for(size_t i=0;i<phoFilterMonHists_.size();i++){
66  delete phoFilterMonHists_[i];
67  }
68  for(size_t i=0;i<eleMonElems_.size();i++){
69  delete eleMonElems_[i];
70  }
71  for(size_t i=0;i<phoMonElems_.size();i++){
72  delete phoMonElems_[i];
73  }
74 }
int i
Definition: DBlmapReader.cc:9
std::vector< egHLT::EleHLTFilterMon * > eleFilterMonHists_
std::vector< egHLT::MonElemContainer< egHLT::OffEle > * > eleMonElems_
std::vector< egHLT::PhoHLTFilterMon * > phoFilterMonHists_
std::vector< egHLT::MonElemContainer< egHLT::OffPho > * > phoMonElems_

Member Function Documentation

void EgHLTOfflineSource::addEleTrigPath ( const std::string &  name)

Definition at line 214 of file EgHLTOfflineSource.cc.

References binData_, cutMasks_, eleFilterMonHists_, and python.multivaluedict::sort().

Referenced by beginRun().

215 {
216  EleHLTFilterMon* filterMon = new EleHLTFilterMon(name,TrigCodes::getCode(name.c_str()),binData_,cutMasks_);
217  eleFilterMonHists_.push_back(filterMon);
218  std::sort(eleFilterMonHists_.begin(),eleFilterMonHists_.end(),EleHLTFilterMon::ptrLess<EleHLTFilterMon>()); //takes a minor efficiency hit at initalisation to ensure that the vector is always sorted
219 }
std::vector< egHLT::EleHLTFilterMon * > eleFilterMonHists_
egHLT::BinData binData_
egHLT::CutMasks cutMasks_
void EgHLTOfflineSource::addPhoTrigPath ( const std::string &  name)

Definition at line 221 of file EgHLTOfflineSource.cc.

References binData_, cutMasks_, phoFilterMonHists_, and python.multivaluedict::sort().

Referenced by beginRun().

222 {
223  PhoHLTFilterMon* filterMon = new PhoHLTFilterMon(name,TrigCodes::getCode(name.c_str()),binData_,cutMasks_);
224  phoFilterMonHists_.push_back(filterMon);
225  std::sort(phoFilterMonHists_.begin(),phoFilterMonHists_.end(),PhoHLTFilterMon::ptrLess<PhoHLTFilterMon>()); //takes a minor efficiency hit at initalisation to ensure that the vector is always sorted
226 }
std::vector< egHLT::PhoHLTFilterMon * > phoFilterMonHists_
egHLT::BinData binData_
egHLT::CutMasks cutMasks_
void EgHLTOfflineSource::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

Implements edm::EDAnalyzer.

Definition at line 169 of file EgHLTOfflineSource.cc.

References dbe_, dqmErrsMonElem_, eleFilterMonHists_, eleMonElems_, egHLT::OffEvt::eles(), MonitorElement::Fill(), egHLT::OffHelper::makeOffEvt(), nrEventsProcessed_, nrEventsProcessedMonElem_, offEvt_, offEvtHelper_, phoFilterMonHists_, phoMonElems_, egHLT::OffEvt::phos(), and histoStyle::weight.

170 {
171  //debugging info, commented out for prod
172  // int nrProducts = debug::listAllProducts<edm::ValueMap<double> >(iEvent,"EgHLTOfflineSource");
173  //edm::LogInfo("EgHLTOfflineSource")<<" HERE ";
174  // std::cout <<"here"<<std::endl;
175  if(!dbe_) return;
176 
177 
178 
179 
180 
181  const double weight=1.; //we have the ability to weight but its disabled for now - maybe use this for prescales?
184  int errCode = offEvtHelper_.makeOffEvt(iEvent,iSetup,offEvt_);
185  if(errCode!=0){
186  dqmErrsMonElem_->Fill(errCode);
187  return;
188  }
189 
190 
191  for(size_t pathNr=0;pathNr<eleFilterMonHists_.size();pathNr++){
192  eleFilterMonHists_[pathNr]->fill(offEvt_,weight);
193  }
194  for(size_t pathNr=0;pathNr<phoFilterMonHists_.size();pathNr++){
195  phoFilterMonHists_[pathNr]->fill(offEvt_,weight);
196  }
197 
198  for(size_t monElemNr=0;monElemNr<eleMonElems_.size();monElemNr++){
199  const std::vector<OffEle>& eles = offEvt_.eles();
200  for(size_t eleNr=0;eleNr<eles.size();eleNr++){
201  eleMonElems_[monElemNr]->fill(eles[eleNr],offEvt_,weight);
202  }
203  }
204 
205  for(size_t monElemNr=0;monElemNr<phoMonElems_.size();monElemNr++){
206  const std::vector<OffPho>& phos = offEvt_.phos();
207  for(size_t phoNr=0;phoNr<phos.size();phoNr++){
208  phoMonElems_[monElemNr]->fill(phos[phoNr],offEvt_,weight);
209  }
210  }
211 }
egHLT::OffHelper offEvtHelper_
MonitorElement * dqmErrsMonElem_
std::vector< egHLT::EleHLTFilterMon * > eleFilterMonHists_
std::vector< egHLT::MonElemContainer< egHLT::OffEle > * > eleMonElems_
void Fill(long long x)
std::vector< egHLT::PhoHLTFilterMon * > phoFilterMonHists_
std::vector< egHLT::MonElemContainer< egHLT::OffPho > * > phoMonElems_
const std::vector< OffPho > & phos() const
Definition: EgHLTOffEvt.h:48
MonitorElement * nrEventsProcessedMonElem_
const std::vector< OffEle > & eles() const
Definition: EgHLTOffEvt.h:46
int weight
Definition: histoStyle.py:50
int makeOffEvt(const edm::Event &edmEvent, const edm::EventSetup &setup, egHLT::OffEvt &offEvent)
void EgHLTOfflineSource::beginJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 76 of file EgHLTOfflineSource.cc.

References DQMStore::book1D(), DQMStore::bookInt(), dbe_, dirName_, dqmErrsMonElem_, nrEventsProcessedMonElem_, and DQMStore::setCurrentFolder().

77 {
78  if(dbe_) {
80  //the one monitor element the source fills directly
81  dqmErrsMonElem_ =dbe_->book1D("dqmErrors","EgHLTOfflineSource Errors",101,-0.5,100.5);
82  nrEventsProcessedMonElem_ = dbe_->bookInt("nrEventsProcessed");
83  }
84 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:872
MonitorElement * dqmErrsMonElem_
MonitorElement * nrEventsProcessedMonElem_
MonitorElement * bookInt(const char *name)
Book int.
Definition: DQMStore.cc:779
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584
void EgHLTOfflineSource::beginRun ( const edm::Run run,
const edm::EventSetup c 
)
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 95 of file EgHLTOfflineSource.cc.

References addEleTrigPath(), addPhoTrigPath(), binData_, cutMasks_, dbe_, diEleTightLooseTrigNames_, diPhoTightLooseTrigNames_, dirName_, eleHLTFilterNames2Leg_, eleHLTFilterNames_, eleMonElems_, eleTightLooseTrigNames_, filterInactiveTriggers_, filterTriggers(), spr::find(), getHLTFilterNamesUsed(), HltComparatorCreateWorkflow::hltConfig, hltTag_, i, HLTConfigProvider::init(), egHLT::MonElemFuncs::initTightLooseDiObjTrigHistsTrigCuts(), egHLT::MonElemFuncs::initTightLooseTrigHists(), egHLT::MonElemFuncs::initTrigTagProbeHist(), egHLT::MonElemFuncs::initTrigTagProbeHist_2Leg(), isSetup_, offEvtHelper_, phoHLTFilterNames_, phoMonElems_, phoTightLooseTrigNames_, DQMStore::setCurrentFolder(), egHLT::OffHelper::setupTriggers(), egHLT::CutMasks::trigTPEle, and egHLT::CutMasks::trigTPPho.

96 {
97  if(dbe_ && !isSetup_){
99  bool changed=false;
100  hltConfig.init(run,c,hltTag_,changed);
102 
103  std::vector<std::string> hltFiltersUsed;
104  getHLTFilterNamesUsed(hltFiltersUsed);
105  TrigCodes::setCodes(hltFiltersUsed);
106 
107  offEvtHelper_.setupTriggers(hltConfig,hltFiltersUsed);
108 
109  //now book ME's
110  dbe_->setCurrentFolder(dirName_+"/Source_Histos");
111  //each trigger path with generate object distributions and efficiencies (BUT not trigger efficiencies...)
112  for(size_t i=0;i<eleHLTFilterNames_.size();i++){dbe_->setCurrentFolder(dirName_+"/Source_Histos/"+eleHLTFilterNames_[i]); addEleTrigPath(eleHLTFilterNames_[i]);}
113  for(size_t i=0;i<phoHLTFilterNames_.size();i++){dbe_->setCurrentFolder(dirName_+"/Source_Histos/"+phoHLTFilterNames_[i]); addPhoTrigPath(phoHLTFilterNames_[i]);}
114  //efficiencies of one trigger path relative to another
116  //new EgHLTDQMVarCut<OffEle>(cutMasks_.stdEle,&OffEle::cutCode));
117  //MonElemFuncs::initTightLooseTrigHistsTrigCuts(eleMonElems_,eleTightLooseTrigNames_,binData_);
118 
119 
121  // new EgHLTDQMVarCut<OffPho>(cutMasks_.stdPho,&OffPho::cutCode));
122  //MonElemFuncs::initTightLooseTrigHistsTrigCuts(phoMonElems_,phoTightLooseTrigNames_,binData_);
123 
124  //di-object triggers
126  // new EgDiEleCut(cutMasks_.stdEle,&OffEle::cutCode));
128  // new EgDiPhoCut(cutMasks_.stdPho,&OffPho::cutCode));
129 
132 
133 
134  //tag and probe trigger efficiencies
135  //this is to do measure the trigger efficiency with respect to a fully selected offline electron
136  //using a tag and probe technique (note: this will be different to the trigger efficiency normally calculated)
137  bool doTrigTagProbeEff=false;
138  if(doTrigTagProbeEff){
139  for(size_t i=0;i<eleHLTFilterNames_.size();i++){
140  dbe_->setCurrentFolder(dirName_+"/Source_Histos/"+eleHLTFilterNames_[i]);
142  }
143  for(size_t i=0;i<phoHLTFilterNames_.size();i++){
144  dbe_->setCurrentFolder(dirName_+"/Source_Histos/"+phoHLTFilterNames_[i]);
146  }
147  for(size_t i=0;i<eleHLTFilterNames2Leg_.size();i++){
148  dbe_->setCurrentFolder(dirName_+"/Source_Histos/"+eleHLTFilterNames2Leg_[i].substr(eleHLTFilterNames2Leg_[i].find("::")+2));
149  //std::cout<<"FilterName: "<<eleHLTFilterNames2Leg_[i]<<std::endl;
150  //std::cout<<"Folder: "<<eleHLTFilterNames2Leg_[i].substr(eleHLTFilterNames2Leg_[i].find("::")+2)<<std::endl;
152  }
153  //tag and probe not yet implimented for photons (attemping to see if it makes sense first)
154  // MonElemFuncs::initTrigTagProbeHists(phoMonElems,phoHLTFilterNames_);
155  }
156  isSetup_=true;
157 
159  }
160 }
std::vector< std::string > diPhoTightLooseTrigNames_
int i
Definition: DBlmapReader.cc:9
egHLT::OffHelper offEvtHelper_
std::vector< std::string > phoTightLooseTrigNames_
void initTightLooseTrigHists(std::vector< MonElemContainer< OffEle > * > &eleMonElems, const std::vector< std::string > &tightLooseTrigs, const BinData &bins, EgHLTDQMCut< OffEle > *eleCut)
void initTightLooseDiObjTrigHistsTrigCuts(std::vector< MonElemContainer< OffEle > * > &eleMonElems, const std::vector< std::string > &tightLooseTrigs, const BinData &bins)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
std::vector< std::string > eleHLTFilterNames2Leg_
std::vector< egHLT::MonElemContainer< egHLT::OffEle > * > eleMonElems_
void addPhoTrigPath(const std::string &name)
void getHLTFilterNamesUsed(std::vector< std::string > &filterNames) const
std::vector< std::string > eleTightLooseTrigNames_
void addEleTrigPath(const std::string &name)
std::vector< egHLT::MonElemContainer< egHLT::OffPho > * > phoMonElems_
void initTrigTagProbeHist_2Leg(std::vector< MonElemContainer< OffEle > * > &eleMonElems, const std::string filterName, int cutMask, const BinData &bins)
std::vector< std::string > phoHLTFilterNames_
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
std::vector< std::string > diEleTightLooseTrigNames_
std::vector< std::string > eleHLTFilterNames_
void filterTriggers(const HLTConfigProvider &hltConfig)
egHLT::BinData binData_
egHLT::CutMasks cutMasks_
void initTrigTagProbeHist(std::vector< MonElemContainer< OffEle > * > &eleMonElems, const std::string filterName, int cutMask, const BinData &bins)
void setupTriggers(const HLTConfigProvider &config, const std::vector< std::string > &hltFiltersUsed)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584
void EgHLTOfflineSource::endJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 86 of file EgHLTOfflineSource.cc.

87 {
88  // LogDebug("EgHLTOfflineSource") << "ending job";
89 }
void EgHLTOfflineSource::endRun ( const edm::Run run,
const edm::EventSetup c 
)
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 163 of file EgHLTOfflineSource.cc.

164 {
165  //LogDebug("EgHLTOfflineSource") << "endRun, run " << run.id();
166 }
void EgHLTOfflineSource::filterTriggers ( const HLTConfigProvider hltConfig)

Definition at line 275 of file EgHLTOfflineSource.cc.

References diEleTightLooseTrigNames_, diPhoTightLooseTrigNames_, eleHLTFilterNames2Leg_, eleHLTFilterNames_, eleTightLooseTrigNames_, egHLT::trigTools::filterInactiveTightLooseTriggers(), egHLT::trigTools::filterInactiveTriggers(), egHLT::trigTools::getActiveFilters(), phoHLTFilterNames_, and phoTightLooseTrigNames_.

Referenced by beginRun().

276 {
277 
278  std::vector<std::string> activeFilters;
279  std::vector<std::string> activeEleFilters;
280  std::vector<std::string> activeEle2LegFilters;
281  std::vector<std::string> activePhoFilters;
282  std::vector<std::string> activePho2LegFilters;
283 
284  trigTools::getActiveFilters(hltConfig,activeFilters,activeEleFilters,activeEle2LegFilters,activePhoFilters,activePho2LegFilters);
285 
293 }
std::vector< std::string > diPhoTightLooseTrigNames_
std::vector< std::string > phoTightLooseTrigNames_
std::vector< std::string > eleHLTFilterNames2Leg_
std::vector< std::string > eleTightLooseTrigNames_
std::vector< std::string > phoHLTFilterNames_
void getActiveFilters(const HLTConfigProvider &hltConfig, std::vector< std::string > &activeFilters, std::vector< std::string > &activeEleFilters, std::vector< std::string > &activeEle2LegFilters, std::vector< std::string > &activePhoFilters, std::vector< std::string > &activePho2LegFilters)
std::vector< std::string > diEleTightLooseTrigNames_
std::vector< std::string > eleHLTFilterNames_
void filterInactiveTriggers(std::vector< std::string > &namesToFilter, std::vector< std::string > &activeFilters)
void filterInactiveTightLooseTriggers(std::vector< std::string > &namesToFilter, const std::vector< std::string > &activeFilters)
void EgHLTOfflineSource::getHLTFilterNamesUsed ( std::vector< std::string > &  filterNames) const

Definition at line 235 of file EgHLTOfflineSource.cc.

References diEleTightLooseTrigNames_, diPhoTightLooseTrigNames_, eleHLTFilterNames_, eleTightLooseTrigNames_, i, phoHLTFilterNames_, phoTightLooseTrigNames_, split, AlCaHLTBitMon_QueryRunRegistry::string, swap(), and trigNames.

Referenced by beginRun().

236 {
237  std::set<std::string> filterNameSet;
238  for(size_t i=0;i<eleHLTFilterNames_.size();i++) filterNameSet.insert(eleHLTFilterNames_[i]);
239  for(size_t i=0;i<phoHLTFilterNames_.size();i++) filterNameSet.insert(phoHLTFilterNames_[i]);
240  //here we are little more complicated as entries are of the form "tightTrig:looseTrig"
241  //so we need to split them first
242  for(size_t tightLooseNr=0;tightLooseNr<eleTightLooseTrigNames_.size();tightLooseNr++){
243  std::vector<std::string> trigNames;
244  boost::split(trigNames,eleTightLooseTrigNames_[tightLooseNr],boost::is_any_of(std::string(":")));
245  if(trigNames.size()!=2) continue; //format incorrect
246  filterNameSet.insert(trigNames[0]);
247  filterNameSet.insert(trigNames[1]);
248  }
249  for(size_t tightLooseNr=0;tightLooseNr<diEleTightLooseTrigNames_.size();tightLooseNr++){
250  std::vector<std::string> trigNames;
251  boost::split(trigNames,diEleTightLooseTrigNames_[tightLooseNr],boost::is_any_of(std::string(":")));
252  if(trigNames.size()!=2) continue; //format incorrect
253  filterNameSet.insert(trigNames[0]);
254  filterNameSet.insert(trigNames[1]);
255  }
256  for(size_t tightLooseNr=0;tightLooseNr<phoTightLooseTrigNames_.size();tightLooseNr++){
257  std::vector<std::string> trigNames;
258  boost::split(trigNames,phoTightLooseTrigNames_[tightLooseNr],boost::is_any_of(std::string(":")));
259  if(trigNames.size()!=2) continue; //format incorrect
260  filterNameSet.insert(trigNames[0]);
261  filterNameSet.insert(trigNames[1]);
262  }
263  for(size_t tightLooseNr=0;tightLooseNr<diPhoTightLooseTrigNames_.size();tightLooseNr++){
264  std::vector<std::string> trigNames;
265  boost::split(trigNames,diPhoTightLooseTrigNames_[tightLooseNr],boost::is_any_of(std::string(":")));
266  if(trigNames.size()!=2) continue; //format incorrect
267  filterNameSet.insert(trigNames[0]);
268  filterNameSet.insert(trigNames[1]);
269  }
270  //right all the triggers are inserted once and only once in the set, convert to vector
271  //very lazy, create a new vector so can use the constructor and then use swap to transfer
272  std::vector<std::string>(filterNameSet.begin(),filterNameSet.end()).swap(filterNames);
273 }
void swap(ora::Record &rh, ora::Record &lh)
Definition: Record.h:70
std::vector< std::string > diPhoTightLooseTrigNames_
int i
Definition: DBlmapReader.cc:9
std::vector< std::string > phoTightLooseTrigNames_
std::vector< std::string > eleTightLooseTrigNames_
static const char *const trigNames[]
Definition: EcalDumpRaw.cc:74
std::vector< std::string > phoHLTFilterNames_
std::vector< std::string > diEleTightLooseTrigNames_
std::vector< std::string > eleHLTFilterNames_
double split
Definition: MVATrainer.cc:139
EgHLTOfflineSource& EgHLTOfflineSource::operator= ( const EgHLTOfflineSource rhs)
inlineprivate

Definition at line 93 of file EgHLTOfflineSource.h.

93 {return *this;}

Member Data Documentation

egHLT::BinData EgHLTOfflineSource::binData_
private

Definition at line 84 of file EgHLTOfflineSource.h.

Referenced by addEleTrigPath(), addPhoTrigPath(), beginRun(), and EgHLTOfflineSource().

egHLT::CutMasks EgHLTOfflineSource::cutMasks_
private

Definition at line 85 of file EgHLTOfflineSource.h.

Referenced by addEleTrigPath(), addPhoTrigPath(), beginRun(), and EgHLTOfflineSource().

DQMStore* EgHLTOfflineSource::dbe_
private

Definition at line 59 of file EgHLTOfflineSource.h.

Referenced by analyze(), beginJob(), beginRun(), and EgHLTOfflineSource().

std::vector<std::string> EgHLTOfflineSource::diEleTightLooseTrigNames_
private
std::vector<std::string> EgHLTOfflineSource::diPhoTightLooseTrigNames_
private
std::string EgHLTOfflineSource::dirName_
private

Definition at line 69 of file EgHLTOfflineSource.h.

Referenced by beginJob(), beginRun(), and EgHLTOfflineSource().

MonitorElement* EgHLTOfflineSource::dqmErrsMonElem_
private

Definition at line 60 of file EgHLTOfflineSource.h.

Referenced by analyze(), and beginJob().

std::vector<egHLT::EleHLTFilterMon*> EgHLTOfflineSource::eleFilterMonHists_
private

Definition at line 64 of file EgHLTOfflineSource.h.

Referenced by addEleTrigPath(), analyze(), and ~EgHLTOfflineSource().

std::vector<std::string> EgHLTOfflineSource::eleHLTFilterNames2Leg_
private

Definition at line 78 of file EgHLTOfflineSource.h.

Referenced by beginRun(), EgHLTOfflineSource(), and filterTriggers().

std::vector<std::string> EgHLTOfflineSource::eleHLTFilterNames_
private
std::vector<egHLT::MonElemContainer<egHLT::OffEle>*> EgHLTOfflineSource::eleMonElems_
private

Definition at line 66 of file EgHLTOfflineSource.h.

Referenced by analyze(), beginRun(), and ~EgHLTOfflineSource().

std::vector<std::string> EgHLTOfflineSource::eleTightLooseTrigNames_
private
bool EgHLTOfflineSource::filterInactiveTriggers_
private

Definition at line 88 of file EgHLTOfflineSource.h.

Referenced by beginRun(), and EgHLTOfflineSource().

std::string EgHLTOfflineSource::hltTag_
private

Definition at line 89 of file EgHLTOfflineSource.h.

Referenced by beginRun(), and EgHLTOfflineSource().

bool EgHLTOfflineSource::isSetup_
private

Definition at line 87 of file EgHLTOfflineSource.h.

Referenced by beginRun().

int EgHLTOfflineSource::nrEventsProcessed_
private

Definition at line 62 of file EgHLTOfflineSource.h.

Referenced by analyze().

MonitorElement* EgHLTOfflineSource::nrEventsProcessedMonElem_
private

Definition at line 61 of file EgHLTOfflineSource.h.

Referenced by analyze(), and beginJob().

egHLT::OffEvt EgHLTOfflineSource::offEvt_
private

Definition at line 71 of file EgHLTOfflineSource.h.

Referenced by analyze().

egHLT::OffHelper EgHLTOfflineSource::offEvtHelper_
private

Definition at line 72 of file EgHLTOfflineSource.h.

Referenced by analyze(), beginRun(), and EgHLTOfflineSource().

std::vector<egHLT::PhoHLTFilterMon*> EgHLTOfflineSource::phoFilterMonHists_
private

Definition at line 65 of file EgHLTOfflineSource.h.

Referenced by addPhoTrigPath(), analyze(), and ~EgHLTOfflineSource().

std::vector<std::string> EgHLTOfflineSource::phoHLTFilterNames_
private
std::vector<egHLT::MonElemContainer<egHLT::OffPho>*> EgHLTOfflineSource::phoMonElems_
private

Definition at line 67 of file EgHLTOfflineSource.h.

Referenced by analyze(), beginRun(), and ~EgHLTOfflineSource().

std::vector<std::string> EgHLTOfflineSource::phoTightLooseTrigNames_
private