CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
L1BitComputer Class Reference

#include <TriggerVariables.h>

Inheritance diagram for L1BitComputer:
VariableComputer

Public Member Functions

void compute (const edm::Event &iEvent) const
 
 L1BitComputer (CachingVariable::CachingVariableFactoryArg arg, edm::ConsumesCollector &iC)
 
 ~L1BitComputer ()
 
- 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< L1GlobalTriggerReadoutRecordsrc_
 

Additional Inherited Members

- Protected Attributes inherited from VariableComputer
const CachingVariable::CachingVariableFactoryArgarg_
 
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 5 of file TriggerVariables.h.

Constructor & Destructor Documentation

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

Definition at line 7 of file TriggerVariables.h.

References edm::ConsumesCollector::consumes(), VariableComputer::declare(), mps_fire::i, CachingVariable::CachingVariableFactoryArg::iConfig, and src_.

7  :VariableComputer(arg, iC){
9  for(int i = 0;i!=128;i++){
10  std::stringstream ss;
11  ss<<i;
12  declare(ss.str(), iC);
13  }
14 
15  for(int i = 0;i!=64;i++){
16  std::stringstream ss;
17  ss<<"TechTrig_";
18  ss<<i;
19  declare(ss.str(), iC);
20  }
21 
22 
23  }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
VariableComputer(const CachingVariable::CachingVariableFactoryArg &arg, edm::ConsumesCollector &iC)
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > src_
void declare(std::string var, edm::ConsumesCollector &iC)
L1BitComputer::~L1BitComputer ( )
inline

Definition at line 24 of file TriggerVariables.h.

24 {};

Member Function Documentation

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

Implements VariableComputer.

Definition at line 26 of file TriggerVariables.h.

References VariableComputer::assign(), L1GlobalTriggerReadoutRecord::decisionWord(), VariableComputer::doesNotCompute(), edm::HandleBase::failedToGet(), edm::Event::getByToken(), mps_fire::i, alignCSCRings::r, src_, and L1GlobalTriggerReadoutRecord::technicalTriggerWord().

26  {
28  iEvent.getByToken(src_, l1Handle);
29  if (l1Handle.failedToGet()) doesNotCompute();
30  const DecisionWord & dWord = l1Handle->decisionWord();
31  for(int i = 0;i!=128;i++){
32  std::stringstream ss;
33  ss<<i;
34  double r=dWord.at(i);
35  assign(ss.str(),r);
36  }
37 
38  const TechnicalTriggerWord & tTWord = l1Handle->technicalTriggerWord();
39  for(int i = 0;i!=64;i++){
40  std::stringstream ss;
41  ss<<"TechTrig_";
42  ss<<i;
43  double r=tTWord.at(i);
44  assign(ss.str(),r);
45  }
46 
47 
48 
49  }
const TechnicalTriggerWord & technicalTriggerWord(int bxInEventValue) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:508
void assign(std::string var, double &value) const
std::vector< bool > DecisionWord
typedefs
std::vector< bool > TechnicalTriggerWord
technical trigger bits (64 bits)
const DecisionWord & decisionWord(int bxInEventValue) const
bool failedToGet() const
Definition: HandleBase.h:78
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > src_
void doesNotCompute() const

Member Data Documentation

edm::EDGetTokenT<L1GlobalTriggerReadoutRecord> L1BitComputer::src_
private