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
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
< L1GlobalTriggerReadoutRecord
src_
 

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 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(), i, CachingVariable::CachingVariableFactoryArg::iConfig, src_, and contentValuesCheck::ss.

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)
int i
Definition: DBlmapReader.cc:9
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(), VariableComputer::doesNotCompute(), edm::HandleBase::failedToGet(), edm::Event::getByToken(), i, alignCSCRings::r, src_, and contentValuesCheck::ss.

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  }
int i
Definition: DBlmapReader.cc:9
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
void assign(std::string var, double &value) const
std::vector< bool > DecisionWord
typedefs
std::vector< bool > TechnicalTriggerWord
technical trigger bits (64 bits)
bool failedToGet() const
Definition: HandleBase.h:79
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > src_
void doesNotCompute() const

Member Data Documentation

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

Definition at line 51 of file TriggerVariables.h.

Referenced by compute(), and L1BitComputer().