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) {
38 if (objectName ==
"Pedestals") {
40 findingRecord <HcalPedestalsRcd> ();
42 else if (objectName ==
"PedestalWidths") {
44 findingRecord <HcalPedestalWidthsRcd> ();
46 else if (objectName ==
"Gains") {
48 findingRecord <HcalGainsRcd> ();
50 else if (objectName ==
"GainWidths") {
52 findingRecord <HcalGainWidthsRcd> ();
54 else if (objectName ==
"QIEData") {
56 findingRecord <HcalQIEDataRcd> ();
58 else if (objectName ==
"ChannelQuality") {
60 findingRecord <HcalChannelQualityRcd> ();
62 else if (objectName ==
"ZSThresholds") {
64 findingRecord <HcalZSThresholdsRcd> ();
66 else if (objectName ==
"RespCorrs") {
68 findingRecord <HcalRespCorrsRcd> ();
70 else if (objectName ==
"LUTCorrs") {
72 findingRecord <HcalLUTCorrsRcd> ();
74 else if (objectName ==
"PFCorrs") {
76 findingRecord <HcalPFCorrsRcd> ();
78 else if (objectName ==
"TimeCorrs") {
80 findingRecord <HcalTimeCorrsRcd> ();
82 else if (objectName ==
"L1TriggerObjects") {
84 findingRecord <HcalL1TriggerObjectsRcd> ();
86 else if (objectName ==
"ElectronicsMap") {
88 findingRecord <HcalElectronicsMapRcd> ();
90 else if (objectName ==
"ValidationCorrs") {
92 findingRecord <HcalValidationCorrsRcd> ();
94 else if (objectName ==
"LutMetadata") {
96 findingRecord <HcalLutMetadataRcd> ();
98 else if (objectName ==
"DcsValues") {
100 findingRecord <HcalDcsRcd> ();
102 else if (objectName ==
"DcsMap") {
104 findingRecord <HcalDcsMapRcd> ();
106 else if (objectName ==
"CholeskyMatrices") {
108 findingRecord <HcalCholeskyMatricesRcd> ();
110 else if (objectName ==
"CovarianceMatrices") {
112 findingRecord <HcalCovarianceMatricesRcd> ();
114 else if (objectName ==
"RecoParams") {
116 findingRecord <HcalRecoParamsRcd> ();
118 else if (objectName ==
"TimingParams") {
120 findingRecord <HcalTimingParamsRcd> ();
122 else if (objectName ==
"LongRecoParams") {
124 findingRecord <HcalLongRecoParamsRcd> ();
126 else if (objectName ==
"ZDCLowGainFractions") {
128 findingRecord <HcalZDCLowGainFractionsRcd> ();
130 else if (objectName ==
"MCParams") {
132 findingRecord <HcalMCParamsRcd> ();
134 else if (objectName ==
"FlagHFDigiTimeParams") {
136 findingRecord <HcalFlagHFDigiTimeParamsRcd> ();
139 std::cerr <<
"HcalTextCalibrations-> Unknown object name '" << objectName
140 <<
"', known names are: "
141 <<
"Pedestals PedestalWidths Gains GainWidths QIEData ChannelQuality ElectronicsMap "
142 <<
"ZSThresholds RespCorrs LUTCorrs PFCorrs TimeCorrs L1TriggerObjects "
143 <<
"ValidationCorrs LutMetadata DcsValues DcsMap CholeskyMatrices CovarianceMatrices "
144 <<
"RecoParams LongRecoParams ZDCLowGainFraction FlagHFDigiTimeParams MCParams "
168 std::auto_ptr<T>
result (
new T (topo));
170 std::ifstream inStream (fFile.c_str ());
171 if (!inStream.good ()) {
172 std::cerr <<
"HcalTextCalibrations-> Unable to open file '" << fFile <<
"'" << std::endl;
173 throw cms::Exception(
"FileNotFound") <<
"Unable to open '" << fFile <<
"'" << std::endl;
176 std::cerr <<
"HcalTextCalibrations-> Can not read object from file '" << fFile <<
"'" << std::endl;
177 throw cms::Exception(
"ReadError") <<
"Can not read object from file '" << fFile <<
"'" << std::endl;
184 std::auto_ptr<T>
result (
new T ());
186 std::ifstream inStream (fFile.c_str ());
187 if (!inStream.good ()) {
188 std::cerr <<
"HcalTextCalibrations-> Unable to open file '" << fFile <<
"'" << std::endl;
189 throw cms::Exception(
"FileNotFound") <<
"Unable to open '" << fFile <<
"'" << std::endl;
192 std::cerr <<
"HcalTextCalibrations-> Can not read object from file '" << fFile <<
"'" << std::endl;
193 throw cms::Exception(
"ReadError") <<
"Can not read object from file '" << fFile <<
"'" << std::endl;
205 return produce_impl<HcalPedestals> (topo,mInputs [
"Pedestals"]);
212 return produce_impl<HcalPedestalWidths> (topo,mInputs [
"PedestalWidths"]);
219 return produce_impl<HcalGains> (topo,mInputs [
"Gains"]);
226 return produce_impl<HcalGainWidths> (topo,mInputs [
"GainWidths"]);
233 return produce_impl<HcalQIEData> (topo,mInputs [
"QIEData"]);
240 return produce_impl<HcalChannelQuality> (topo,mInputs [
"ChannelQuality"]);
246 return produce_impl<HcalZSThresholds> (topo,mInputs [
"ZSThresholds"]);
253 return produce_impl<HcalRespCorrs> (topo,mInputs [
"RespCorrs"]);
260 return produce_impl<HcalLUTCorrs> (topo,mInputs [
"LUTCorrs"]);
267 return produce_impl<HcalPFCorrs> (topo,mInputs [
"PFCorrs"]);
274 return produce_impl<HcalTimeCorrs> (topo,mInputs [
"TimeCorrs"]);
281 return produce_impl<HcalL1TriggerObjects> (topo,mInputs [
"L1TriggerObjects"]);
285 return produce_impl<HcalElectronicsMap> (mInputs [
"ElectronicsMap"]);
292 return produce_impl<HcalValidationCorrs> (topo,mInputs [
"ValidationCorrs"]);
299 return produce_impl<HcalLutMetadata> (topo,mInputs [
"LutMetadata"]);
302 std::auto_ptr<HcalDcsValues>
304 return produce_impl<HcalDcsValues> (mInputs [
"DcsValues"]);
308 return produce_impl<HcalDcsMap> (mInputs [
"DcsMap"]);
315 return produce_impl<HcalCovarianceMatrices> (topo,mInputs [
"CovarianceMatrices"]);
322 return produce_impl<HcalCholeskyMatrices> (topo,mInputs [
"CholeskyMatrices"]);
329 return produce_impl<HcalRecoParams> (topo,mInputs [
"RecoParams"]);
336 return produce_impl<HcalLongRecoParams> (topo,mInputs [
"LongRecoParams"]);
343 return produce_impl<HcalZDCLowGainFractions> (topo,mInputs [
"ZDCLowGainFractions"]);
350 return produce_impl<HcalTimingParams> (topo,mInputs [
"TimingParams"]);
356 return produce_impl<HcalMCParams> (topo,mInputs [
"MCParams"]);
363 return produce_impl<HcalFlagHFDigiTimeParams> (topo,mInputs [
"FlagHFDigiTimeParams"]);
T getParameter(std::string const &) const
std::auto_ptr< HcalDcsValues > produceDcsValues(HcalDcsRcd const &rcd)
std::auto_ptr< HcalQIEData > produceQIEData(const HcalQIEDataRcd &rcd)
std::auto_ptr< HcalLongRecoParams > produceLongRecoParams(const HcalLongRecoParamsRcd &rcd)
std::auto_ptr< HcalPedestals > producePedestals(const HcalPedestalsRcd &rcd)
std::auto_ptr< HcalCovarianceMatrices > produceCovarianceMatrices(const HcalCovarianceMatricesRcd &rcd)
std::auto_ptr< HcalZDCLowGainFractions > produceZDCLowGainFractions(const HcalZDCLowGainFractionsRcd &rcd)
static const IOVSyncValue & endOfTime()
std::pair< Time_t, Time_t > ValidityInterval
virtual void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)
std::auto_ptr< HcalMCParams > produceMCParams(const HcalMCParamsRcd &rcd)
const DepRecordT & getRecord() const
std::auto_ptr< HcalGainWidths > produceGainWidths(const HcalGainWidthsRcd &rcd)
static const IOVSyncValue & beginOfTime()
std::auto_ptr< HcalZSThresholds > produceZSThresholds(const HcalZSThresholdsRcd &rcd)
std::auto_ptr< HcalValidationCorrs > produceValidationCorrs(const HcalValidationCorrsRcd &rcd)
std::auto_ptr< HcalFlagHFDigiTimeParams > produceFlagHFDigiTimeParams(const HcalFlagHFDigiTimeParamsRcd &rcd)
HcalTextCalibrations(const edm::ParameterSet &)
std::auto_ptr< HcalRespCorrs > produceRespCorrs(const HcalRespCorrsRcd &rcd)
const char * name() const
std::auto_ptr< HcalL1TriggerObjects > produceL1TriggerObjects(const HcalL1TriggerObjectsRcd &rcd)
std::auto_ptr< HcalRecoParams > produceRecoParams(const HcalRecoParamsRcd &rcd)
std::auto_ptr< HcalTimeCorrs > produceTimeCorrs(const HcalTimeCorrsRcd &rcd)
std::auto_ptr< HcalTimingParams > produceTimingParams(const HcalTimingParamsRcd &rcd)
std::auto_ptr< HcalCholeskyMatrices > produceCholeskyMatrices(const HcalCholeskyMatricesRcd &rcd)
std::auto_ptr< HcalChannelQuality > produceChannelQuality(const HcalChannelQualityRcd &rcd)
bool getObject(std::istream &fInput, HcalPedestals *fObject)
char data[epos_bytes_allocation]
std::auto_ptr< HcalGains > produceGains(const HcalGainsRcd &rcd)
std::auto_ptr< HcalLUTCorrs > produceLUTCorrs(const HcalLUTCorrsRcd &rcd)
std::auto_ptr< HcalLutMetadata > produceLutMetadata(const HcalLutMetadataRcd &rcd)
std::string fullPath() const
std::auto_ptr< T > produce_impl(const std::string &fFile)
std::auto_ptr< HcalElectronicsMap > produceElectronicsMap(const HcalElectronicsMapRcd &rcd)
std::auto_ptr< HcalPedestalWidths > producePedestalWidths(const HcalPedestalWidthsRcd &rcd)
std::auto_ptr< HcalPFCorrs > producePFCorrs(const HcalPFCorrsRcd &rcd)
std::auto_ptr< HcalDcsMap > produceDcsMap(const HcalDcsMapRcd &rcd)