CMS 3D CMS Logo

AXOL1TLTemplate.cc
Go to the documentation of this file.
1 // this class header
3 
4 // system include files
5 #include <iostream>
6 #include <iomanip>
7 
9 
12 }
13 
14 AXOL1TLTemplate::AXOL1TLTemplate(const std::string& cName, const l1t::GtConditionType& cType) //not sure we need cType
15  : GlobalCondition(cName, l1t::CondAXOL1TL, cType) {
16  int nObjects = nrObjects();
17 
18  if (nObjects > 0) {
19  m_objectType.reserve(nObjects);
20  }
21 }
22 
23 // copy constructor
25 
26 // destructor
28  // empty now
29 }
30 
31 // assign operator
33  copy(cp);
34  return *this;
35 }
36 
37 // setConditionParameter - set the parameters of the condition
38 void AXOL1TLTemplate::setConditionParameter(const std::vector<ObjectParameter>& objParameter) {
39  m_objectParameter = objParameter;
40 }
41 
42 //setModelVersion - set the model version of the condition
43 void AXOL1TLTemplate::setModelVersion(const std::string& modelversion) { m_modelVersion = modelversion; }
44 
45 void AXOL1TLTemplate::print(std::ostream& myCout) const {
46  myCout << "\n AXOL1TLTemplate print..." << std::endl;
47 
48  GlobalCondition::print(myCout);
49 
50  int nObjects = nrObjects();
51 
52  for (int i = 0; i < nObjects; i++) {
53  myCout << std::endl;
54  myCout << " Template for object " << i << " [ hex ]" << std::endl;
55  myCout << " AXOL1TLThreshold = " << std::hex << m_objectParameter[i].minAXOL1TLThreshold << std::endl;
56  }
57 
58  // reset to decimal output
59  myCout << std::dec << std::endl;
60 }
61 
63  m_condName = cp.condName();
64  m_condCategory = cp.condCategory();
65  m_condType = cp.condType();
66  m_objectType = cp.objectType(); //not needed for AXOL1TL
67  m_condGEq = cp.condGEq();
68  m_condChipNr = cp.condChipNr();
69  m_condRelativeBx = cp.condRelativeBx();
70 
71  m_modelVersion = cp.modelVersion(); // new for utm 0.12.0
72  m_objectParameter = *(cp.objectParameter());
73 }
74 
75 // output stream operator
76 std::ostream& operator<<(std::ostream& os, const AXOL1TLTemplate& result) {
77  result.print(os);
78  return os;
79 }
AXOL1TLTemplate & operator=(const AXOL1TLTemplate &)
void setModelVersion(const std::string &modelversion)
void setConditionParameter(const std::vector< ObjectParameter > &objParameter)
set functions
void print(std::ostream &myCout) const override
print the condition
bool m_condGEq
the operator used for the condition (>=, =): true for >=
std::ostream & operator<<(std::ostream &os, const AXOL1TLTemplate &result)
delete x;
Definition: CaloConfig.h:22
~AXOL1TLTemplate() override
std::string m_condName
the name of the condition
int m_condChipNr
condition is located on condition chip m_condChipNr
l1t::GtConditionCategory m_condCategory
the category of the condition
std::vector< ObjectParameter > m_objectParameter
variables containing the parameters
void copy(const AXOL1TLTemplate &cp)
copy function for copy constructor and operator=
std::string m_modelVersion
model version
const int nrObjects() const
get number of trigger objects
std::vector< l1t::GlobalObject > m_objectType
the trigger object type(s)
l1t::GtConditionType m_condType
the type of the condition (1s, etc)
virtual void print(std::ostream &myCout) const
print condition