test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GlobalParamsHelper.cc
Go to the documentation of this file.
2 
3 using namespace l1t;
4 
5 
7  return new GlobalParamsHelper(es);
8 }
9 
12  x->useCopy();
13  return x;
14 }
15 
17  write_ = w;
18  check_write();
19  we_own_write_ = false;
21  read_ = write_;
22 }
23 
25 
28  we_own_write_ = true;
29  read_ = write_;
30 }
31 
33  if (we_own_write_ && write_) delete write_;
34 }
35 
36 // set the number of bx in event
38  const int& numberBxValue) {
39 
40  check_write(); write_->m_totalBxInEvent = numberBxValue;
41 
42 }
43 
44 // set the number of physics trigger algorithms
46  const unsigned int& numberPhysTriggersValue) {
47 
48  check_write(); write_->m_numberPhysTriggers = numberPhysTriggersValue;
49 
50 }
51 
52 // set the number of L1 muons received by GT
53 void GlobalParamsHelper::setNumberL1Mu(const unsigned int& numberL1MuValue) {
54 
55  check_write(); write_->m_numberL1Mu = numberL1MuValue;
56 
57 }
58 
59 // set the number of L1 e/gamma objects received by GT
61  const unsigned int& numberL1EGValue) {
62 
63  check_write(); write_->m_numberL1EG = numberL1EGValue;
64 
65 }
66 
67 // set the number of L1 central jets received by GT
69  const unsigned int& numberL1JetValue) {
70 
71  check_write(); write_->m_numberL1Jet = numberL1JetValue;
72 
73 }
74 
75 // set the number of L1 tau jets received by GT
77  const unsigned int& numberL1TauValue) {
78 
79  check_write(); write_->m_numberL1Tau = numberL1TauValue;
80 
81 }
82 
83 // hardware stuff
84 
85 // set the number of condition chips in GTL
87  const unsigned int& numberChipsValue) {
88 
89  check_write(); write_->m_numberChips = numberChipsValue;
90 
91 }
92 
93 // set the number of pins on the GTL condition chips
95  const unsigned int& pinsOnChipValue) {
96 
97  check_write(); write_->m_pinsOnChip = pinsOnChipValue;
98 
99 }
100 
101 // set the correspondence "condition chip - GTL algorithm word"
102 // in the hardware
104  const std::vector<int>& orderOfChipValue) {
105 
106  check_write(); write_->m_orderOfChip = orderOfChipValue;
107 
108 }
109 
110 // print all the L1 GT stable parameters
111 void GlobalParamsHelper::print(std::ostream& myStr) const {
112  myStr << "\nL1T Global Parameters \n" << std::endl;
113 
114 
115  // number of bx
116  myStr << "\n Number of bx in Event = "
117  << read_->m_totalBxInEvent << std::endl;
118 
119  // trigger decision
120 
121  // number of physics trigger algorithms
122  myStr << "\n Number of physics trigger algorithms = "
123  << read_->m_numberPhysTriggers << std::endl;
124 
125  // muons
126  myStr << "\n Number of muons received by L1 GT = "
127  << read_->m_numberL1Mu << std::endl;
128 
129  // e/gamma and isolated e/gamma objects
130  myStr << " Number of e/gamma objects received by L1 GT = "
131  << read_->m_numberL1EG << std::endl;
132 
133  // central, forward and tau jets
134  myStr << "\n Number of jets received by L1 GT = "
135  << read_->m_numberL1Jet << std::endl;
136 
137  myStr << " Number of tau received by L1 GT = "
138  << read_->m_numberL1Tau << std::endl;
139 
140 
141  // hardware
142 
143  // number of condition chips
144  myStr << "\n Number of condition chips = "
145  << read_->m_numberChips << std::endl;
146 
147  // number of pins on the GTL condition chips
148  myStr << " Number of pins on chips = "
149  << read_->m_pinsOnChip << std::endl;
150 
151  // correspondence "condition chip - GTL algorithm word" in the hardware
152  // chip 2: 0 - 95; chip 1: 96 - 128 (191)
153  myStr << " Order of chips for algorithm word = {";
154 
155  for (unsigned int iChip = 0; iChip < read_->m_orderOfChip.size(); ++iChip) {
156  myStr << read_->m_orderOfChip[iChip];
157  if (iChip != (read_->m_orderOfChip.size() - 1)) {
158  myStr << ", ";
159  }
160  }
161 
162  myStr << "}" << std::endl;
163 
164  myStr << "\n" << std::endl;
165 
166 }
void setNumberL1Tau(const unsigned int &)
void setNumberL1Jet(const unsigned int &)
unsigned int m_pinsOnChip
number of pins on the GTL condition chips
unsigned int m_numberL1Mu
trigger objects
const double w
Definition: UKUtility.cc:23
void setNumberChips(const unsigned int &)
std::vector< int > m_orderOfChip
correspondence &quot;condition chip - GTL algorithm word&quot; in the hardware
unsigned int m_numberL1Jet
jets
void setOrderOfChip(const std::vector< int > &)
void print(std::ostream &) const
print all the L1 GT parameters
#define NULL
Definition: scimark2.h:8
static const GlobalParamsHelper * readFromEventSetup(const L1TGlobalParameters *es)
void setNumberL1EG(const unsigned int &)
void setTotalBxInEvent(const int &)
int m_totalBxInEvent
bx in event
T x() const
Cartesian x coordinate.
L1TGlobalParameters * write_
GlobalParamsHelper(L1TGlobalParameters *w)
unsigned int m_numberL1EG
e/gamma objects
unsigned int m_numberL1Tau
taus
unsigned int m_numberChips
hardware
void setNumberL1Mu(const unsigned int &)
const L1TGlobalParameters * read_
void setPinsOnChip(const unsigned int &)
unsigned int m_numberPhysTriggers
trigger decision
void setNumberPhysTriggers(const unsigned int &)
static GlobalParamsHelper * readAndWriteFromEventSetup(const L1TGlobalParameters *es)