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