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
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)
 
 ~L1BitComputer ()
 
- Public Member Functions inherited from VariableComputer
void assign (std::string var, double &value) const
 
void declare (std::string var)
 
void doesNotCompute () const
 
void doesNotCompute (std::string var) const
 
const std::string & name () const
 
 VariableComputer (CachingVariable::CachingVariableFactoryArg arg)
 
virtual ~VariableComputer ()
 

Private Attributes

edm::InputTag src_
 

Additional Inherited Members

- Protected Attributes inherited from VariableComputer
CachingVariable::CachingVariableFactoryArgarg_
 
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)
inline

Definition at line 7 of file TriggerVariables.h.

References VariableComputer::declare(), i, CachingVariable::CachingVariableFactoryArg::iConfig, and src_.

7  :VariableComputer(arg){
9  for(int i = 0;i!=128;i++){
10  std::stringstream ss;
11  ss<<i;
12  declare(ss.str());
13  }
14 
15  for(int i = 0;i!=64;i++){
16  std::stringstream ss;
17  ss<<"TechTrig_";
18  ss<<i;
19  declare(ss.str());
20  }
21 
22 
23  }
int i
Definition: DBlmapReader.cc:9
VariableComputer(CachingVariable::CachingVariableFactoryArg arg)
edm::InputTag src_
void declare(std::string var)
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(), VariableComputer::doesNotCompute(), edm::HandleBase::failedToGet(), edm::Event::getByLabel(), i, alignCSCRings::r, and src_.

26  {
28  iEvent.getByLabel(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  }
int i
Definition: DBlmapReader.cc:9
void assign(std::string var, double &value) const
std::vector< bool > DecisionWord
typedefs
std::vector< bool > TechnicalTriggerWord
technical trigger bits (64 bits)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
bool failedToGet() const
Definition: HandleBase.h:80
void doesNotCompute() const
edm::InputTag src_

Member Data Documentation

edm::InputTag L1BitComputer::src_
private

Definition at line 51 of file TriggerVariables.h.

Referenced by compute(), and L1BitComputer().