CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 
38 
40  : L1GtCondition(cName, CondCalo, cType) {
41  int nObjects = nrObjects();
42 
43  if (nObjects > 0) {
44  m_objectParameter.reserve(nObjects);
45 
46  m_objectType.reserve(nObjects);
47  }
48 }
49 
50 // copy constructor
52 
53 // destructor
55  // empty now
56 }
57 
58 // assign operator
60  copy(cp);
61  return *this;
62 }
63 
64 // setConditionParameter - set the parameters of the condition
65 void L1GtCaloTemplate::setConditionParameter(const std::vector<ObjectParameter>& objParameter,
66  const CorrelationParameter& corrParameter) {
67  m_objectParameter = objParameter;
68  m_correlationParameter = corrParameter;
69 }
70 
71 void L1GtCaloTemplate::print(std::ostream& myCout) const {
72  myCout << "\n L1GtCaloTemplate print..." << std::endl;
73 
74  L1GtCondition::print(myCout);
75 
76  int nObjects = nrObjects();
77 
78  for (int i = 0; i < nObjects; i++) {
79  myCout << std::endl;
80  myCout << " Template for object " << i << " [ hex ]" << std::endl;
81  myCout << " etThreshold = " << std::hex << m_objectParameter[i].etThreshold << std::endl;
82  myCout << " etaRange = " << std::hex << m_objectParameter[i].etaRange << std::endl;
83  myCout << " phiRange = " << std::hex << m_objectParameter[i].phiRange << std::endl;
84  }
85 
86  if (wsc()) {
87  myCout << " Correlation parameters "
88  << "[ hex ]" << std::endl;
89 
90  myCout << " deltaEtaRange = " << std::hex << m_correlationParameter.deltaEtaRange << std::endl;
91  myCout << " deltaPhiRange = " << std::hex << m_correlationParameter.deltaPhiRange << std::endl;
92  myCout << " deltaPhiMaxbits = " << std::hex << m_correlationParameter.deltaPhiMaxbits << std::endl;
93  }
94 
95  // reset to decimal output
96  myCout << std::dec << std::endl;
97 }
98 
100  m_condName = cp.condName();
102  m_condType = cp.condType();
103  m_objectType = cp.objectType();
104  m_condGEq = cp.condGEq();
105  m_condChipNr = cp.condChipNr();
106 
109 }
110 
111 // output stream operator
112 std::ostream& operator<<(std::ostream& os, const L1GtCaloTemplate& result) {
113  result.print(os);
114  return os;
115 }
const int nrObjects() const
get number of trigger objects
std::vector< ObjectParameter > m_objectParameter
variables containing the parameters
L1GtConditionType
const std::string & condName() const
get / set condition name
Definition: L1GtCondition.h:52
const int & condChipNr() const
get / set the condition-chip number the condition is located on
Definition: L1GtCondition.h:77
const std::vector< L1GtObject > & objectType() const
get / set the trigger object type(s) in the condition
Definition: L1GtCondition.h:67
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:167
virtual void print(std::ostream &myCout) const
print condition
void print(std::ostream &myCout) const override
print the condition
tuple result
Definition: mps_fire.py:311
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:62
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:57
~L1GtCaloTemplate() override
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:72
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