CMS 3D CMS Logo

Public Member Functions | Private Attributes

HLTBitVariable Class Reference

#include <TriggerVariables.h>

Inheritance diagram for HLTBitVariable:
CachingVariable

List of all members.

Public Member Functions

CachingVariable::evalType eval (const edm::Event &iEvent) const
 HLTBitVariable (CachingVariableFactoryArg arg)

Private Attributes

std::string bitName_
edm::InputTag src_

Detailed Description

Definition at line 92 of file TriggerVariables.h.


Constructor & Destructor Documentation

HLTBitVariable::HLTBitVariable ( CachingVariableFactoryArg  arg) [inline]

Definition at line 94 of file TriggerVariables.h.

References CachingVariable::CachingVariableFactoryArg::m, and CachingVariable::CachingVariableFactoryArg::n.

                                                 :
    CachingVariable("HLTBitVariable",arg.n,arg.iConfig),
    src_(edm::Service<InputTagDistributorService>()->retrieve("src",arg.iConfig)),
    bitName_(arg.n){ arg.m[arg.n]=this;}

Member Function Documentation

CachingVariable::evalType HLTBitVariable::eval ( const edm::Event iEvent) const [inline, virtual]

Reimplemented from CachingVariable.

Definition at line 98 of file TriggerVariables.h.

References bitName_, edm::HandleBase::failedToGet(), edm::Event::getByLabel(), getHLTprescales::index, edm::TriggerNames::size(), src_, edm::TriggerNames::triggerIndex(), and edm::Event::triggerNames().

                                                               {
      edm::Handle<edm::TriggerResults> hltHandle;
      iEvent.getByLabel(src_, hltHandle);
      if (hltHandle.failedToGet()) return std::make_pair(false,0);
      const edm::TriggerNames & trgNames = iEvent.triggerNames(*hltHandle);
      unsigned int index = trgNames.triggerIndex(bitName_);
      if ( index==trgNames.size() ) return std::make_pair(false,0);
      else return std::make_pair(true, hltHandle->accept(index));

    }

Member Data Documentation

std::string HLTBitVariable::bitName_ [private]

Definition at line 110 of file TriggerVariables.h.

Referenced by eval().

Definition at line 109 of file TriggerVariables.h.

Referenced by eval().