test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
StableParametersTrivialProducer.cc
Go to the documentation of this file.
1 
13 // this class header
15 
16 // system include files
17 #include <memory>
18 #include <vector>
19 
20 #include "boost/shared_ptr.hpp"
21 
22 // user include files
23 // base class
25 
28 
31 
33 
34 // forward declarations
35 
36 // constructor(s)
38  const edm::ParameterSet& parSet) {
39 
40  // tell the framework what data is being produced
43 
44  // now do what ever other initialization is needed
45 
46  // trigger decision
47 
48  // number of physics trigger algorithms
50  = parSet.getParameter<unsigned int>("NumberPhysTriggers");
51 
52  // additional number of physics trigger algorithms
54  = parSet.getParameter<unsigned int>("NumberPhysTriggersExtended");
55 
56  // number of technical triggers
58  = parSet.getParameter<unsigned int>("NumberTechnicalTriggers");
59 
60  // trigger objects
61 
62  // muons
63  m_numberL1Mu = parSet.getParameter<unsigned int>("NumberL1Mu");
64 
65  // e/gamma and isolated e/gamma objects
66  m_numberL1NoIsoEG = parSet.getParameter<unsigned int>("NumberL1NoIsoEG");
67  m_numberL1IsoEG = parSet.getParameter<unsigned int>("NumberL1IsoEG");
68 
69  // central, forward and tau jets
70  m_numberL1CenJet = parSet.getParameter<unsigned int>("NumberL1CenJet");
71  m_numberL1ForJet = parSet.getParameter<unsigned int>("NumberL1ForJet");
72  m_numberL1TauJet = parSet.getParameter<unsigned int>("NumberL1TauJet");
73 
74  // jet counts
75  m_numberL1JetCounts = parSet.getParameter<unsigned int>("NumberL1JetCounts");
76 
77  // hardware
78 
79  // number of maximum chips defined in the xml file
81  = parSet.getParameter<unsigned int>("NumberConditionChips");
82 
83  // number of pins on the GTL condition chips
85  = parSet.getParameter<unsigned int>("PinsOnConditionChip");
86 
87  // correspondence "condition chip - GTL algorithm word" in the hardware
88  // e.g.: chip 2: 0 - 95; chip 1: 96 - 128 (191)
90  = parSet.getParameter<std::vector<int> >("OrderConditionChip");
91 
92  // number of PSB boards in GT
93  m_numberPsbBoards = parSet.getParameter<int>("NumberPsbBoards");
94 
97  = parSet.getParameter<unsigned int>("IfCaloEtaNumberBits");
98 
100  m_ifMuEtaNumberBits = parSet.getParameter<unsigned int>("IfMuEtaNumberBits");
101 
102  // GT DAQ record organized in words of WordLength bits
103  m_wordLength = parSet.getParameter<int>("WordLength");
104 
105  // one unit in the word is UnitLength bits
106  m_unitLength = parSet.getParameter<int>("UnitLength");
107 
108 }
109 
110 // destructor
112 
113  // empty
114 
115 }
116 
117 // member functions
118 
119 // method called to produce the data
120 boost::shared_ptr<GlobalStableParameters>
122  const L1TGlobalStableParametersRcd& iRecord) {
123 
124  boost::shared_ptr<GlobalStableParameters> pL1uGtStableParameters =
125  boost::shared_ptr<GlobalStableParameters>(new GlobalStableParameters());
126 
127  // set the number of physics trigger algorithms
128  pL1uGtStableParameters->setGtNumberPhysTriggers(m_numberPhysTriggers);
129 
130  // set the additional number of physics trigger algorithms
131  pL1uGtStableParameters->setGtNumberPhysTriggersExtended(m_numberPhysTriggersExtended);
132 
133  // set the number of technical triggers
134  pL1uGtStableParameters->setGtNumberTechnicalTriggers(m_numberTechnicalTriggers);
135 
136  // set the number of L1 muons received by GT
137  pL1uGtStableParameters->setGtNumberL1Mu(m_numberL1Mu);
138 
139  // set the number of L1 e/gamma objects received by GT
140  pL1uGtStableParameters->setGtNumberL1NoIsoEG(m_numberL1NoIsoEG);
141 
142  // set the number of L1 isolated e/gamma objects received by GT
143  pL1uGtStableParameters->setGtNumberL1IsoEG(m_numberL1IsoEG);
144 
145  // set the number of L1 central jets received by GT
146  pL1uGtStableParameters->setGtNumberL1CenJet(m_numberL1CenJet);
147 
148  // set the number of L1 forward jets received by GT
149  pL1uGtStableParameters->setGtNumberL1ForJet(m_numberL1ForJet);
150 
151  // set the number of L1 tau jets received by GT
152  pL1uGtStableParameters->setGtNumberL1TauJet(m_numberL1TauJet);
153 
154  // set the number of L1 jet counts received by GT
155  pL1uGtStableParameters->setGtNumberL1JetCounts(m_numberL1JetCounts);
156 
157  // hardware stuff
158 
159  // set the number of condition chips in GTL
160  pL1uGtStableParameters->setGtNumberConditionChips(m_numberConditionChips);
161 
162  // set the number of pins on the GTL condition chips
163  pL1uGtStableParameters->setGtPinsOnConditionChip(m_pinsOnConditionChip);
164 
165  // set the correspondence "condition chip - GTL algorithm word"
166  // in the hardware
167  pL1uGtStableParameters->setGtOrderConditionChip(m_orderConditionChip);
168 
169  // set the number of PSB boards in GT
170  pL1uGtStableParameters->setGtNumberPsbBoards(m_numberPsbBoards);
171 
172  // set the number of bits for eta of calorimeter objects
173  pL1uGtStableParameters->setGtIfCaloEtaNumberBits(m_ifCaloEtaNumberBits);
174 
175  // set the number of bits for eta of muon objects
176  pL1uGtStableParameters->setGtIfMuEtaNumberBits(m_ifMuEtaNumberBits);
177 
178  // set WordLength
179  pL1uGtStableParameters->setGtWordLength(m_wordLength);
180 
181  // set one UnitLength
182  pL1uGtStableParameters->setGtUnitLength(m_unitLength);
183 
184  //
185  //
186  return pL1uGtStableParameters;
187 
188 }
189 
T getParameter(std::string const &) const
unsigned int m_ifCaloEtaNumberBits
number of bits for eta of calorimeter objects
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
StableParametersTrivialProducer(const edm::ParameterSet &)
constructor
unsigned int m_numberL1CenJet
central, forward and tau jets
unsigned int m_numberPhysTriggersExtended
additional number of physics trigger algorithms
boost::shared_ptr< GlobalStableParameters > produceGtStableParameters(const L1TGlobalStableParametersRcd &)
public methods
unsigned int m_ifMuEtaNumberBits
number of bits for eta of muon objects
unsigned int m_pinsOnConditionChip
number of pins on the GTL condition chips
int m_unitLength
one unit in the word is UnitLength bits
int m_numberPsbBoards
number of PSB boards in GT
unsigned int m_numberTechnicalTriggers
number of technical triggers
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
unsigned int m_numberL1NoIsoEG
e/gamma and isolated e/gamma objects
int m_wordLength
GT DAQ record organized in words of WordLength bits.
unsigned int m_numberPhysTriggers
trigger decision