CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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();
68  m_condType = cp.condType();
69  m_objectType = cp.objectType();
70  m_condGEq = cp.condGEq();
71  m_condChipNr = cp.condChipNr();
73 
75 }
76 
77 // output stream operator
78 std::ostream& operator<<(std::ostream& os, const MuonShowerTemplate& result) {
79  result.print(os);
80  return os;
81 }
const int nrObjects() const
get number of trigger objects
void setConditionParameter(const std::vector< ObjectParameter > &objParameter)
set functions
bool m_condGEq
the operator used for the condition (&gt;=, =): true for &gt;=
const bool condGEq() const
get / set condition GEq flag
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
const l1t::GtConditionCategory & condCategory() const
get / set the category of the condition
const l1t::GtConditionType & condType() const
get / set the type of the condition (1s, etc)
tuple result
Definition: mps_fire.py:311
const int & condRelativeBx() const
get / set the condition relative bx
void copy(const MuonShowerTemplate &cp)
copy function for copy constructor and operator=
const std::vector< l1t::GlobalObject > & objectType() const
get / set the trigger object type(s) in the condition
~MuonShowerTemplate() override
std::string m_condName
the name of the condition
const int & condChipNr() const
get / set the condition-chip number the condition is located on
int m_condChipNr
condition is located on condition chip m_condChipNr
l1t::GtConditionCategory m_condCategory
the category of the condition
const std::string & condName() const
get / set condition name
virtual void print(std::ostream &myCout) const
print condition
MuonShowerTemplate & operator=(const MuonShowerTemplate &)
std::vector< ObjectParameter > m_objectParameter
variables containing the parameters
void print(std::ostream &myCout) const override
print the condition
const std::vector< ObjectParameter > * objectParameter() const
std::vector< l1t::GlobalObject > m_objectType
the trigger object type(s)
l1t::GtConditionType m_condType
the type of the condition (1s, etc)