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 
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
ConfigurationDescriptions.h
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
HcalRecAlgoESProducer::produce
ReturnType produce(const HcalSeverityLevelComputerRcd &)
Definition: HcalRecAlgoESProducer.cc:85
ESHandle.h
HcalRecAlgoESProducer::~HcalRecAlgoESProducer
~HcalRecAlgoESProducer() override
Definition: HcalRecAlgoESProducer.cc:75
HcalRecAlgoESProducer
Definition: HcalRecAlgoESProducer.cc:39
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
ESProducer.h
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
ParameterSetDescription.h
HcalRecAlgoESProducer::mConfig
const edm::ParameterSet mConfig
Definition: HcalRecAlgoESProducer.cc:53
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
HcalSeverityLevelComputerRcd.h
edm::ParameterSet
Definition: ParameterSet.h:36
edm::ParameterSetDescription::addVPSet
ParameterDescriptionBase * addVPSet(U const &iLabel, ParameterSetDescription const &validator, std::vector< ParameterSet > const &defaults)
Definition: ParameterSetDescription.h:149
edm::ParameterSet::addParameter
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:124
HcalRecAlgoESProducer::ReturnType
std::unique_ptr< HcalSeverityLevelComputer > ReturnType
Definition: HcalRecAlgoESProducer.cc:47
HcalRecAlgoESProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: HcalRecAlgoESProducer.cc:90
ModuleFactory.h
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
HcalRecAlgoESProducer::HcalRecAlgoESProducer
HcalRecAlgoESProducer(const edm::ParameterSet &)
Definition: HcalRecAlgoESProducer.cc:67
edm::es
Definition: es_Label.h:33
HcalSeverityLevelComputer.h
edm::ESProducer
Definition: ESProducer.h:101
ParameterSet.h
HcalSeverityLevelComputerRcd
Definition: HcalSeverityLevelComputerRcd.h:23