CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1GtBptxTemplate.cc
Go to the documentation of this file.
1 
22 // this class header
24 
25 // system include files
26 
27 #include <iostream>
28 #include <iomanip>
29 
30 // user include files
31 
32 // base class
33 
36 
37 // forward declarations
38 
39 // constructors
41  : L1GtCondition()
42 {
43 
46 
47 }
48 
50  : L1GtCondition(cName)
51 {
52 
55 
56 }
57 
59  : L1GtCondition(cName, CondEnergySum, cType)
60 {
61 
64 
65  // actually no objects are sent by BPTX, only the result of the condition
66  int nObjects = nrObjects();
67 
68  if (nObjects > 0) {
69  m_objectType.reserve(nObjects);
70  }
71 
72 }
73 
74 // copy constructor
76  : L1GtCondition(cp.m_condName)
77 {
78  copy(cp);
79 }
80 
81 // destructor
83 {
84  // empty now
85 }
86 
87 // assign operator
89 {
90 
91  copy(cp);
92  return *this;
93 }
94 
95 
96 void L1GtBptxTemplate::print(std::ostream& myCout) const
97 {
98 
99  myCout << "\n L1GtBptxTemplate print..." << std::endl;
100 
101  L1GtCondition::print(myCout);
102 
103 
104  // reset to decimal output
105  myCout << std::dec << std::endl;
106 }
107 
109 {
110 
111  m_condName = cp.condName();
113  m_condType = cp.condType();
114  m_objectType = cp.objectType();
115  m_condGEq = cp.condGEq();
116  m_condChipNr = cp.condChipNr();
117 
118 }
119 
120 // output stream operator
121 std::ostream& operator<<(std::ostream& os, const L1GtBptxTemplate& result)
122 {
123  result.print(os);
124  return os;
125 
126 }
127 
128 
virtual ~L1GtBptxTemplate()
const int nrObjects() const
get number of trigger objects
virtual void print(std::ostream &myCout) const
print the condition
const std::string & condName() const
get / set condition name
Definition: L1GtCondition.h:57
void copy(const L1GtBptxTemplate &cp)
copy function for copy constructor and operator=
const int & condChipNr() const
get / set the condition-chip number the condition is located on
const std::vector< L1GtObject > & objectType() const
get / set the trigger object type(s) in the condition
Definition: L1GtCondition.h:90
std::vector< L1GtObject > m_objectType
the trigger object type(s)
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:188
L1GtConditionType
virtual void print(std::ostream &myCout) const
print condition
tuple result
Definition: mps_fire.py:84
L1GtConditionType m_condType
the type of the condition (1s, etc)
L1GtConditionCategory m_condCategory
the category of the condition
const L1GtConditionType & condType() const
get / set the type of the condition (1s, etc)
Definition: L1GtCondition.h:79
std::string m_condName
the name of the condition
const L1GtConditionCategory & condCategory() const
get / set the category of the condition
Definition: L1GtCondition.h:68
L1GtBptxTemplate & operator=(const L1GtBptxTemplate &)
bool m_condGEq
the operator used for the condition (&gt;=, =): true for &gt;=
const bool condGEq() const
get / set condition GEq flag
int m_condChipNr
condition is located on condition chip m_condChipNr