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