CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CaloTemplate.cc
Go to the documentation of this file.
1 
18 // this class header
20 
21 // system include files
22 
23 #include <iostream>
24 #include <iomanip>
25 
26 // user include files
27 
28 // base class
29 
30 // forward declarations
31 
32 // constructors
34 
36 
38  : GlobalCondition(cName, l1t::CondCalo, cType) {
39  int nObjects = nrObjects();
40 
41  if (nObjects > 0) {
42  m_objectParameter.reserve(nObjects);
43 
44  m_objectType.reserve(nObjects);
45  }
46 }
47 
48 // copy constructor
50 
51 // destructor
53  // empty now
54 }
55 
56 // assign operator
58  copy(cp);
59  return *this;
60 }
61 
62 // setConditionParameter - set the parameters of the condition
63 void CaloTemplate::setConditionParameter(const std::vector<ObjectParameter>& objParameter,
64  const CorrelationParameter& corrParameter) {
65  m_objectParameter = objParameter;
66  m_correlationParameter = corrParameter;
67 }
68 
69 void CaloTemplate::print(std::ostream& myCout) const {
70  myCout << "\n CaloTemplate print..." << std::endl;
71 
72  GlobalCondition::print(myCout);
73 
74  int nObjects = nrObjects();
75 
76  for (int i = 0; i < nObjects; i++) {
77  myCout << std::endl;
78  myCout << " Template for object " << i << " [ hex ]" << std::endl;
79  myCout << " etThreshold = " << std::hex << m_objectParameter[i].etLowThreshold << " "
80  << m_objectParameter[i].etHighThreshold << std::endl;
81  myCout << " indexLow = " << std::hex << m_objectParameter[i].indexLow << std::endl;
82  myCout << " indexHigh = " << std::hex << m_objectParameter[i].indexHigh << std::endl;
83  myCout << " etaRange = " << std::hex << m_objectParameter[i].etaRange << std::endl;
84  myCout << " phiRange = " << std::hex << m_objectParameter[i].phiRange << std::endl;
85  myCout << " isolationLUT = " << std::hex << m_objectParameter[i].isolationLUT << std::endl;
86  myCout << " qualityLUT = " << std::hex << m_objectParameter[i].qualityLUT << std::endl;
87  }
88 
89  if (wsc()) {
90  myCout << " Correlation parameters "
91  << "[ hex ]" << std::endl;
92 
93  myCout << " deltaEtaRange = " << std::hex << m_correlationParameter.deltaEtaRange << std::endl;
94  myCout << " deltaPhiRange = " << std::hex << m_correlationParameter.deltaPhiRange << std::endl;
95  myCout << " deltaPhiMaxbits = " << std::hex << m_correlationParameter.deltaPhiMaxbits << std::endl;
96  }
97 
98  // reset to decimal output
99  myCout << std::dec << std::endl;
100 }
101 
103  m_condName = cp.condName();
105  m_condType = cp.condType();
106  m_objectType = cp.objectType();
107  m_condGEq = cp.condGEq();
108  m_condChipNr = cp.condChipNr();
110 
113 }
114 
115 // output stream operator
116 std::ostream& operator<<(std::ostream& os, const CaloTemplate& result) {
117  result.print(os);
118  return os;
119 }
const int nrObjects() const
get number of trigger objects
const std::vector< ObjectParameter > * objectParameter() const
Definition: CaloTemplate.h:99
CorrelationParameter m_correlationParameter
Definition: CaloTemplate.h:120
unsigned long long deltaEtaRange
Definition: CaloTemplate.h:86
bool m_condGEq
the operator used for the condition (&gt;=, =): true for &gt;=
unsigned long long deltaPhiRange
Definition: CaloTemplate.h:88
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:167
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)
tuple result
Definition: mps_fire.py:311
const int & condRelativeBx() const
get / set the condition relative bx
std::vector< ObjectParameter > m_objectParameter
variables containing the parameters
Definition: CaloTemplate.h:119
const std::vector< l1t::GlobalObject > & objectType() const
get / set the trigger object type(s) in the condition
CaloTemplate & operator=(const CaloTemplate &)
Definition: CaloTemplate.cc:57
void setConditionParameter(const std::vector< ObjectParameter > &objParameter, const CorrelationParameter &corrParameter)
set functions
Definition: CaloTemplate.cc:63
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
void print(std::ostream &myCout) const override
print the condition
Definition: CaloTemplate.cc:69
typedef for correlation parameters
Definition: CaloTemplate.h:85
~CaloTemplate() override
Definition: CaloTemplate.cc:52
std::vector< l1t::GlobalObject > m_objectType
the trigger object type(s)
const CorrelationParameter * correlationParameter() const
Definition: CaloTemplate.h:101
l1t::GtConditionType m_condType
the type of the condition (1s, etc)