CMS 3D CMS Logo

Public Member Functions | Private Attributes

HLTBitComputer Class Reference

#include <TriggerVariables.h>

Inheritance diagram for HLTBitComputer:
VariableComputer

List of all members.

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_

Detailed Description

Definition at line 58 of file TriggerVariables.h.


Constructor & Destructor Documentation

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.

{}

Member Function Documentation

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);
      }
      
    }

Member Data Documentation

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().