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 void AXOL1TLTemplate::print(std::ostream& myCout) const {
43  myCout << "\n AXOL1TLTemplate print..." << std::endl;
44 
45  GlobalCondition::print(myCout);
46 
47  int nObjects = nrObjects();
48 
49  for (int i = 0; i < nObjects; i++) {
50  myCout << std::endl;
51  myCout << " Template for object " << i << " [ hex ]" << std::endl;
52  myCout << " AXOL1TLThreshold = " << std::hex << m_objectParameter[i].minAXOL1TLThreshold << std::endl;
53  }
54 
55  // reset to decimal output
56  myCout << std::dec << std::endl;
57 }
58 
60  m_condName = cp.condName();
61  m_condCategory = cp.condCategory();
62  m_condType = cp.condType();
63  m_objectType = cp.objectType(); //not needed for AXOL1TL
64  m_condGEq = cp.condGEq();
65  m_condChipNr = cp.condChipNr();
66  m_condRelativeBx = cp.condRelativeBx();
67 
68  m_objectParameter = *(cp.objectParameter());
69 }
70 
71 // output stream operator
72 std::ostream& operator<<(std::ostream& os, const AXOL1TLTemplate& result) {
73  result.print(os);
74  return os;
75 }
AXOL1TLTemplate & operator=(const AXOL1TLTemplate &)
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=
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