#include <TriggerVariables.h>
Public Member Functions | |
void | compute (const edm::Event &iEvent) const |
HLTBitComputer (CachingVariable::CachingVariableFactoryArg arg) | |
~HLTBitComputer () | |
Private Attributes | |
edm::InputTag | src_ |
std::vector< std::string > | validTriggerNames_ |
Definition at line 58 of file TriggerVariables.h.
HLTBitComputer::HLTBitComputer | ( | CachingVariable::CachingVariableFactoryArg | arg | ) | [inline] |
Definition at line 60 of file TriggerVariables.h.
References VariableComputer::declare(), CachingVariable::CachingVariableFactoryArg::iConfig, src_, AlCaHLTBitMon_QueryRunRegistry::string, HLTConfigProvider::triggerNames(), and validTriggerNames_.
:VariableComputer(arg){ src_=edm::Service<InputTagDistributorService>()->retrieve("src",arg.iConfig); HLTConfigProvider provider; //the function will not work anymore until a major redesign is performed. so long for HLT variables. //provider.init(src_.process()); validTriggerNames_ = provider.triggerNames(); for (unsigned int iT=0;iT!=validTriggerNames_.size();++iT){ TString tname(validTriggerNames_[iT]); tname.ReplaceAll("HLT_","");//remove the "HLT_" prefix declare(std::string(tname)); } }
HLTBitComputer::~HLTBitComputer | ( | ) | [inline] |
Definition at line 72 of file TriggerVariables.h.
{}
void HLTBitComputer::compute | ( | const edm::Event & | iEvent | ) | const [inline, virtual] |
Implements VariableComputer.
Definition at line 73 of file TriggerVariables.h.
References VariableComputer::assign(), VariableComputer::doesNotCompute(), edm::Event::getByLabel(), edm::HandleBase::isValid(), alignCSCRings::r, src_, AlCaHLTBitMon_QueryRunRegistry::string, edm::TriggerNames::triggerIndex(), edm::Event::triggerNames(), and validTriggerNames_.
{ edm::Handle<edm::TriggerResults> trh; iEvent.getByLabel(src_,trh); if (!trh.isValid()) doesNotCompute(); const edm::TriggerNames & triggerNames = iEvent.triggerNames(*trh); for (unsigned int iT=0;iT!=validTriggerNames_.size();++iT){ TString tname(validTriggerNames_[iT]); tname.ReplaceAll("HLT_",""); double r=trh->accept(triggerNames.triggerIndex(validTriggerNames_[iT])); assign(std::string(tname),r); } }
edm::InputTag HLTBitComputer::src_ [private] |
Definition at line 88 of file TriggerVariables.h.
Referenced by compute(), and HLTBitComputer().
std::vector<std::string> HLTBitComputer::validTriggerNames_ [private] |
Definition at line 89 of file TriggerVariables.h.
Referenced by compute(), and HLTBitComputer().