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 ==
"MCParams") {
128 findingRecord <HcalMCParamsRcd> ();
130 else if (objectName ==
"FlagHFDigiTimeParams") {
132 findingRecord <HcalFlagHFDigiTimeParamsRcd> ();
135 std::cerr <<
"HcalTextCalibrations-> Unknown object name '" << objectName
136 <<
"', known names are: "
137 <<
"Pedestals PedestalWidths Gains GainWidths QIEData ChannelQuality ElectronicsMap "
138 <<
"ZSThresholds RespCorrs LUTCorrs PFCorrs TimeCorrs L1TriggerObjects "
139 <<
"ValidationCorrs LutMetadata DcsValues DcsMap CholeskyMatrices CovarianceMatrices "
140 <<
"RecoParams LongRecoParams FlagHFDigiTimeParams MCParams "
164 std::auto_ptr<T>
result (
new T (topo));
166 std::ifstream inStream (fFile.c_str ());
167 if (!inStream.good ()) {
168 std::cerr <<
"HcalTextCalibrations-> Unable to open file '" << fFile <<
"'" << std::endl;
169 throw cms::Exception(
"FileNotFound") <<
"Unable to open '" << fFile <<
"'" << std::endl;
172 std::cerr <<
"HcalTextCalibrations-> Can not read object from file '" << fFile <<
"'" << std::endl;
173 throw cms::Exception(
"ReadError") <<
"Can not read object from file '" << fFile <<
"'" << std::endl;
180 std::auto_ptr<T>
result (
new T ());
182 std::ifstream inStream (fFile.c_str ());
183 if (!inStream.good ()) {
184 std::cerr <<
"HcalTextCalibrations-> Unable to open file '" << fFile <<
"'" << std::endl;
185 throw cms::Exception(
"FileNotFound") <<
"Unable to open '" << fFile <<
"'" << std::endl;
188 std::cerr <<
"HcalTextCalibrations-> Can not read object from file '" << fFile <<
"'" << std::endl;
189 throw cms::Exception(
"ReadError") <<
"Can not read object from file '" << fFile <<
"'" << std::endl;
201 return produce_impl<HcalPedestals> (topo,mInputs [
"Pedestals"]);
208 return produce_impl<HcalPedestalWidths> (topo,mInputs [
"PedestalWidths"]);
215 return produce_impl<HcalGains> (topo,mInputs [
"Gains"]);
222 return produce_impl<HcalGainWidths> (topo,mInputs [
"GainWidths"]);
229 return produce_impl<HcalQIEData> (topo,mInputs [
"QIEData"]);
236 return produce_impl<HcalChannelQuality> (topo,mInputs [
"ChannelQuality"]);
242 return produce_impl<HcalZSThresholds> (topo,mInputs [
"ZSThresholds"]);
249 return produce_impl<HcalRespCorrs> (topo,mInputs [
"RespCorrs"]);
256 return produce_impl<HcalLUTCorrs> (topo,mInputs [
"LUTCorrs"]);
263 return produce_impl<HcalPFCorrs> (topo,mInputs [
"PFCorrs"]);
270 return produce_impl<HcalTimeCorrs> (topo,mInputs [
"TimeCorrs"]);
277 return produce_impl<HcalL1TriggerObjects> (topo,mInputs [
"L1TriggerObjects"]);
281 return produce_impl<HcalElectronicsMap> (mInputs [
"ElectronicsMap"]);
288 return produce_impl<HcalValidationCorrs> (topo,mInputs [
"ValidationCorrs"]);
295 return produce_impl<HcalLutMetadata> (topo,mInputs [
"LutMetadata"]);
298 std::auto_ptr<HcalDcsValues>
300 return produce_impl<HcalDcsValues> (mInputs [
"DcsValues"]);
304 return produce_impl<HcalDcsMap> (mInputs [
"DcsMap"]);
311 return produce_impl<HcalCovarianceMatrices> (topo,mInputs [
"CovarianceMatrices"]);
318 return produce_impl<HcalCholeskyMatrices> (topo,mInputs [
"CholeskyMatrices"]);
325 return produce_impl<HcalRecoParams> (topo,mInputs [
"RecoParams"]);
332 return produce_impl<HcalLongRecoParams> (topo,mInputs [
"LongRecoParams"]);
338 return produce_impl<HcalTimingParams> (topo,mInputs [
"TimingParams"]);
344 return produce_impl<HcalMCParams> (topo,mInputs [
"MCParams"]);
351 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)
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)