CMS 3D CMS Logo

MuonShowerTemplate.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 
15  : GlobalCondition(cName, l1t::CondMuonShower, cType) {
16  int nObjects = nrObjects();
17 
18  if (nObjects > 0) {
19  m_objectParameter.reserve(nObjects);
20 
21  m_objectType.reserve(nObjects);
22  m_objectType.assign(nObjects, l1t::gtMuShower);
23  }
24 }
25 
26 // copy constructor
28 
29 // destructor
31  // empty now
32 }
33 
34 // assign operator
36  copy(cp);
37  return *this;
38 }
39 
40 // setConditionParameter - set the parameters of the condition
41 void MuonShowerTemplate::setConditionParameter(const std::vector<ObjectParameter>& objParameter) {
42  m_objectParameter = objParameter;
43 }
44 
45 void MuonShowerTemplate::print(std::ostream& myCout) const {
46  myCout << "\n MuonShowerTemplate 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 << " MuonShower0 = " << std::hex << m_objectParameter[i].MuonShower0 << std::endl;
56  myCout << " MuonShower1 = " << std::hex << m_objectParameter[i].MuonShower1 << std::endl;
57  myCout << " MuonShowerOutOfTime0 = " << std::hex << m_objectParameter[i].MuonShowerOutOfTime0 << std::endl;
58  myCout << " MuonShowerOutOfTime1 = " << std::hex << m_objectParameter[i].MuonShowerOutOfTime1 << std::endl;
59  }
60 
61  // reset to decimal output
62  myCout << std::dec << std::endl;
63 }
64 
66  m_condName = cp.condName();
67  m_condCategory = cp.condCategory();
68  m_condType = cp.condType();
69  m_objectType = cp.objectType();
70  m_condGEq = cp.condGEq();
71  m_condChipNr = cp.condChipNr();
72  m_condRelativeBx = cp.condRelativeBx();
73 
74  m_objectParameter = *(cp.objectParameter());
75 }
76 
77 // output stream operator
78 std::ostream& operator<<(std::ostream& os, const MuonShowerTemplate& result) {
79  result.print(os);
80  return os;
81 }
void setConditionParameter(const std::vector< ObjectParameter > &objParameter)
set functions
bool m_condGEq
the operator used for the condition (>=, =): true for >=
delete x;
Definition: CaloConfig.h:22
void copy(const MuonShowerTemplate &cp)
copy function for copy constructor and operator=
~MuonShowerTemplate() 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::ostream & operator<<(std::ostream &os, const MuonShowerTemplate &result)
MuonShowerTemplate & operator=(const MuonShowerTemplate &)
std::vector< ObjectParameter > m_objectParameter
variables containing the parameters
void print(std::ostream &myCout) const override
print the condition
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