CMS 3D CMS Logo

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();
101  m_condCategory = cp.condCategory();
102  m_condType = cp.condType();
103  m_objectType = cp.objectType();
104  m_condGEq = cp.condGEq();
105  m_condChipNr = cp.condChipNr();
106 
107  m_objectParameter = *(cp.objectParameter());
108  m_correlationParameter = *(cp.correlationParameter());
109 }
110 
111 // output stream operator
112 std::ostream& operator<<(std::ostream& os, const L1GtCaloTemplate& result) {
113  result.print(os);
114  return os;
115 }
L1GtCondition
Definition: L1GtCondition.h:35
L1GtCondition::m_condCategory
L1GtConditionCategory m_condCategory
the category of the condition
Definition: L1GtCondition.h:104
L1GtCondition::m_condType
L1GtConditionType m_condType
the type of the condition (1s, etc)
Definition: L1GtCondition.h:107
mps_fire.i
i
Definition: mps_fire.py:428
L1GtCondition::m_condGEq
bool m_condGEq
the operator used for the condition (>=, =): true for >=
Definition: L1GtCondition.h:113
L1GtCondition::nrObjects
const int nrObjects() const
get number of trigger objects
Definition: L1GtCondition.cc:62
L1GtCaloTemplate.h
L1GlobalTriggerReadoutSetupFwd.h
L1GtCaloTemplate::~L1GtCaloTemplate
~L1GtCaloTemplate() override
Definition: L1GtCaloTemplate.cc:54
L1GtCondition::wsc
const bool wsc() const
Definition: L1GtCondition.cc:114
operator<<
std::ostream & operator<<(std::ostream &os, const L1GtCaloTemplate &result)
Definition: L1GtCaloTemplate.cc:112
hgcal_conditions::parameters
Definition: HGCConditions.h:86
L1GtCaloTemplate::CorrelationParameter::deltaPhiRange
unsigned long long deltaPhiRange
Definition: L1GtCaloTemplate.h:68
L1GtCaloTemplate::CorrelationParameter
typedef for correlation parameters
Definition: L1GtCaloTemplate.h:65
L1GtCaloTemplate::CorrelationParameter::deltaEtaRange
unsigned long long deltaEtaRange
Definition: L1GtCaloTemplate.h:66
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1GtCaloTemplate::setConditionParameter
void setConditionParameter(const std::vector< ObjectParameter > &objParameter, const CorrelationParameter &corrParameter)
set functions
Definition: L1GtCaloTemplate.cc:65
L1GtCaloTemplate::CorrelationParameter::deltaPhiMaxbits
unsigned int deltaPhiMaxbits
Definition: L1GtCaloTemplate.h:69
L1GtConditionType
L1GtConditionType
Definition: L1GtDefinitions.h:4
L1GtCaloTemplate::m_correlationParameter
CorrelationParameter m_correlationParameter
Definition: L1GtCaloTemplate.h:96
L1GtCaloTemplate::L1GtCaloTemplate
L1GtCaloTemplate()
Definition: L1GtCaloTemplate.cc:35
L1GtCaloTemplate
Definition: L1GtCaloTemplate.h:34
L1GtFwd.h
CondCalo
Definition: L1GtDefinitions.h:29
L1GtCaloTemplate::m_objectParameter
std::vector< ObjectParameter > m_objectParameter
variables containing the parameters
Definition: L1GtCaloTemplate.h:95
L1GtCondition::m_condChipNr
int m_condChipNr
condition is located on condition chip m_condChipNr
Definition: L1GtCondition.h:116
L1GtCaloTemplate::copy
void copy(const L1GtCaloTemplate &cp)
copy function for copy constructor and operator=
Definition: L1GtCaloTemplate.cc:99
L1GtCondition::print
virtual void print(std::ostream &myCout) const
print condition
Definition: L1GtCondition.cc:133
L1GtCaloTemplate::print
void print(std::ostream &myCout) const override
print the condition
Definition: L1GtCaloTemplate.cc:71
L1GtCondition::m_objectType
std::vector< L1GtObject > m_objectType
the trigger object type(s)
Definition: L1GtCondition.h:110
mps_fire.result
result
Definition: mps_fire.py:311
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
L1GtCondition::m_condName
std::string m_condName
the name of the condition
Definition: L1GtCondition.h:101
L1GtCaloTemplate::operator=
L1GtCaloTemplate & operator=(const L1GtCaloTemplate &)
Definition: L1GtCaloTemplate.cc:59