CMS 3D CMS Logo

HcalRecAlgoESProducer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: HcalRecAlgoESProducer
4 // Class: HcalRecAlgoESProducer
5 //
13 //
14 // Original Author: Radek Ofierzynski
15 // Created: Mon Feb 9 10:59:46 CET 2009
16 //
17 //
18 
19 
20 // system include files
21 #include <memory>
22 
23 // user include files
26 
28 
32 
35 
36 //
37 // class decleration
38 //
39 
41  public:
43 
44  ~HcalRecAlgoESProducer() override;
45 
46  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
47 
48  typedef std::shared_ptr<HcalSeverityLevelComputer> ReturnType;
49 
50  ReturnType produce(const HcalSeverityLevelComputerRcd&);
51  private:
52  // ----------member data ---------------------------
53  ReturnType myComputer;
54 };
55 
56 //
57 // constants, enums and typedefs
58 //
59 
60 //
61 // static data member definitions
62 //
63 
64 //
65 // constructors and destructor
66 //
68 {
69  //the following line is needed to tell the framework what
70  // data is being produced
71  setWhatProduced(this);
72 
73  //now do what ever other initialization is needed
74  myComputer = std::make_shared<HcalSeverityLevelComputer>(iConfig);
75 }
76 
77 
79 {
80 
81  // do anything here that needs to be done at desctruction time
82  // (e.g. close files, deallocate resources etc.)
83 
84 }
85 
86 
87 //
88 // member functions
89 //
90 
91 // ------------ method called to produce the data ------------
94 {
95  using namespace edm::es;
96 
97  return myComputer ;
98 }
99 
102  desc.add<unsigned int>("phase", 0);
103  desc.add<std::vector<std::string>>("RecoveredRecHitBits", {
104  "TimingAddedBit",
105  "TimingSubtractedBit",
106  });
107  {
109  vpsd1.add<std::vector<std::string>>("RecHitFlags", {
110  "",
111  });
112  vpsd1.add<std::vector<std::string>>("ChannelStatus", {
113  "",
114  });
115  vpsd1.add<int>("Level", 0);
116  std::vector<edm::ParameterSet> temp1;
117  temp1.reserve(8);
118  {
119  edm::ParameterSet temp2;
120  temp2.addParameter<std::vector<std::string>>("RecHitFlags", {
121  "",
122  });
123  temp2.addParameter<std::vector<std::string>>("ChannelStatus", {
124  "",
125  });
126  temp2.addParameter<int>("Level", 0);
127  temp1.push_back(temp2);
128  }
129  {
130  edm::ParameterSet temp2;
131  temp2.addParameter<std::vector<std::string>>("RecHitFlags", {
132  "",
133  });
134  temp2.addParameter<std::vector<std::string>>("ChannelStatus", {
135  "HcalCellCaloTowerProb",
136  });
137  temp2.addParameter<int>("Level", 1);
138  temp1.push_back(temp2);
139  }
140  {
141  edm::ParameterSet temp2;
142  temp2.addParameter<std::vector<std::string>>("RecHitFlags", {
143  "HSCP_R1R2",
144  "HSCP_FracLeader",
145  "HSCP_OuterEnergy",
146  "HSCP_ExpFit",
147  "ADCSaturationBit",
148  "HBHEIsolatedNoise",
149  "AddedSimHcalNoise",
150  });
151  temp2.addParameter<std::vector<std::string>>("ChannelStatus", {
152  "HcalCellExcludeFromHBHENoiseSummary",
153  });
154  temp2.addParameter<int>("Level", 5);
155  temp1.push_back(temp2);
156  }
157  {
158  edm::ParameterSet temp2;
159  temp2.addParameter<std::vector<std::string>>("RecHitFlags", {
160  "HBHEHpdHitMultiplicity",
161  "HBHEPulseShape",
162  "HOBit",
163  "HFDigiTime",
164  "HFInTimeWindow",
165  "ZDCBit",
166  "CalibrationBit",
167  "TimingErrorBit",
168  "HBHEFlatNoise",
169  "HBHESpikeNoise",
170  "HBHETriangleNoise",
171  "HBHETS4TS5Noise",
172  "HBHENegativeNoise",
173  "HBHEOOTPU",
174  });
175  temp2.addParameter<std::vector<std::string>>("ChannelStatus", {
176  "",
177  });
178  temp2.addParameter<int>("Level", 8);
179  temp1.push_back(temp2);
180  }
181  {
182  edm::ParameterSet temp2;
183  temp2.addParameter<std::vector<std::string>>("RecHitFlags", {
184  "HFLongShort",
185  "HFPET",
186  "HFS8S1Ratio",
187  });
188  temp2.addParameter<std::vector<std::string>>("ChannelStatus", {
189  "",
190  });
191  temp2.addParameter<int>("Level", 11);
192  temp1.push_back(temp2);
193  }
194  {
195  edm::ParameterSet temp2;
196  temp2.addParameter<std::vector<std::string>>("RecHitFlags", {
197  "",
198  });
199  temp2.addParameter<std::vector<std::string>>("ChannelStatus", {
200  "HcalCellCaloTowerMask",
201  });
202  temp2.addParameter<int>("Level", 12);
203  temp1.push_back(temp2);
204  }
205  {
206  edm::ParameterSet temp2;
207  temp2.addParameter<std::vector<std::string>>("RecHitFlags", {
208  "",
209  });
210  temp2.addParameter<std::vector<std::string>>("ChannelStatus", {
211  "HcalCellHot",
212  });
213  temp2.addParameter<int>("Level", 15);
214  temp1.push_back(temp2);
215  }
216  {
217  edm::ParameterSet temp2;
218  temp2.addParameter<std::vector<std::string>>("RecHitFlags", {
219  "",
220  });
221  temp2.addParameter<std::vector<std::string>>("ChannelStatus", {
222  "HcalCellOff",
223  "HcalCellDead",
224  });
225  temp2.addParameter<int>("Level", 20);
226  temp1.push_back(temp2);
227  }
228  desc.addVPSet("SeverityLevels", vpsd1, temp1);
229  }
230  desc.add<std::vector<std::string>>("DropChannelStatusBits", {
231  "HcalCellMask",
232  "HcalCellOff",
233  "HcalCellDead",
234  });
235  descriptions.add("hcalRecAlgos", desc);
236 }
237 
238 //define this as a plug-in
ParameterDescriptionBase * addVPSet(U const &iLabel, ParameterSetDescription const &validator, std::vector< ParameterSet > const &defaults)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
ReturnType produce(const HcalSeverityLevelComputerRcd &)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:144
HcalRecAlgoESProducer(const edm::ParameterSet &)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::shared_ptr< HcalSeverityLevelComputer > ReturnType
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
void add(std::string const &label, ParameterSetDescription const &psetDescription)