test
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 Attributes
HLTBitComputer Class Reference

#include <TriggerVariables.h>

Inheritance diagram for HLTBitComputer:
VariableComputer

Public Member Functions

void compute (const edm::Event &iEvent) const
 
 HLTBitComputer (CachingVariable::CachingVariableFactoryArg arg, edm::ConsumesCollector &iC)
 
 ~HLTBitComputer ()
 
- Public Member Functions inherited from VariableComputer
void assign (std::string var, double &value) const
 
void declare (std::string var, edm::ConsumesCollector &iC)
 
void doesNotCompute () const
 
void doesNotCompute (std::string var) const
 
const std::string & name () const
 
bool notSeenThisEventAlready (const edm::Event &iEvent) const
 
 VariableComputer (const CachingVariable::CachingVariableFactoryArg &arg, edm::ConsumesCollector &iC)
 
virtual ~VariableComputer ()
 

Private Attributes

edm::EDGetTokenT
< edm::TriggerResults
src_
 
std::vector< std::string > validTriggerNames_
 

Additional Inherited Members

- Protected Attributes inherited from VariableComputer
const
CachingVariable::CachingVariableFactoryArg
arg_
 
edm::Event::CacheIdentifier_t eventCacheID_ =0
 
std::map< std::string,const
ComputedVariable * > 
iCompute_
 
std::string method_
 
std::string name_
 
std::string separator_
 

Detailed Description

Definition at line 58 of file TriggerVariables.h.

Constructor & Destructor Documentation

HLTBitComputer::HLTBitComputer ( CachingVariable::CachingVariableFactoryArg  arg,
edm::ConsumesCollector iC 
)
inline

Definition at line 60 of file TriggerVariables.h.

References edm::ConsumesCollector::consumes(), VariableComputer::declare(), CachingVariable::CachingVariableFactoryArg::iConfig, src_, AlCaHLTBitMon_QueryRunRegistry::string, cond::persistency::GLOBAL_TAG::tname, and validTriggerNames_.

60  :VariableComputer(arg, iC){
62  HLTConfigProvider provider;
63  //the function will not work anymore until a major redesign is performed. so long for HLT variables.
64  //provider.init(src_.process());
65  validTriggerNames_ = provider.triggerNames();
66  for (unsigned int iT=0;iT!=validTriggerNames_.size();++iT){
67  TString tname(validTriggerNames_[iT]);
68  tname.ReplaceAll("HLT_","");//remove the "HLT_" prefix
70  }
71  }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
std::vector< std::string > validTriggerNames_
static char const * tname
Definition: GTSchema.h:13
VariableComputer(const CachingVariable::CachingVariableFactoryArg &arg, edm::ConsumesCollector &iC)
edm::EDGetTokenT< edm::TriggerResults > src_
void declare(std::string var, edm::ConsumesCollector &iC)
HLTBitComputer::~HLTBitComputer ( )
inline

Definition at line 72 of file TriggerVariables.h.

72 {}

Member Function Documentation

void HLTBitComputer::compute ( const edm::Event iEvent) const
inlinevirtual

Implements VariableComputer.

Definition at line 73 of file TriggerVariables.h.

References VariableComputer::assign(), VariableComputer::doesNotCompute(), edm::Event::getByToken(), edm::HandleBase::isValid(), alignCSCRings::r, src_, AlCaHLTBitMon_QueryRunRegistry::string, cond::persistency::GLOBAL_TAG::tname, edm::TriggerNames::triggerIndex(), edm::Event::triggerNames(), and validTriggerNames_.

73  {
75  iEvent.getByToken(src_,trh);
76  if (!trh.isValid()) doesNotCompute();
77  const edm::TriggerNames & triggerNames = iEvent.triggerNames(*trh);
78  for (unsigned int iT=0;iT!=validTriggerNames_.size();++iT){
79 
80  TString tname(validTriggerNames_[iT]);
81  tname.ReplaceAll("HLT_","");
82  double r=trh->accept(triggerNames.triggerIndex(validTriggerNames_[iT]));
84  }
85 
86  }
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
Definition: Event.cc:215
std::vector< std::string > validTriggerNames_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
static char const * tname
Definition: GTSchema.h:13
void assign(std::string var, double &value) const
unsigned int triggerIndex(std::string const &name) const
Definition: TriggerNames.cc:32
bool isValid() const
Definition: HandleBase.h:75
edm::EDGetTokenT< edm::TriggerResults > src_
void doesNotCompute() const

Member Data Documentation

edm::EDGetTokenT<edm::TriggerResults> 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().