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::unique_ptr<HcalSeverityLevelComputer> ReturnType;
49 
50  ReturnType produce(const HcalSeverityLevelComputerRcd&);
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 {
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 }
75 
76 
78 {
79 
80  // do anything here that needs to be done at desctruction time
81  // (e.g. close files, deallocate resources etc.)
82 
83 }
84 
85 
86 //
87 // member functions
88 //
89 
90 // ------------ method called to produce the data ------------
93 {
94  using namespace edm::es;
95  return std::make_unique<HcalSeverityLevelComputer>(mConfig);
96 }
97 
100  desc.add<unsigned int>("phase", 0);
101  desc.add<std::vector<std::string>>("RecoveredRecHitBits", {
102  "TimingAddedBit",
103  "TimingSubtractedBit",
104  });
105  {
107  vpsd1.add<std::vector<std::string>>("RecHitFlags", {
108  "",
109  });
110  vpsd1.add<std::vector<std::string>>("ChannelStatus", {
111  "",
112  });
113  vpsd1.add<int>("Level", 0);
114  std::vector<edm::ParameterSet> temp1;
115  temp1.reserve(8);
116  {
117  edm::ParameterSet temp2;
118  temp2.addParameter<std::vector<std::string>>("RecHitFlags", {
119  "",
120  });
121  temp2.addParameter<std::vector<std::string>>("ChannelStatus", {
122  "",
123  });
124  temp2.addParameter<int>("Level", 0);
125  temp1.push_back(temp2);
126  }
127  {
128  edm::ParameterSet temp2;
129  temp2.addParameter<std::vector<std::string>>("RecHitFlags", {
130  "",
131  });
132  temp2.addParameter<std::vector<std::string>>("ChannelStatus", {
133  "HcalCellCaloTowerProb",
134  });
135  temp2.addParameter<int>("Level", 1);
136  temp1.push_back(temp2);
137  }
138  {
139  edm::ParameterSet temp2;
140  temp2.addParameter<std::vector<std::string>>("RecHitFlags", {
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  "HcalCellExcludeFromHBHENoiseSummary",
151  });
152  temp2.addParameter<int>("Level", 5);
153  temp1.push_back(temp2);
154  }
155  {
156  edm::ParameterSet temp2;
157  temp2.addParameter<std::vector<std::string>>("RecHitFlags", {
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  temp2.addParameter<int>("Level", 8);
177  temp1.push_back(temp2);
178  }
179  {
180  edm::ParameterSet temp2;
181  temp2.addParameter<std::vector<std::string>>("RecHitFlags", {
182  "HFLongShort",
183  "HFPET",
184  "HFS8S1Ratio",
185  });
186  temp2.addParameter<std::vector<std::string>>("ChannelStatus", {
187  "",
188  });
189  temp2.addParameter<int>("Level", 11);
190  temp1.push_back(temp2);
191  }
192  {
193  edm::ParameterSet temp2;
194  temp2.addParameter<std::vector<std::string>>("RecHitFlags", {
195  "",
196  });
197  temp2.addParameter<std::vector<std::string>>("ChannelStatus", {
198  "HcalCellCaloTowerMask",
199  });
200  temp2.addParameter<int>("Level", 12);
201  temp1.push_back(temp2);
202  }
203  {
204  edm::ParameterSet temp2;
205  temp2.addParameter<std::vector<std::string>>("RecHitFlags", {
206  "",
207  });
208  temp2.addParameter<std::vector<std::string>>("ChannelStatus", {
209  "HcalCellHot",
210  });
211  temp2.addParameter<int>("Level", 15);
212  temp1.push_back(temp2);
213  }
214  {
215  edm::ParameterSet temp2;
216  temp2.addParameter<std::vector<std::string>>("RecHitFlags", {
217  "",
218  });
219  temp2.addParameter<std::vector<std::string>>("ChannelStatus", {
220  "HcalCellOff",
221  "HcalCellDead",
222  });
223  temp2.addParameter<int>("Level", 20);
224  temp1.push_back(temp2);
225  }
226  desc.addVPSet("SeverityLevels", vpsd1, temp1);
227  }
228  desc.add<std::vector<std::string>>("DropChannelStatusBits", {
229  "HcalCellMask",
230  "HcalCellOff",
231  "HcalCellDead",
232  });
233  descriptions.add("hcalRecAlgos", desc);
234 }
235 
236 //define this as a plug-in
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:116
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:143
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)