CMS 3D CMS Logo

StableParametersTrivialProducer.cc
Go to the documentation of this file.
1 
2 // StableParametersTrivialProducer
3 
4 #include <memory>
5 #include <vector>
6 
11 
14 
16 
17 // class declaration
19 public:
20  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
21 
24 
27 
29 
31  std::unique_ptr<L1TGlobalParameters> produceGtStableParameters(const L1TGlobalParametersRcd&);
32 
33 private:
35 };
36 
37 using namespace std;
38 using namespace edm;
39 using namespace l1t;
40 
43 
44  // TotalBxInEvent = cms.int32(5),
45  desc.add<int>("TotalBxInEvent", 5)->setComment("stage2");
46 
47  //NumberPhysTriggers = cms.uint32(512)
48  desc.add<unsigned int>("NumberPhysTriggers", 512)->setComment("Number of physics trigger algorithms");
49 
50  //NumberL1Muon = cms.uint32(12)
51  desc.add<unsigned int>("NumberL1Muon", 12)->setComment("Number of L2 Muons");
52 
53  //NumberL1EGamma = cms.uint32(12),
54  desc.add<unsigned int>("NumberL1EGamma", 12)->setComment("Number of L1 e/gamma objects");
55 
56  //NumberL1Jet = cms.uint32(12),
57  desc.add<unsigned int>("NumberL1Jet", 12)->setComment("Number of L1 jets");
58 
59  //NumberL1Tau = cms.uint32(8),
60  desc.add<unsigned int>("NumberL1Tau", 8)->setComment("Number of L1 taus");
61 
62  //NumberChips = cms.uint32(1),
63  desc.add<unsigned int>("NumberChips", 5)->setComment("Number of chips in Menu");
64 
65  //PinsOnChip = cms.uint32(512),
66  desc.add<unsigned int>("PinsOnChip", 512)->setComment("Number of pins on the GTL condition chips");
67 
68  //OrderOfChip = cms.vint32(1),
69  vector<int> tmp = {1};
70  desc.add<vector<int> >("OrderOfChip", tmp)->setComment("Chip order");
71 
72  //
73  // Deprecated Parameters: These can be removed once the HLT inteface is updated, or HLT takes these conditions from Offline DB.
74  //
75 
76  desc.add<unsigned int>("NumberL1IsoEG", 0)->setComment("Deprecated...");
77  desc.add<unsigned int>("NumberL1JetCounts", 0)->setComment("Deprecated...");
78  desc.add<int>("UnitLength", 0)->setComment("Deprecated...");
79  desc.add<unsigned int>("NumberL1ForJet", 0)->setComment("Deprecated...");
80  desc.add<unsigned int>("IfCaloEtaNumberBits", 0)->setComment("Deprecated...");
81  desc.add<unsigned int>("IfMuEtaNumberBits", 0)->setComment("Deprecated...");
82  desc.add<unsigned int>("NumberL1TauJet", 0)->setComment("Deprecated...");
83  desc.add<unsigned int>("NumberL1Mu", 0)->setComment("Deprecated...");
84  desc.add<unsigned int>("NumberConditionChips", 0)->setComment("Deprecated...");
85  desc.add<int>("NumberPsbBoards", 0)->setComment("Deprecated...");
86  desc.add<unsigned int>("NumberL1CenJet", 0)->setComment("Deprecated...");
87  desc.add<unsigned int>("PinsOnConditionChip", 0)->setComment("Deprecated...");
88  desc.add<unsigned int>("NumberL1NoIsoEG", 0)->setComment("Deprecated...");
89  desc.add<unsigned int>("NumberTechnicalTriggers", 0)->setComment("Deprecated...");
90  desc.add<unsigned int>("NumberPhysTriggersExtended", 0)->setComment("Deprecated...");
91  desc.add<int>("WordLength", 0)->setComment("Deprecated...");
92  vector<int> tmp2 = {1};
93  desc.add<vector<int> >("OrderConditionChip", tmp2)->setComment("Deprecated...");
94 
95  descriptions.add("StableParametersTrivialProducer", desc);
96 }
97 
99  : data_(new L1TGlobalParameters()) {
100  // tell the framework what data is being produced
102 
103  // set the number of bx in event
104  data_.setTotalBxInEvent(parSet.getParameter<int>("TotalBxInEvent"));
105 
106  // set the number of physics trigger algorithms
107  data_.setNumberPhysTriggers(parSet.getParameter<unsigned int>("NumberPhysTriggers"));
108 
109  // set the number of L1 muons received by GT
110  data_.setNumberL1Mu(parSet.getParameter<unsigned int>("NumberL1Muon"));
111 
112  // set the number of L1 e/gamma objects received by GT
113  data_.setNumberL1EG(parSet.getParameter<unsigned int>("NumberL1EGamma"));
114 
115  // set the number of L1 central jets received by GT
116  data_.setNumberL1Jet(parSet.getParameter<unsigned int>("NumberL1Jet"));
117 
118  // set the number of L1 tau jets received by GT
119  data_.setNumberL1Tau(parSet.getParameter<unsigned int>("NumberL1Tau"));
120 
121  // hardware stuff
122 
123  // set the number of condition chips in GTL
124  data_.setNumberChips(parSet.getParameter<unsigned int>("NumberChips"));
125 
126  // set the number of pins on the GTL condition chips
127  data_.setPinsOnChip(parSet.getParameter<unsigned int>("PinsOnChip"));
128 
129  // set the correspondence "condition chip - GTL algorithm word"
130  // in the hardware
131  data_.setOrderOfChip(parSet.getParameter<std::vector<int> >("OrderOfChip"));
132 }
133 
134 // destructor
136  // empty
137 }
138 
139 // member functions
140 
141 // method called to produce the data
143  const L1TGlobalParametersRcd& iRecord) {
144  // Return copy so that we don't give away our owned pointer to framework
145  return std::make_unique<L1TGlobalParameters>(*data_.getWriteInstance());
146 }
147 
l1t::GlobalParamsHelper::setNumberPhysTriggers
void setNumberPhysTriggers(const unsigned int &)
Definition: GlobalParamsHelper.cc:46
l1t::GlobalParamsHelper::setNumberL1Jet
void setNumberL1Jet(const unsigned int &)
Definition: GlobalParamsHelper.cc:64
MessageLogger.h
l1t::GlobalParamsHelper::getWriteInstance
L1TGlobalParameters * getWriteInstance()
Definition: GlobalParamsHelper.h:100
GlobalParamsHelper.h
L1TGlobalParametersRcd.h
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
ESProducer.h
StableParametersTrivialProducer
Definition: StableParametersTrivialProducer.cc:18
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
l1t::GlobalParamsHelper::setOrderOfChip
void setOrderOfChip(const std::vector< int > &)
Definition: GlobalParamsHelper.cc:91
L1TGlobalParameters
Definition: L1TGlobalParameters.h:7
StableParametersTrivialProducer::data_
l1t::GlobalParamsHelper data_
Definition: StableParametersTrivialProducer.cc:34
l1t::GlobalParamsHelper::setNumberL1Mu
void setNumberL1Mu(const unsigned int &)
Definition: GlobalParamsHelper.cc:52
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
StableParametersTrivialProducer::~StableParametersTrivialProducer
~StableParametersTrivialProducer() override
destructor
Definition: StableParametersTrivialProducer.cc:135
l1t::GlobalParamsHelper::setNumberL1EG
void setNumberL1EG(const unsigned int &)
Definition: GlobalParamsHelper.cc:58
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
L1TGlobalParameters.h
MessageDrop.h
edm::ParameterSet
Definition: ParameterSet.h:47
l1t::GlobalParamsHelper
Definition: GlobalParamsHelper.h:33
StableParametersTrivialProducer::produceGtStableParameters
std::unique_ptr< L1TGlobalParameters > produceGtStableParameters(const L1TGlobalParametersRcd &)
public methods
Definition: StableParametersTrivialProducer.cc:142
l1t
delete x;
Definition: CaloConfig.h:22
L1TGlobalParametersRcd
Definition: L1TGlobalParametersRcd.h:4
StableParametersTrivialProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: StableParametersTrivialProducer.cc:41
l1t::GlobalParamsHelper::setTotalBxInEvent
void setTotalBxInEvent(const int &)
Definition: GlobalParamsHelper.cc:40
ModuleFactory.h
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
std
Definition: JetResolutionObject.h:76
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
l1t::GlobalParamsHelper::setPinsOnChip
void setPinsOnChip(const unsigned int &)
Definition: GlobalParamsHelper.cc:84
l1t::GlobalParamsHelper::setNumberChips
void setNumberChips(const unsigned int &)
Definition: GlobalParamsHelper.cc:78
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::ESProducer
Definition: ESProducer.h:104
l1t::GlobalParamsHelper::setNumberL1Tau
void setNumberL1Tau(const unsigned int &)
Definition: GlobalParamsHelper.cc:70
StableParametersTrivialProducer::StableParametersTrivialProducer
StableParametersTrivialProducer(const edm::ParameterSet &)
constructor
Definition: StableParametersTrivialProducer.cc:98