CMS 3D CMS Logo

L1GtEnergySumTemplate.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 
39 }
40 
42  : L1GtCondition(cName, CondEnergySum, cType) {
44 
45  // should be always 1 - they are global quantities...
46  int nObjects = nrObjects();
47 
48  if (nObjects > 0) {
49  m_objectParameter.reserve(nObjects);
50  m_objectType.reserve(nObjects);
51  }
52 }
53 
54 // copy constructor
56  copy(cp);
57 }
58 
59 // destructor
61  // empty now
62 }
63 
64 // assign operator
66  copy(cp);
67  return *this;
68 }
69 
70 // setConditionParameter - set the parameters of the condition
71 void L1GtEnergySumTemplate::setConditionParameter(const std::vector<ObjectParameter>& objParameter) {
72  m_objectParameter = objParameter;
73 }
74 
75 void L1GtEnergySumTemplate::print(std::ostream& myCout) const {
76  myCout << "\n L1GtEnergySumTemplate print..." << std::endl;
77 
78  L1GtCondition::print(myCout);
79 
80  int nObjects = nrObjects();
81 
82  for (int i = 0; i < nObjects; i++) {
83  myCout << std::endl;
84  myCout << " Template for object " << i << " [ hex ]" << std::endl;
85  myCout << " etThreshold = " << std::hex << m_objectParameter[i].etThreshold << std::endl;
86  myCout << " energyOverflow = " << std::hex << m_objectParameter[0].energyOverflow << std::endl;
87 
88  if (m_condType == TypeETM) {
89  myCout << " phi = " << std::hex << m_objectParameter[i].phiRange1Word << std::hex
90  << m_objectParameter[i].phiRange0Word << std::endl;
91  } else if (m_condType == TypeHTM) {
92  myCout << " phi = " << std::hex << m_objectParameter[i].phiRange0Word << std::endl;
93  }
94  }
95 
96  // reset to decimal output
97  myCout << std::dec << std::endl;
98 }
99 
101  m_condName = cp.condName();
102  m_condCategory = cp.condCategory();
103  m_condType = cp.condType();
104  m_objectType = cp.objectType();
105  m_condGEq = cp.condGEq();
106  m_condChipNr = cp.condChipNr();
107 
108  m_objectParameter = *(cp.objectParameter());
109 }
110 
111 // output stream operator
112 std::ostream& operator<<(std::ostream& os, const L1GtEnergySumTemplate& 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
operator<<
std::ostream & operator<<(std::ostream &os, const L1GtEnergySumTemplate &result)
Definition: L1GtEnergySumTemplate.cc:112
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
L1GtEnergySumTemplate
Definition: L1GtEnergySumTemplate.h:34
TypeETM
Definition: L1GtDefinitions.h:12
L1GlobalTriggerReadoutSetupFwd.h
hgcal_conditions::parameters
Definition: HGCConditions.h:86
CondEnergySum
Definition: L1GtDefinitions.h:30
L1GtEnergySumTemplate::setConditionParameter
void setConditionParameter(const std::vector< ObjectParameter > &)
set functions
Definition: L1GtEnergySumTemplate.cc:71
L1GtEnergySumTemplate::L1GtEnergySumTemplate
L1GtEnergySumTemplate()
Definition: L1GtEnergySumTemplate.cc:35
TypeHTM
Definition: L1GtDefinitions.h:15
L1GtEnergySumTemplate::m_objectParameter
std::vector< ObjectParameter > m_objectParameter
variables containing the parameters
Definition: L1GtEnergySumTemplate.h:91
L1GtConditionType
L1GtConditionType
Definition: L1GtDefinitions.h:4
L1GtEnergySumTemplate::operator=
L1GtEnergySumTemplate & operator=(const L1GtEnergySumTemplate &)
Definition: L1GtEnergySumTemplate.cc:65
L1GtFwd.h
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1GtCondition::m_condChipNr
int m_condChipNr
condition is located on condition chip m_condChipNr
Definition: L1GtCondition.h:116
L1GtCondition::print
virtual void print(std::ostream &myCout) const
print condition
Definition: L1GtCondition.cc:133
L1GtEnergySumTemplate::copy
void copy(const L1GtEnergySumTemplate &cp)
copy function for copy constructor and operator=
Definition: L1GtEnergySumTemplate.cc:100
L1GtEnergySumTemplate::~L1GtEnergySumTemplate
~L1GtEnergySumTemplate() override
Definition: L1GtEnergySumTemplate.cc:60
L1GtEnergySumTemplate.h
L1GtEnergySumTemplate::print
void print(std::ostream &myCout) const override
print the condition
Definition: L1GtEnergySumTemplate.cc:75
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:142
L1GtCondition::m_condName
std::string m_condName
the name of the condition
Definition: L1GtCondition.h:101