58 std::map<std::string, std::string>
mInputs;
70 std::vector<edm::ParameterSet>
data = iConfig.
getParameter<std::vector<edm::ParameterSet> >(
"input");
71 std::vector<edm::ParameterSet>::iterator request =
data.begin();
72 for (; request !=
data.end(); ++request) {
78 findingRecord<CastorPedestalsRcd>();
81 findingRecord<CastorPedestalWidthsRcd>();
84 findingRecord<CastorGainsRcd>();
87 findingRecord<CastorGainWidthsRcd>();
90 findingRecord<CastorQIEDataRcd>();
93 findingRecord<CastorChannelQualityRcd>();
96 findingRecord<CastorElectronicsMapRcd>();
99 findingRecord<CastorRecoParamsRcd>();
102 findingRecord<CastorSaturationCorrsRcd>();
104 std::cerr <<
"CastorTextCalibrations-> Unknown object name '" <<
objectName <<
"', known names are: " 105 <<
"Pedestals PedestalWidths Gains GainWidths QIEData ChannelQuality ElectronicsMap RecoParams " 127 std::unique_ptr<T>
result(
new T());
128 std::ifstream inStream(fFile.c_str());
129 if (!inStream.good()) {
130 std::cerr <<
"CastorTextCalibrations-> Unable to open file '" << fFile <<
"'" << std::endl;
131 throw cms::Exception(
"FileNotFound") <<
"Unable to open '" << fFile <<
"'" << std::endl;
134 std::cerr <<
"CastorTextCalibrations-> Can not read object from file '" << fFile <<
"'" << std::endl;
135 throw cms::Exception(
"ReadError") <<
"Can not read object from file '" << fFile <<
"'" << std::endl;
141 return produce_impl<CastorPedestals>(mInputs[
"Pedestals"]);
145 return produce_impl<CastorPedestalWidths>(mInputs[
"PedestalWidths"]);
149 return produce_impl<CastorGains>(mInputs[
"Gains"]);
153 return produce_impl<CastorGainWidths>(mInputs[
"GainWidths"]);
157 return produce_impl<CastorQIEData>(mInputs[
"QIEData"]);
161 return produce_impl<CastorChannelQuality>(mInputs[
"ChannelQuality"]);
165 return produce_impl<CastorElectronicsMap>(mInputs[
"ElectronicsMap"]);
169 return produce_impl<CastorRecoParams>(mInputs[
"RecoParams"]);
174 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()
std::map< std::string, std::string > mInputs
Namespace of DDCMS conversion namespace.
#define DEFINE_FWK_EVENTSETUP_SOURCE(type)
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)
~CastorTextCalibrations() override
CastorTextCalibrations(const edm::ParameterSet &)
const char * name() const
std::unique_ptr< CastorQIEData > produceQIEData(const CastorQIEDataRcd &rcd)
std::unique_ptr< CastorGains > produceGains(const CastorGainsRcd &rcd)