CMS 3D CMS Logo

GlobalParamsHelper.cc
Go to the documentation of this file.
2 
3 using namespace l1t;
4 
6  return new GlobalParamsHelper(es);
7 }
8 
11  x->useCopy();
12  return x;
13 }
14 
16  write_ = w;
17  check_write();
18  we_own_write_ = false;
20  read_ = write_;
21 }
22 
24  read_ = es;
25  write_ = nullptr;
26 }
27 
30  we_own_write_ = true;
31  read_ = write_;
32 }
33 
35  if (we_own_write_ && write_)
36  delete write_;
37 }
38 
39 // set the number of bx in event
40 void GlobalParamsHelper::setTotalBxInEvent(const int& numberBxValue) {
41  check_write();
42  write_->m_totalBxInEvent = numberBxValue;
43 }
44 
45 // set the number of physics trigger algorithms
46 void GlobalParamsHelper::setNumberPhysTriggers(const unsigned int& numberPhysTriggersValue) {
47  check_write();
48  write_->m_numberPhysTriggers = numberPhysTriggersValue;
49 }
50 
51 // set the number of L1 muons received by GT
52 void GlobalParamsHelper::setNumberL1Mu(const unsigned int& numberL1MuValue) {
53  check_write();
54  write_->m_numberL1Mu = numberL1MuValue;
55 }
56 
57 // set the number of L1 e/gamma objects received by GT
58 void GlobalParamsHelper::setNumberL1EG(const unsigned int& numberL1EGValue) {
59  check_write();
60  write_->m_numberL1EG = numberL1EGValue;
61 }
62 
63 // set the number of L1 central jets received by GT
64 void GlobalParamsHelper::setNumberL1Jet(const unsigned int& numberL1JetValue) {
65  check_write();
66  write_->m_numberL1Jet = numberL1JetValue;
67 }
68 
69 // set the number of L1 tau jets received by GT
70 void GlobalParamsHelper::setNumberL1Tau(const unsigned int& numberL1TauValue) {
71  check_write();
72  write_->m_numberL1Tau = numberL1TauValue;
73 }
74 
75 // hardware stuff
76 
77 // set the number of condition chips in GTL
78 void GlobalParamsHelper::setNumberChips(const unsigned int& numberChipsValue) {
79  check_write();
80  write_->m_numberChips = numberChipsValue;
81 }
82 
83 // set the number of pins on the GTL condition chips
84 void GlobalParamsHelper::setPinsOnChip(const unsigned int& pinsOnChipValue) {
85  check_write();
86  write_->m_pinsOnChip = pinsOnChipValue;
87 }
88 
89 // set the correspondence "condition chip - GTL algorithm word"
90 // in the hardware
91 void GlobalParamsHelper::setOrderOfChip(const std::vector<int>& orderOfChipValue) {
92  check_write();
93  write_->m_orderOfChip = orderOfChipValue;
94 }
95 
96 // print all the L1 GT stable parameters
97 void GlobalParamsHelper::print(std::ostream& myStr) const {
98  myStr << "\nL1T Global Parameters \n" << std::endl;
99 
100  // number of bx
101  myStr << "\n Number of bx in Event = " << read_->m_totalBxInEvent << std::endl;
102 
103  // trigger decision
104 
105  // number of physics trigger algorithms
106  myStr << "\n Number of physics trigger algorithms = " << read_->m_numberPhysTriggers << std::endl;
107 
108  // muons
109  myStr << "\n Number of muons received by L1 GT = " << read_->m_numberL1Mu << std::endl;
110 
111  // e/gamma and isolated e/gamma objects
112  myStr << " Number of e/gamma objects received by L1 GT = " << read_->m_numberL1EG << std::endl;
113 
114  // central, forward and tau jets
115  myStr << "\n Number of jets received by L1 GT = " << read_->m_numberL1Jet << std::endl;
116 
117  myStr << " Number of tau received by L1 GT = " << read_->m_numberL1Tau << std::endl;
118 
119  // hardware
120 
121  // number of condition chips
122  myStr << "\n Number of condition chips = " << read_->m_numberChips << std::endl;
123 
124  // number of pins on the GTL condition chips
125  myStr << " Number of pins on chips = " << read_->m_pinsOnChip << std::endl;
126 
127  // correspondence "condition chip - GTL algorithm word" in the hardware
128  // chip 2: 0 - 95; chip 1: 96 - 128 (191)
129  myStr << " Order of chips for algorithm word = {";
130 
131  for (unsigned int iChip = 0; iChip < read_->m_orderOfChip.size(); ++iChip) {
132  myStr << read_->m_orderOfChip[iChip];
133  if (iChip != (read_->m_orderOfChip.size() - 1)) {
134  myStr << ", ";
135  }
136  }
137 
138  myStr << "}" << std::endl;
139 
140  myStr << "\n" << std::endl;
141 }
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
void setNumberChips(const unsigned int &)
T w() const
std::vector< int > m_orderOfChip
correspondence "condition chip - GTL algorithm word" 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
delete x;
Definition: CaloConfig.h:22
static const GlobalParamsHelper * readFromEventSetup(const L1TGlobalParameters *es)
void setNumberL1EG(const unsigned int &)
void setTotalBxInEvent(const int &)
int m_totalBxInEvent
bx in event
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_
float x
void setPinsOnChip(const unsigned int &)
unsigned int m_numberPhysTriggers
trigger decision
void setNumberPhysTriggers(const unsigned int &)
static GlobalParamsHelper * readAndWriteFromEventSetup(const L1TGlobalParameters *es)