41 std::vector<edm::ParameterSet>
data = iConfig.
getParameter<std::vector<edm::ParameterSet> >(
"input");
42 std::vector<edm::ParameterSet>::iterator request = data.begin();
43 for (; request != data.end(); ++request) {
47 if (objectName ==
"Pedestals") {
49 findingRecord<CastorPedestalsRcd>();
50 }
else if (objectName ==
"PedestalWidths") {
52 findingRecord<CastorPedestalWidthsRcd>();
53 }
else if (objectName ==
"Gains") {
55 findingRecord<CastorGainsRcd>();
56 }
else if (objectName ==
"GainWidths") {
58 findingRecord<CastorGainWidthsRcd>();
59 }
else if (objectName ==
"QIEData") {
61 findingRecord<CastorQIEDataRcd>();
62 }
else if (objectName ==
"ChannelQuality") {
64 findingRecord<CastorChannelQualityRcd>();
65 }
else if (objectName ==
"ElectronicsMap") {
67 findingRecord<CastorElectronicsMapRcd>();
68 }
else if (objectName ==
"RecoParams") {
70 findingRecord<CastorRecoParamsRcd>();
71 }
else if (objectName ==
"SaturationCorrs") {
73 findingRecord<CastorSaturationCorrsRcd>();
75 std::cerr <<
"CastorTextCalibrations-> Unknown object name '" << objectName <<
"', known names are: " 76 <<
"Pedestals PedestalWidths Gains GainWidths QIEData ChannelQuality ElectronicsMap RecoParams " 98 std::unique_ptr<T>
result(
new T());
99 std::ifstream inStream(fFile.c_str());
100 if (!inStream.good()) {
101 std::cerr <<
"CastorTextCalibrations-> Unable to open file '" << fFile <<
"'" << std::endl;
102 throw cms::Exception(
"FileNotFound") <<
"Unable to open '" << fFile <<
"'" << std::endl;
105 std::cerr <<
"CastorTextCalibrations-> Can not read object from file '" << fFile <<
"'" << std::endl;
106 throw cms::Exception(
"ReadError") <<
"Can not read object from file '" << fFile <<
"'" << std::endl;
112 return produce_impl<CastorPedestals>(mInputs[
"Pedestals"]);
116 return produce_impl<CastorPedestalWidths>(mInputs[
"PedestalWidths"]);
120 return produce_impl<CastorGains>(mInputs[
"Gains"]);
124 return produce_impl<CastorGainWidths>(mInputs[
"GainWidths"]);
128 return produce_impl<CastorQIEData>(mInputs[
"QIEData"]);
132 return produce_impl<CastorChannelQuality>(mInputs[
"ChannelQuality"]);
136 return produce_impl<CastorElectronicsMap>(mInputs[
"ElectronicsMap"]);
140 return produce_impl<CastorRecoParams>(mInputs[
"RecoParams"]);
145 return produce_impl<CastorSaturationCorrs>(mInputs[
"SaturationCorrs"]);
T getParameter(std::string const &) const
static const IOVSyncValue & endOfTime()
std::unique_ptr< CastorPedestals > producePedestals(const CastorPedestalsRcd &rcd)
std::pair< Time_t, Time_t > ValidityInterval
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
std::unique_ptr< CastorGainWidths > produceGainWidths(const CastorGainWidthsRcd &rcd)
std::unique_ptr< CastorPedestalWidths > producePedestalWidths(const CastorPedestalWidthsRcd &rcd)
std::unique_ptr< T > produce_impl(const std::string &fFile)
std::unique_ptr< CastorRecoParams > produceRecoParams(const CastorRecoParamsRcd &rcd)
static const IOVSyncValue & beginOfTime()
const char * name() const
Namespace of DDCMS conversion namespace.
std::unique_ptr< CastorChannelQuality > produceChannelQuality(const CastorChannelQualityRcd &rcd)
bool getObject(std::istream &fInput, CastorPedestals &fObject)
char data[epos_bytes_allocation]
std::unique_ptr< CastorSaturationCorrs > produceSaturationCorrs(const CastorSaturationCorrsRcd &rcd)
std::unique_ptr< CastorElectronicsMap > produceElectronicsMap(const CastorElectronicsMapRcd &rcd)
std::string fullPath() const
~CastorTextCalibrations() override
CastorTextCalibrations(const edm::ParameterSet &)
std::unique_ptr< CastorQIEData > produceQIEData(const CastorQIEDataRcd &rcd)
std::unique_ptr< CastorGains > produceGains(const CastorGainsRcd &rcd)