32 std::vector<edm::ParameterSet>
data = iConfig.
getParameter<std::vector<edm::ParameterSet> >(
"input");
33 std::vector<edm::ParameterSet>::iterator request = data.begin ();
34 for (; request != data.end (); ++request) {
39 if (objectName ==
"Pedestals") {
41 findingRecord <HcalPedestalsRcd> ();
43 else if (objectName ==
"PedestalWidths") {
45 findingRecord <HcalPedestalWidthsRcd> ();
47 else if (objectName ==
"Gains") {
49 findingRecord <HcalGainsRcd> ();
51 else if (objectName ==
"GainWidths") {
53 findingRecord <HcalGainWidthsRcd> ();
55 else if (objectName ==
"QIEData") {
57 findingRecord <HcalQIEDataRcd> ();
59 else if (objectName ==
"QIETypes") {
61 findingRecord <HcalQIETypesRcd> ();
63 else if (objectName ==
"ChannelQuality") {
65 findingRecord <HcalChannelQualityRcd> ();
67 else if (objectName ==
"ZSThresholds") {
69 findingRecord <HcalZSThresholdsRcd> ();
71 else if (objectName ==
"RespCorrs") {
73 findingRecord <HcalRespCorrsRcd> ();
75 else if (objectName ==
"LUTCorrs") {
77 findingRecord <HcalLUTCorrsRcd> ();
79 else if (objectName ==
"PFCorrs") {
81 findingRecord <HcalPFCorrsRcd> ();
83 else if (objectName ==
"TimeCorrs") {
85 findingRecord <HcalTimeCorrsRcd> ();
87 else if (objectName ==
"L1TriggerObjects") {
89 findingRecord <HcalL1TriggerObjectsRcd> ();
91 else if (objectName ==
"ElectronicsMap") {
93 findingRecord <HcalElectronicsMapRcd> ();
95 else if (objectName ==
"FrontEndMap") {
97 findingRecord <HcalFrontEndMapRcd> ();
99 else if (objectName ==
"ValidationCorrs") {
101 findingRecord <HcalValidationCorrsRcd> ();
103 else if (objectName ==
"LutMetadata") {
105 findingRecord <HcalLutMetadataRcd> ();
107 else if (objectName ==
"DcsValues") {
109 findingRecord <HcalDcsRcd> ();
111 else if (objectName ==
"DcsMap") {
113 findingRecord <HcalDcsMapRcd> ();
115 else if (objectName ==
"RecoParams") {
117 findingRecord <HcalRecoParamsRcd> ();
119 else if (objectName ==
"TimingParams") {
121 findingRecord <HcalTimingParamsRcd> ();
123 else if (objectName ==
"LongRecoParams") {
125 findingRecord <HcalLongRecoParamsRcd> ();
127 else if (objectName ==
"ZDCLowGainFractions") {
129 findingRecord <HcalZDCLowGainFractionsRcd> ();
131 else if (objectName ==
"MCParams") {
133 findingRecord <HcalMCParamsRcd> ();
135 else if (objectName ==
"FlagHFDigiTimeParams") {
137 findingRecord <HcalFlagHFDigiTimeParamsRcd> ();
139 else if (objectName ==
"SiPMParameters") {
141 findingRecord <HcalSiPMParametersRcd> ();
143 else if (objectName ==
"SiPMCharacteristics") {
145 findingRecord <HcalSiPMCharacteristicsRcd> ();
147 else if (objectName ==
"TPChannelParameters") {
149 findingRecord <HcalTPChannelParametersRcd> ();
151 else if (objectName ==
"TPParameters") {
153 findingRecord <HcalTPParametersRcd> ();
156 std::cerr <<
"HcalTextCalibrations-> Unknown object name '" << objectName
157 <<
"', known names are: " 158 <<
"Pedestals PedestalWidths Gains GainWidths QIEData QIETypes ChannelQuality ElectronicsMap " 159 <<
"FrontEndMap ZSThresholds RespCorrs LUTCorrs PFCorrs TimeCorrs L1TriggerObjects " 160 <<
"ValidationCorrs LutMetadata DcsValues DcsMap " 161 <<
"RecoParams LongRecoParams ZDCLowGainFraction FlagHFDigiTimeParams MCParams " 162 <<
"SiPMParameters SiPMCharacteristics" << std::endl;
185 auto result = std::make_unique<T>(topo);
187 std::ifstream inStream (fFile.c_str ());
188 if (!inStream.good ()) {
189 std::cerr <<
"HcalTextCalibrations-> Unable to open file '" << fFile <<
"'" << std::endl;
190 throw cms::Exception(
"FileNotFound") <<
"Unable to open '" << fFile <<
"'" << std::endl;
193 std::cerr <<
"HcalTextCalibrations-> Can not read object from file '" << fFile <<
"'" << std::endl;
194 throw cms::Exception(
"ReadError") <<
"Can not read object from file '" << fFile <<
"'" << std::endl;
201 auto result = std::make_unique<T>();
203 std::ifstream inStream (fFile.c_str ());
204 if (!inStream.good ()) {
205 std::cerr <<
"HcalTextCalibrations-> Unable to open file '" << fFile <<
"'" << std::endl;
206 throw cms::Exception(
"FileNotFound") <<
"Unable to open '" << fFile <<
"'" << std::endl;
209 std::cerr <<
"HcalTextCalibrations-> Can not read object from file '" << fFile <<
"'" << std::endl;
210 throw cms::Exception(
"ReadError") <<
"Can not read object from file '" << fFile <<
"'" << std::endl;
222 return produce_impl<HcalPedestals> (topo,mInputs [
"Pedestals"]);
229 return produce_impl<HcalPedestalWidths> (topo,mInputs [
"PedestalWidths"]);
236 return produce_impl<HcalGains> (topo,mInputs [
"Gains"]);
243 return produce_impl<HcalGainWidths> (topo,mInputs [
"GainWidths"]);
250 return produce_impl<HcalQIEData> (topo,mInputs [
"QIEData"]);
257 return produce_impl<HcalQIETypes> (topo,mInputs [
"QIETypes"]);
264 return produce_impl<HcalChannelQuality> (topo,mInputs [
"ChannelQuality"]);
270 return produce_impl<HcalZSThresholds> (topo,mInputs [
"ZSThresholds"]);
277 return produce_impl<HcalRespCorrs> (topo,mInputs [
"RespCorrs"]);
284 return produce_impl<HcalLUTCorrs> (topo,mInputs [
"LUTCorrs"]);
291 return produce_impl<HcalPFCorrs> (topo,mInputs [
"PFCorrs"]);
298 return produce_impl<HcalTimeCorrs> (topo,mInputs [
"TimeCorrs"]);
305 return produce_impl<HcalL1TriggerObjects> (topo,mInputs [
"L1TriggerObjects"]);
309 return produce_impl<HcalElectronicsMap> (mInputs [
"ElectronicsMap"]);
313 return produce_impl<HcalFrontEndMap> (mInputs [
"FrontEndMap"]);
320 return produce_impl<HcalValidationCorrs> (topo,mInputs [
"ValidationCorrs"]);
327 return produce_impl<HcalLutMetadata> (topo,mInputs [
"LutMetadata"]);
330 std::unique_ptr<HcalDcsValues>
332 return produce_impl<HcalDcsValues> (mInputs [
"DcsValues"]);
336 return produce_impl<HcalDcsMap> (mInputs [
"DcsMap"]);
343 return produce_impl<HcalRecoParams> (topo,mInputs [
"RecoParams"]);
350 return produce_impl<HcalLongRecoParams> (topo,mInputs [
"LongRecoParams"]);
357 return produce_impl<HcalZDCLowGainFractions> (topo,mInputs [
"ZDCLowGainFractions"]);
364 return produce_impl<HcalTimingParams> (topo,mInputs [
"TimingParams"]);
370 return produce_impl<HcalMCParams> (topo,mInputs [
"MCParams"]);
377 return produce_impl<HcalFlagHFDigiTimeParams> (topo,mInputs [
"FlagHFDigiTimeParams"]);
384 return produce_impl<HcalSiPMParameters> (topo,mInputs [
"SiPMParameters"]);
388 return produce_impl<HcalSiPMCharacteristics> (mInputs [
"SiPMCharacteristics"]);
395 return produce_impl<HcalTPChannelParameters> (topo,mInputs [
"TPChannelParameters"]);
399 return produce_impl<HcalTPParameters> (mInputs [
"TPParameters"]);
std::unique_ptr< HcalPedestals > producePedestals(const HcalPedestalsRcd &rcd)
std::unique_ptr< HcalGainWidths > produceGainWidths(const HcalGainWidthsRcd &rcd)
T getParameter(std::string const &) const
std::unique_ptr< HcalZDCLowGainFractions > produceZDCLowGainFractions(const HcalZDCLowGainFractionsRcd &rcd)
std::unique_ptr< HcalL1TriggerObjects > produceL1TriggerObjects(const HcalL1TriggerObjectsRcd &rcd)
std::unique_ptr< HcalPedestalWidths > producePedestalWidths(const HcalPedestalWidthsRcd &rcd)
std::unique_ptr< HcalLongRecoParams > produceLongRecoParams(const HcalLongRecoParamsRcd &rcd)
std::unique_ptr< HcalMCParams > produceMCParams(const HcalMCParamsRcd &rcd)
std::unique_ptr< HcalLUTCorrs > produceLUTCorrs(const HcalLUTCorrsRcd &rcd)
std::unique_ptr< HcalPFCorrs > producePFCorrs(const HcalPFCorrsRcd &rcd)
static const IOVSyncValue & endOfTime()
std::unique_ptr< HcalDcsValues > produceDcsValues(HcalDcsRcd const &rcd)
std::unique_ptr< HcalQIEData > produceQIEData(const HcalQIEDataRcd &rcd)
std::pair< Time_t, Time_t > ValidityInterval
virtual void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)
std::unique_ptr< HcalSiPMCharacteristics > produceSiPMCharacteristics(const HcalSiPMCharacteristicsRcd &rcd)
const DepRecordT & getRecord() const
std::unique_ptr< HcalZSThresholds > produceZSThresholds(const HcalZSThresholdsRcd &rcd)
std::unique_ptr< HcalSiPMParameters > produceSiPMParameters(const HcalSiPMParametersRcd &rcd)
std::unique_ptr< HcalDcsMap > produceDcsMap(const HcalDcsMapRcd &rcd)
static const IOVSyncValue & beginOfTime()
std::unique_ptr< HcalRecoParams > produceRecoParams(const HcalRecoParamsRcd &rcd)
std::unique_ptr< HcalChannelQuality > produceChannelQuality(const HcalChannelQualityRcd &rcd)
HcalTextCalibrations(const edm::ParameterSet &)
const char * name() const
std::unique_ptr< HcalTPChannelParameters > produceTPChannelParameters(const HcalTPChannelParametersRcd &rcd)
std::unique_ptr< HcalQIETypes > produceQIETypes(const HcalQIETypesRcd &rcd)
std::unique_ptr< HcalTimingParams > produceTimingParams(const HcalTimingParamsRcd &rcd)
std::unique_ptr< HcalTPParameters > produceTPParameters(const HcalTPParametersRcd &rcd)
std::unique_ptr< HcalElectronicsMap > produceElectronicsMap(const HcalElectronicsMapRcd &rcd)
std::unique_ptr< T > produce_impl(const HcalTopology *topo, const std::string &fFile)
std::unique_ptr< HcalGains > produceGains(const HcalGainsRcd &rcd)
bool getObject(std::istream &fInput, HcalPedestals *fObject)
char data[epos_bytes_allocation]
std::unique_ptr< HcalRespCorrs > produceRespCorrs(const HcalRespCorrsRcd &rcd)
std::unique_ptr< HcalFrontEndMap > produceFrontEndMap(const HcalFrontEndMapRcd &rcd)
std::string fullPath() const
std::unique_ptr< HcalLutMetadata > produceLutMetadata(const HcalLutMetadataRcd &rcd)
std::unique_ptr< HcalTimeCorrs > produceTimeCorrs(const HcalTimeCorrsRcd &rcd)
std::unique_ptr< HcalFlagHFDigiTimeParams > produceFlagHFDigiTimeParams(const HcalFlagHFDigiTimeParamsRcd &rcd)
std::unique_ptr< HcalValidationCorrs > produceValidationCorrs(const HcalValidationCorrsRcd &rcd)