CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CaloTemplate.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 
30 
31 // forward declarations
32 
33 // constructors
35  : GtCondition()
36 {
37 
39 
40 }
41 
43  : GtCondition(cName)
44 {
45 
47 
48 }
49 
51  : GtCondition(cName, l1t::CondCalo, cType)
52 {
53 
54  int nObjects = nrObjects();
55 
56  if (nObjects > 0) {
57  m_objectParameter.reserve(nObjects);
58 
59  m_objectType.reserve(nObjects);
60  }
61 
62 }
63 
64 // copy constructor
66  : GtCondition(cp.m_condName)
67 {
68  copy(cp);
69 }
70 
71 // destructor
73 {
74  // empty now
75 }
76 
77 // assign operator
79 {
80 
81  copy(cp);
82  return *this;
83 }
84 
85 
86 // setConditionParameter - set the parameters of the condition
88  const std::vector<ObjectParameter>& objParameter,
89  const CorrelationParameter& corrParameter)
90 {
91 
92  m_objectParameter = objParameter;
93  m_correlationParameter = corrParameter;
94 
95 }
96 
97 void CaloTemplate::print(std::ostream& myCout) const
98 {
99 
100  myCout << "\n CaloTemplate print..." << std::endl;
101 
102  GtCondition::print(myCout);
103 
104  int nObjects = nrObjects();
105 
106  for (int i = 0; i < nObjects; i++) {
107  myCout << std::endl;
108  myCout << " Template for object " << i << " [ hex ]" << std::endl;
109  myCout << " etThreshold = "
110  << std::hex << m_objectParameter[i].etLowThreshold << " " << m_objectParameter[i].etHighThreshold << std::endl;
111  myCout << " etaRange = "
112  << std::hex << m_objectParameter[i].etaRange << std::endl;
113  myCout << " phiRange = "
114  << std::hex << m_objectParameter[i].phiRange << std::endl;
115  myCout << " isolationLUT = "
116  << std::hex << m_objectParameter[i].isolationLUT << std::endl;
117  myCout << " qualityLUT = "
118  << std::hex << m_objectParameter[i].qualityLUT << std::endl;
119  }
120 
121  if ( wsc() ) {
122 
123  myCout << " Correlation parameters " << "[ hex ]" << std::endl;
124 
125  myCout << " deltaEtaRange = "
126  << std::hex << m_correlationParameter.deltaEtaRange << std::endl;
127  myCout << " deltaPhiRange = "
128  << std::hex << m_correlationParameter.deltaPhiRange << std::endl;
129  myCout << " deltaPhiMaxbits = "
130  << std::hex << m_correlationParameter.deltaPhiMaxbits << std::endl;
131  }
132 
133  // reset to decimal output
134  myCout << std::dec << std::endl;
135 }
136 
138 {
139 
140  m_condName = cp.condName();
142  m_condType = cp.condType();
143  m_objectType = cp.objectType();
144  m_condGEq = cp.condGEq();
145  m_condChipNr = cp.condChipNr();
147 
150 
151 }
152 
153 // output stream operator
154 std::ostream& operator<<(std::ostream& os, const CaloTemplate& result)
155 {
156  result.print(os);
157  return os;
158 
159 }
160 
161 
162 
int i
Definition: DBlmapReader.cc:9
bool m_condGEq
the operator used for the condition (&gt;=, =): true for &gt;=
Definition: GtCondition.h:168
const std::vector< ObjectParameter > * objectParameter() const
Definition: CaloTemplate.h:99
const int & condChipNr() const
get / set the condition-chip number the condition is located on
Definition: GtCondition.h:112
l1t::GtConditionType m_condType
the type of the condition (1s, etc)
Definition: GtCondition.h:162
GtConditionType
Definition: GtDefinitions.h:99
int m_condChipNr
condition is located on condition chip m_condChipNr
Definition: GtCondition.h:171
CorrelationParameter m_correlationParameter
Definition: CaloTemplate.h:131
unsigned long long deltaEtaRange
Definition: CaloTemplate.h:83
unsigned long long deltaPhiRange
Definition: CaloTemplate.h:85
virtual void print(std::ostream &myCout) const
print condition
Definition: GtCondition.cc:154
void copy(const CaloTemplate &cp)
copy function for copy constructor and operator=
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
std::vector< L1GtObject > m_objectType
the trigger object type(s)
Definition: GtCondition.h:165
virtual ~CaloTemplate()
Definition: CaloTemplate.cc:72
tuple result
Definition: mps_fire.py:95
std::vector< ObjectParameter > m_objectParameter
variables containing the parameters
Definition: CaloTemplate.h:130
const int nrObjects() const
get number of trigger objects
Definition: GtCondition.cc:74
std::string m_condName
the name of the condition
Definition: GtCondition.h:156
const int & condRelativeBx() const
get / set the condition relative bx
Definition: GtCondition.h:123
l1t::GtConditionCategory m_condCategory
the category of the condition
Definition: GtCondition.h:159
CaloTemplate & operator=(const CaloTemplate &)
Definition: CaloTemplate.cc:78
const l1t::GtConditionType & condType() const
get / set the type of the condition (1s, etc)
Definition: GtCondition.h:79
void setConditionParameter(const std::vector< ObjectParameter > &objParameter, const CorrelationParameter &corrParameter)
set functions
Definition: CaloTemplate.cc:87
const std::vector< L1GtObject > & objectType() const
get / set the trigger object type(s) in the condition
Definition: GtCondition.h:90
const std::string & condName() const
get / set condition name
Definition: GtCondition.h:57
const bool wsc() const
Definition: GtCondition.cc:131
typedef for correlation parameters
Definition: CaloTemplate.h:81
const l1t::GtConditionCategory & condCategory() const
get / set the category of the condition
Definition: GtCondition.h:68
int m_condRelativeBx
Definition: GtCondition.h:174
const bool condGEq() const
get / set condition GEq flag
Definition: GtCondition.h:101
virtual void print(std::ostream &myCout) const
print the condition
Definition: CaloTemplate.cc:97
const CorrelationParameter * correlationParameter() const
Definition: CaloTemplate.h:104