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 
2 // StableParametersTrivialProducer
3 
4 
5 #include <memory>
6 #include <vector>
7 #include <boost/cstdint.hpp>
8 
14 
17 
19 
20 // class declaration
22 {
23 
24 public:
25 
26  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
27 
30 
33 
35 
37  std::shared_ptr<L1TGlobalParameters> produceGtStableParameters(
38  const L1TGlobalParametersRcd&);
39 
40 private:
41 
43 
44 };
45 
46 using namespace std;
47 using namespace edm;
48 using namespace l1t;
49 
52 
53  // TotalBxInEvent = cms.int32(5),
54  desc.add<int> ("TotalBxInEvent", 5)->setComment("stage2");
55 
56  //NumberPhysTriggers = cms.uint32(512)
57  desc.add<unsigned int> ("NumberPhysTriggers", 512)->setComment("Number of physics trigger algorithms");
58 
59  //NumberL1Muon = cms.uint32(12)
60  desc.add<unsigned int> ("NumberL1Muon", 12)->setComment("Number of L2 Muons");
61 
62  //NumberL1EGamma = cms.uint32(12),
63  desc.add<unsigned int> ("NumberL1EGamma", 12)->setComment("Number of L1 e/gamma objects");
64 
65  //NumberL1Jet = cms.uint32(12),
66  desc.add<unsigned int> ("NumberL1Jet", 12)->setComment("Number of L1 jets");
67 
68  //NumberL1Tau = cms.uint32(8),
69  desc.add<unsigned int> ("NumberL1Tau", 8)->setComment("Number of L1 taus");
70 
71  //NumberChips = cms.uint32(1),
72  desc.add<unsigned int> ("NumberChips", 5)->setComment("Number of chips in Menu");
73 
74  //PinsOnChip = cms.uint32(512),
75  desc.add<unsigned int> ("PinsOnChip", 512)->setComment("Number of pins on the GTL condition chips");
76 
77  //OrderOfChip = cms.vint32(1),
78  vector<int> tmp = {1};
79  desc.add<vector<int> > ("OrderOfChip", tmp)->setComment("Chip order");
80 
81 
82  //
83  // Deprecated Parameters: These can be removed once the HLT inteface is updated, or HLT takes these conditions from Offline DB.
84  //
85 
86  desc.add<unsigned int> ("NumberL1IsoEG", 0)->setComment("Deprecated...");
87  desc.add<unsigned int> ("NumberL1JetCounts", 0)->setComment("Deprecated...");
88  desc.add<int> ("UnitLength", 0)->setComment("Deprecated...");
89  desc.add<unsigned int> ("NumberL1ForJet", 0)->setComment("Deprecated...");
90  desc.add<unsigned int> ("IfCaloEtaNumberBits", 0)->setComment("Deprecated...");
91  desc.add<unsigned int> ("IfMuEtaNumberBits", 0)->setComment("Deprecated...");
92  desc.add<unsigned int> ("NumberL1TauJet", 0)->setComment("Deprecated...");
93  desc.add<unsigned int> ("NumberL1Mu", 0)->setComment("Deprecated...");
94  desc.add<unsigned int> ("NumberConditionChips", 0)->setComment("Deprecated...");
95  desc.add<int> ("NumberPsbBoards", 0)->setComment("Deprecated...");
96  desc.add<unsigned int> ("NumberL1CenJet", 0)->setComment("Deprecated...");
97  desc.add<unsigned int> ("PinsOnConditionChip", 0)->setComment("Deprecated...");
98  desc.add<unsigned int> ("NumberL1NoIsoEG", 0)->setComment("Deprecated...");
99  desc.add<unsigned int> ("NumberTechnicalTriggers", 0)->setComment("Deprecated...");
100  desc.add<unsigned int> ("NumberPhysTriggersExtended", 0)->setComment("Deprecated...");
101  desc.add<int> ("WordLength", 0)->setComment("Deprecated...");
102  vector<int> tmp2 = {1};
103  desc.add<vector<int> > ("OrderConditionChip", tmp2)->setComment("Deprecated...");
104 
105  descriptions.add("StableParametersTrivialProducer", desc);
106 }
107 
108 
110  const edm::ParameterSet& parSet) :
111  data_(new L1TGlobalParameters()) {
112 
113  // tell the framework what data is being produced
116 
117 
118  // set the number of bx in event
119  data_.setTotalBxInEvent(parSet.getParameter<int>("TotalBxInEvent"));
120 
121  // set the number of physics trigger algorithms
122  data_.setNumberPhysTriggers(parSet.getParameter<unsigned int>("NumberPhysTriggers"));
123 
124  // set the number of L1 muons received by GT
125  data_.setNumberL1Mu(parSet.getParameter<unsigned int>("NumberL1Muon"));
126 
127  // set the number of L1 e/gamma objects received by GT
128  data_.setNumberL1EG(parSet.getParameter<unsigned int>("NumberL1EGamma"));
129 
130  // set the number of L1 central jets received by GT
131  data_.setNumberL1Jet(parSet.getParameter<unsigned int>("NumberL1Jet"));
132 
133  // set the number of L1 tau jets received by GT
134  data_.setNumberL1Tau(parSet.getParameter<unsigned int>("NumberL1Tau"));
135 
136  // hardware stuff
137 
138  // set the number of condition chips in GTL
139  data_.setNumberChips(parSet.getParameter<unsigned int>("NumberChips"));
140 
141  // set the number of pins on the GTL condition chips
142  data_.setPinsOnChip(parSet.getParameter<unsigned int>("PinsOnChip"));
143 
144  // set the correspondence "condition chip - GTL algorithm word"
145  // in the hardware
146  data_.setOrderOfChip(parSet.getParameter<std::vector<int> >("OrderOfChip"));
147 
148 }
149 
150 // destructor
152 
153  // empty
154 
155 }
156 
157 // member functions
158 
159 // method called to produce the data
160 std::shared_ptr<L1TGlobalParameters> StableParametersTrivialProducer::produceGtStableParameters(const L1TGlobalParametersRcd& iRecord) {
161 
162  auto pL1uGtStableParameters = std::shared_ptr<L1TGlobalParameters>(data_.getWriteInstance());
163 
164  return pL1uGtStableParameters;
165 
166 }
167 
T getParameter(std::string const &) const
void setNumberL1Tau(const unsigned int &)
void setNumberL1Jet(const unsigned int &)
void setNumberChips(const unsigned int &)
void setOrderOfChip(const std::vector< int > &)
std::shared_ptr< L1TGlobalParameters > produceGtStableParameters(const L1TGlobalParametersRcd &)
public methods
void setNumberL1EG(const unsigned int &)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
void setTotalBxInEvent(const int &)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
StableParametersTrivialProducer(const edm::ParameterSet &)
constructor
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void setNumberL1Mu(const unsigned int &)
L1TGlobalParameters * getWriteInstance()
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
void setPinsOnChip(const unsigned int &)
void setNumberPhysTriggers(const unsigned int &)