CMS 3D CMS Logo

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