75 bool pedestalWidthsChanged =
false;
77 [
this,
h=
host.get(),&pedestalWidthsChanged](
auto const& rec) {
79 pedestalWidthsChanged =
true;
83 bool pedestalsChanged =
false;
85 [
this,h=
host.get(),&pedestalsChanged](
auto const& rec) {
87 pedestalsChanged =
true;
90 setupHcalDbService<HcalRecoParams, HcalRecoParamsRcd>(
91 *
host,
record,
"withTopo",
"RecoParams",
"New HCAL RecoParams set");
93 setupHcalDbService<HcalMCParams, HcalMCParamsRcd>(
94 *
host,
record,
"withTopo",
"MCParams",
"New HCAL MCParams set");
96 setupHcalDbService<HcalLutMetadata, HcalLutMetadataRcd>(
97 *
host,
record,
"withTopo",
"LutMetadata",
"New HCAL LUT Metadata set");
99 setupHcalDbService<HcalTPParameters, HcalTPParametersRcd>(
100 *
host,
record,
"",
"TPParameters",
"New HCAL TPParameters set");
102 setupHcalDbService<HcalTPChannelParameters, HcalTPChannelParametersRcd>(
103 *
host,
record,
"withTopo",
"TPChannelParameters",
"New HCAL TPChannelParameters set");
105 setupHcalDbService<HcalSiPMCharacteristics, HcalSiPMCharacteristicsRcd>(
106 *
host,
record,
"",
"SiPMCharacteristics",
"New HCAL SiPMCharacteristics set");
108 setupHcalDbService<HcalSiPMParameters, HcalSiPMParametersRcd>(
109 *
host,
record,
"withTopo",
"SiPMParameters",
"New HCAL SiPMParameters set");
111 setupHcalDbService<HcalFrontEndMap, HcalFrontEndMapRcd>(
112 *
host,
record,
"",
"FrontEndMap",
"New HCAL FrontEnd Map set");
114 setupHcalDbService<HcalElectronicsMap, HcalElectronicsMapRcd>(
115 *
host,
record,
"",
"ElectronicsMap",
"New HCAL Electronics Map set");
117 setupHcalDbService<HcalL1TriggerObjects, HcalL1TriggerObjectsRcd>(
118 *
host,
record,
"withTopo",
"L1TriggerObjects",
"New HCAL L1TriggerObjects set");
120 setupHcalDbService<HcalZSThresholds, HcalZSThresholdsRcd>(
121 *
host,
record,
"withTopo",
"ZSThresholds",
"New HCAL ZSThresholds set");
123 setupHcalDbService<HcalChannelQuality, HcalChannelQualityRcd>(
124 *
host,
record,
"withTopo",
"ChannelQuality",
"New HCAL ChannelQuality set");
126 setupHcalDbService<HcalGainWidths, HcalGainWidthsRcd>(
127 *
host,
record,
"withTopo",
"GainWidths",
"New HCAL GainWidths set");
129 setupHcalDbService<HcalQIETypes, HcalQIETypesRcd>(
130 *
host,
record,
"withTopo",
"QIETypes",
"New HCAL QIETypes set");
132 setupHcalDbService<HcalQIEData, HcalQIEDataRcd>(
133 *
host,
record,
"withTopo",
"QIEData",
"New HCAL QIEData set");
135 setupHcalDbService<HcalTimeCorrs, HcalTimeCorrsRcd>(
136 *
host,
record,
"withTopo",
"TimeCorrs",
"New HCAL TimeCorrs set");
138 setupHcalDbService<HcalPFCorrs, HcalPFCorrsRcd>(
139 *
host,
record,
"withTopo",
"PFCorrs",
"New HCAL PFCorrs set");
141 setupHcalDbService<HcalLUTCorrs, HcalLUTCorrsRcd>(
142 *
host,
record,
"withTopo",
"LUTCorrs",
"New HCAL LUTCorrs set");
144 setupHcalDbService<HcalGains, HcalGainsRcd>(
145 *
host,
record,
"withTopo",
"Gains",
"New HCAL Gains set");
147 setupHcalDbService<HcalRespCorrs, HcalRespCorrsRcd>(
148 *
host,
record,
"withTopo",
"RespCorrs",
"New HCAL RespCorrs set");
150 if (pedestalWidthsChanged) {
155 if (pedestalsChanged) {
163 std::unique_ptr<HcalPedestals>
165 return produceWithTopology<HcalPedestals>(
record);
168 std::unique_ptr<HcalPedestalWidths>
170 return produceWithTopology<HcalPedestalWidths>(
record);
173 std::unique_ptr<HcalPedestals>
177 record.
get(
"effective", item);
179 auto productWithTopology = std::make_unique<HcalPedestals>(*item);
184 productWithTopology->setTopo(topo);
186 return productWithTopology;
189 std::unique_ptr<HcalPedestalWidths>
193 record.
get(
"effective", item);
195 auto productWithTopology = std::make_unique<HcalPedestalWidths>(*item);
198 record.
template getRecord<HcalRecNumberingRecord>().
get(htopo);
200 productWithTopology->setTopo(topo);
202 return productWithTopology;
205 std::unique_ptr<HcalGains>
207 return produceWithTopology<HcalGains>(
record);
210 std::unique_ptr<HcalGainWidths>
212 return produceWithTopology<HcalGainWidths>(
record);
215 std::unique_ptr<HcalQIEData>
217 return produceWithTopology<HcalQIEData>(
record);
220 std::unique_ptr<HcalQIETypes>
222 return produceWithTopology<HcalQIETypes>(
record);
225 std::unique_ptr<HcalChannelQuality>
227 return produceWithTopology<HcalChannelQuality>(
record);
230 std::unique_ptr<HcalZSThresholds>
232 return produceWithTopology<HcalZSThresholds>(
record);
235 std::unique_ptr<HcalRespCorrs>
237 return produceWithTopology<HcalRespCorrs>(
record);
240 std::unique_ptr<HcalL1TriggerObjects>
242 return produceWithTopology<HcalL1TriggerObjects>(
record);
245 std::unique_ptr<HcalTimeCorrs>
247 return produceWithTopology<HcalTimeCorrs>(
record);
250 std::unique_ptr<HcalLUTCorrs>
252 return produceWithTopology<HcalLUTCorrs>(
record);
255 std::unique_ptr<HcalPFCorrs>
257 return produceWithTopology<HcalPFCorrs>(
record);
260 std::unique_ptr<HcalLutMetadata>
262 return produceWithTopology<HcalLutMetadata>(
record);
265 std::unique_ptr<HcalSiPMParameters>
267 return produceWithTopology<HcalSiPMParameters>(
record);
270 std::unique_ptr<HcalTPChannelParameters>
272 return produceWithTopology<HcalTPChannelParameters>(
record);
275 std::unique_ptr<HcalMCParams>
277 return produceWithTopology<HcalMCParams>(
record);
280 std::unique_ptr<HcalRecoParams>
282 return produceWithTopology<HcalRecoParams>(
record);
288 record.
get(
"withTopo", item);
292 *
mDumpStream <<
"New HCAL Pedestals set" << std::endl;
300 record.
get(
"withTopoEff", item);
304 *
mDumpStream <<
"New HCAL EffectivePedestals set" << std::endl;
312 record.
get(
"withTopo", item);
316 *
mDumpStream <<
"New HCAL PedestalWidths set" << std::endl;
324 record.
get(
"withTopoEff", item);
328 *
mDumpStream <<
"New HCAL EffectivePedestalWidths set" << std::endl;
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
T getUntrackedParameter(std::string const &, T const &) const
std::unique_ptr< HcalLutMetadata > produceLUTMetadataWithTopo(const HcalLutMetadataRcd &)
void setupPedestals(const HcalPedestalsRcd &, HcalDbService &)
std::unique_ptr< HcalQIETypes > produceQIETypesWithTopo(const HcalQIETypesRcd &)
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
std::unique_ptr< HcalTimeCorrs > produceTimeCorrsWithTopo(const HcalTimeCorrsRcd &)
std::unique_ptr< HcalPedestalWidths > producePedestalWidthsWithTopo(const HcalPedestalWidthsRcd &)
std::unique_ptr< HcalRespCorrs > produceRespCorrsWithTopo(const HcalRespCorrsRcd &)
HcalDbProducer(const edm::ParameterSet &)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::unique_ptr< HcalSiPMParameters > produceSiPMParametersWithTopo(const HcalSiPMParametersRcd &)
std::unique_ptr< HcalTPChannelParameters > produceTPChannelParametersWithTopo(const HcalTPChannelParametersRcd &)
std::unique_ptr< HcalChannelQuality > produceChannelQualityWithTopo(const HcalChannelQualityRcd &)
std::vector< std::string > mDumpRequest
const DepRecordT getRecord() const
std::unique_ptr< HcalPedestals > produceEffectivePedestalsWithTopo(const HcalPedestalsRcd &)
void setData(const HcalPedestals *fItem, bool eff=false)
std::unique_ptr< HcalPFCorrs > producePFCorrsWithTopo(const HcalPFCorrsRcd &)
std::unique_ptr< HcalLUTCorrs > produceLUTCorrsWithTopo(const HcalLUTCorrsRcd &)
std::unique_ptr< HcalGains > produceGainsWithTopo(const HcalGainsRcd &)
void setupEffectivePedestalWidths(const HcalPedestalWidthsRcd &, HcalDbService &)
std::unique_ptr< HcalZSThresholds > produceZSThresholdsWithTopo(const HcalZSThresholdsRcd &)
std::unique_ptr< HcalRecoParams > produceRecoParamsWithTopo(const HcalRecoParamsRcd &)
std::unique_ptr< HcalL1TriggerObjects > produceL1triggerObjectsWithTopo(const HcalL1TriggerObjectsRcd &)
~HcalDbProducer() override
std::unique_ptr< HcalMCParams > produceMCParamsWithTopo(const HcalMCParamsRcd &)
bool dumpObject(std::ostream &fOutput, const HcalPedestals &fObject)
std::unique_ptr< HcalGainWidths > produceGainWidthsWithTopo(const HcalGainWidthsRcd &)
edm::ESProductHost< HcalDbService, HcalPedestalsRcd, HcalPedestalWidthsRcd, HcalGainsRcd, HcalGainWidthsRcd, HcalQIEDataRcd, HcalQIETypesRcd, HcalChannelQualityRcd, HcalZSThresholdsRcd, HcalRespCorrsRcd, HcalL1TriggerObjectsRcd, HcalTimeCorrsRcd, HcalLUTCorrsRcd, HcalPFCorrsRcd, HcalLutMetadataRcd, HcalSiPMParametersRcd, HcalTPChannelParametersRcd, HcalMCParamsRcd, HcalRecoParamsRcd, HcalElectronicsMapRcd, HcalFrontEndMapRcd, HcalSiPMCharacteristicsRcd, HcalTPParametersRcd > HostType
void setupPedestalWidths(const HcalPedestalWidthsRcd &, HcalDbService &)
std::ostream * mDumpStream
std::shared_ptr< HcalDbService > produce(const HcalDbRecord &)
std::unique_ptr< HcalQIEData > produceQIEDataWithTopo(const HcalQIEDataRcd &)
std::unique_ptr< HcalPedestals > producePedestalsWithTopo(const HcalPedestalsRcd &)
edm::ReusableObjectHolder< HostType > holder_
std::unique_ptr< HcalPedestalWidths > produceEffectivePedestalWidthsWithTopo(const HcalPedestalWidthsRcd &)
T const * product() const
bool get(HolderT &iHolder) const
void setupEffectivePedestals(const HcalPedestalsRcd &, HcalDbService &)