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 
27 
31 
34 
35 //
36 // class decleration
37 //
38 
40 public:
42 
43  ~HcalRecAlgoESProducer() override;
44 
45  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
46 
47  typedef std::unique_ptr<HcalSeverityLevelComputer> ReturnType;
48 
49  ReturnType produce(const HcalSeverityLevelComputerRcd&);
50 
51 private:
52  // ----------member data ---------------------------
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  //the following line is needed to tell the framework what
69  // data is being produced
70  setWhatProduced(this);
71 
72  //now do what ever other initialization is needed
73 }
74 
76  // do anything here that needs to be done at desctruction time
77  // (e.g. close files, deallocate resources etc.)
78 }
79 
80 //
81 // member functions
82 //
83 
84 // ------------ method called to produce the data ------------
86  using namespace edm::es;
87  return std::make_unique<HcalSeverityLevelComputer>(mConfig);
88 }
89 
92  desc.add<unsigned int>("phase", 0);
93  desc.add<std::vector<std::string>>("RecoveredRecHitBits",
94  {
95  "TimingAddedBit",
96  "TimingSubtractedBit",
97  });
98  {
100  vpsd1.add<std::vector<std::string>>("RecHitFlags",
101  {
102  "",
103  });
104  vpsd1.add<std::vector<std::string>>("ChannelStatus",
105  {
106  "",
107  });
108  vpsd1.add<int>("Level", 0);
109  std::vector<edm::ParameterSet> temp1;
110  temp1.reserve(8);
111  {
112  edm::ParameterSet temp2;
113  temp2.addParameter<std::vector<std::string>>("RecHitFlags",
114  {
115  "",
116  });
117  temp2.addParameter<std::vector<std::string>>("ChannelStatus",
118  {
119  "",
120  });
121  temp2.addParameter<int>("Level", 0);
122  temp1.push_back(temp2);
123  }
124  {
125  edm::ParameterSet temp2;
126  temp2.addParameter<std::vector<std::string>>("RecHitFlags",
127  {
128  "",
129  });
130  temp2.addParameter<std::vector<std::string>>("ChannelStatus",
131  {
132  "HcalCellCaloTowerProb",
133  });
134  temp2.addParameter<int>("Level", 1);
135  temp1.push_back(temp2);
136  }
137  {
138  edm::ParameterSet temp2;
139  temp2.addParameter<std::vector<std::string>>("RecHitFlags",
140  {
141  "HSCP_R1R2",
142  "HSCP_FracLeader",
143  "HSCP_OuterEnergy",
144  "HSCP_ExpFit",
145  "ADCSaturationBit",
146  "HBHEIsolatedNoise",
147  "AddedSimHcalNoise",
148  });
149  temp2.addParameter<std::vector<std::string>>("ChannelStatus",
150  {
151  "HcalCellExcludeFromHBHENoiseSummary",
152  });
153  temp2.addParameter<int>("Level", 5);
154  temp1.push_back(temp2);
155  }
156  {
157  edm::ParameterSet temp2;
158  temp2.addParameter<std::vector<std::string>>("RecHitFlags",
159  {
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  });
179  temp2.addParameter<int>("Level", 8);
180  temp1.push_back(temp2);
181  }
182  {
183  edm::ParameterSet temp2;
184  temp2.addParameter<std::vector<std::string>>("RecHitFlags",
185  {
186  "HFLongShort",
187  "HFPET",
188  "HFS8S1Ratio",
189  });
190  temp2.addParameter<std::vector<std::string>>("ChannelStatus",
191  {
192  "",
193  });
194  temp2.addParameter<int>("Level", 11);
195  temp1.push_back(temp2);
196  }
197  {
198  edm::ParameterSet temp2;
199  temp2.addParameter<std::vector<std::string>>("RecHitFlags",
200  {
201  "",
202  });
203  temp2.addParameter<std::vector<std::string>>("ChannelStatus",
204  {
205  "HcalCellCaloTowerMask",
206  });
207  temp2.addParameter<int>("Level", 12);
208  temp1.push_back(temp2);
209  }
210  {
211  edm::ParameterSet temp2;
212  temp2.addParameter<std::vector<std::string>>("RecHitFlags",
213  {
214  "",
215  });
216  temp2.addParameter<std::vector<std::string>>("ChannelStatus",
217  {
218  "HcalCellHot",
219  });
220  temp2.addParameter<int>("Level", 15);
221  temp1.push_back(temp2);
222  }
223  {
224  edm::ParameterSet temp2;
225  temp2.addParameter<std::vector<std::string>>("RecHitFlags",
226  {
227  "",
228  });
229  temp2.addParameter<std::vector<std::string>>("ChannelStatus",
230  {
231  "HcalCellOff",
232  "HcalCellDead",
233  });
234  temp2.addParameter<int>("Level", 20);
235  temp1.push_back(temp2);
236  }
237  desc.addVPSet("SeverityLevels", vpsd1, temp1);
238  }
239  desc.add<std::vector<std::string>>("DropChannelStatusBits",
240  {
241  "HcalCellMask",
242  "HcalCellOff",
243  "HcalCellDead",
244  });
245  descriptions.add("hcalRecAlgos", desc);
246 }
247 
248 //define this as a plug-in
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
ParameterDescriptionBase * addVPSet(U const &iLabel, ParameterSetDescription const &validator, std::vector< ParameterSet > const &defaults)
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:124
HcalRecAlgoESProducer(const edm::ParameterSet &)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
void add(std::string const &label, ParameterSetDescription const &psetDescription)