test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1GtJetCountsTemplate.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  : L1GtCondition()
37 {
38 
40 
41 }
42 
44  : L1GtCondition(cName)
45 {
46 
48 
49 }
50 
52  const L1GtConditionType& cType)
53  : L1GtCondition(cName, CondJetCounts, cType)
54 {
55 
57 
58  // should be always 1 - they are global quantities...
59  int nObjects = nrObjects();
60 
61  if (nObjects > 0) {
62  m_objectParameter.reserve(nObjects);
63 
64  m_objectType.reserve(nObjects);
65  m_objectType.assign(nObjects, JetCounts);
66  }
67 
68 }
69 
70 // copy constructor
72  : L1GtCondition(cp.m_condName)
73 {
74  copy(cp);
75 }
76 
77 // destructor
79 {
80  // empty now
81 }
82 
83 // assign operator
85 {
86 
87  copy(cp);
88  return *this;
89 }
90 
91 
92 // setConditionParameter - set the parameters of the condition
94  const std::vector<ObjectParameter>& objParameter)
95 {
96 
97  m_objectParameter = objParameter;
98 
99 }
100 
101 void L1GtJetCountsTemplate::print(std::ostream& myCout) const
102 {
103 
104  myCout << "\n L1GtJetCountsTemplate print..." << std::endl;
105 
106  L1GtCondition::print(myCout);
107 
108  int nObjects = nrObjects();
109 
110  for (int i = 0; i < nObjects; i++) {
111  myCout << std::endl;
112  myCout << " Template for object " << i << std::endl;
113  myCout << " countIndex = "
114  << std::hex << m_objectParameter[i].countIndex << " [ dec ]" << std::endl;
115  myCout << " countThreshold = "
116  << std::hex << m_objectParameter[i].countThreshold << " [ hex ]" << std::endl;
117  myCout << " countOverflow = "
118  << std::hex << m_objectParameter[0].countOverflow << std::endl;
119 
120  }
121 
122  // reset to decimal output
123  myCout << std::dec << std::endl;
124 }
125 
127 {
128 
129  m_condName = cp.condName();
131  m_condType = cp.condType();
132  m_objectType = cp.objectType();
133  m_condGEq = cp.condGEq();
134  m_condChipNr = cp.condChipNr();
135 
137 
138 }
139 
140 // output stream operator
141 std::ostream& operator<<(std::ostream& os, const L1GtJetCountsTemplate& result)
142 {
143  result.print(os);
144  return os;
145 
146 }
147 
148 
149 
int i
Definition: DBlmapReader.cc:9
void copy(const L1GtJetCountsTemplate &cp)
copy function for copy constructor and operator=
const int nrObjects() const
get number of trigger objects
void setConditionParameter(const std::vector< ObjectParameter > &)
set functions
const std::string & condName() const
get / set condition name
Definition: L1GtCondition.h:57
const int & condChipNr() const
get / set the condition-chip number the condition is located on
const std::vector< L1GtObject > & objectType() const
get / set the trigger object type(s) in the condition
Definition: L1GtCondition.h:90
std::vector< L1GtObject > m_objectType
the trigger object type(s)
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:188
L1GtConditionType
virtual void print(std::ostream &myCout) const
print condition
tuple result
Definition: mps_fire.py:84
L1GtConditionType m_condType
the type of the condition (1s, etc)
L1GtConditionCategory m_condCategory
the category of the condition
const std::vector< ObjectParameter > * objectParameter() const
const L1GtConditionType & condType() const
get / set the type of the condition (1s, etc)
Definition: L1GtCondition.h:79
std::string m_condName
the name of the condition
const L1GtConditionCategory & condCategory() const
get / set the category of the condition
Definition: L1GtCondition.h:68
virtual void print(std::ostream &myCout) const
print the condition
std::vector< ObjectParameter > m_objectParameter
variables containing the parameters
L1GtJetCountsTemplate & operator=(const L1GtJetCountsTemplate &)
bool m_condGEq
the operator used for the condition (&gt;=, =): true for &gt;=
const bool condGEq() const
get / set condition GEq flag
int m_condChipNr
condition is located on condition chip m_condChipNr