CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1GtCaloTemplate.cc
Go to the documentation of this file.
1 
17 // this class header
19 
20 // system include files
21 
22 #include <iostream>
23 #include <iomanip>
24 
25 // user include files
26 
27 // base class
28 
31 
32 // forward declarations
33 
34 // constructors
36  : L1GtCondition()
37 {
38 
40 
41 }
42 
44  : L1GtCondition(cName)
45 {
46 
48 
49 }
50 
52  : L1GtCondition(cName, CondCalo, cType)
53 {
54 
55  int nObjects = nrObjects();
56 
57  if (nObjects > 0) {
58  m_objectParameter.reserve(nObjects);
59 
60  m_objectType.reserve(nObjects);
61  }
62 
63 }
64 
65 // copy constructor
67  : L1GtCondition(cp.m_condName)
68 {
69  copy(cp);
70 }
71 
72 // destructor
74 {
75  // empty now
76 }
77 
78 // assign operator
80 {
81 
82  copy(cp);
83  return *this;
84 }
85 
86 
87 // setConditionParameter - set the parameters of the condition
89  const std::vector<ObjectParameter>& objParameter,
90  const CorrelationParameter& corrParameter)
91 {
92 
93  m_objectParameter = objParameter;
94  m_correlationParameter = corrParameter;
95 
96 }
97 
98 void L1GtCaloTemplate::print(std::ostream& myCout) const
99 {
100 
101  myCout << "\n L1GtCaloTemplate print..." << std::endl;
102 
103  L1GtCondition::print(myCout);
104 
105  int nObjects = nrObjects();
106 
107  for (int i = 0; i < nObjects; i++) {
108  myCout << std::endl;
109  myCout << " Template for object " << i << " [ hex ]" << std::endl;
110  myCout << " etThreshold = "
111  << std::hex << m_objectParameter[i].etThreshold << std::endl;
112  myCout << " etaRange = "
113  << std::hex << m_objectParameter[i].etaRange << std::endl;
114  myCout << " phiRange = "
115  << std::hex << m_objectParameter[i].phiRange << std::endl;
116  }
117 
118  if ( wsc() ) {
119 
120  myCout << " Correlation parameters " << "[ hex ]" << std::endl;
121 
122  myCout << " deltaEtaRange = "
123  << std::hex << m_correlationParameter.deltaEtaRange << std::endl;
124  myCout << " deltaPhiRange = "
125  << std::hex << m_correlationParameter.deltaPhiRange << std::endl;
126  myCout << " deltaPhiMaxbits = "
127  << std::hex << m_correlationParameter.deltaPhiMaxbits << std::endl;
128  }
129 
130  // reset to decimal output
131  myCout << std::dec << std::endl;
132 }
133 
135 {
136 
137  m_condName = cp.condName();
139  m_condType = cp.condType();
140  m_objectType = cp.objectType();
141  m_condGEq = cp.condGEq();
142  m_condChipNr = cp.condChipNr();
143 
146 
147 }
148 
149 // output stream operator
150 std::ostream& operator<<(std::ostream& os, const L1GtCaloTemplate& result)
151 {
152  result.print(os);
153  return os;
154 
155 }
156 
157 
158 
int i
Definition: DBlmapReader.cc:9
const int nrObjects() const
get number of trigger objects
std::vector< ObjectParameter > m_objectParameter
variables containing the parameters
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)
void copy(const L1GtCaloTemplate &cp)
copy function for copy constructor and operator=
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
L1GtConditionType
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
L1GtCaloTemplate & operator=(const L1GtCaloTemplate &)
const bool wsc() const
const L1GtConditionType & condType() const
get / set the type of the condition (1s, etc)
Definition: L1GtCondition.h:77
tuple result
Definition: query.py:137
std::string m_condName
the name of the condition
typedef for correlation parameters
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
virtual ~L1GtCaloTemplate()
const CorrelationParameter * correlationParameter() const
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
const std::vector< ObjectParameter > * objectParameter() const
int m_condChipNr
condition is located on condition chip m_condChipNr
void setConditionParameter(const std::vector< ObjectParameter > &objParameter, const CorrelationParameter &corrParameter)
set functions
CorrelationParameter m_correlationParameter