38 std::vector<HcalGenericDetId> allCells(
bool h2_mode) {
39 static std::vector<HcalGenericDetId>
result;
45 for (
int sector = 1; sector < 17; sector++) {
48 if (castortopology.
valid(cell))
49 result.push_back(cell);
51 if (castortopology.
valid(cell))
52 result.push_back(cell);
57 for (
int sector = 1; sector < 17; sector++) {
60 if (castortopology.
valid(cell))
61 result.push_back(cell);
63 if (castortopology.
valid(cell))
64 result.push_back(cell);
75 edm::LogInfo(
"HCAL") <<
"CastorHardcodeCalibrations::CastorHardcodeCalibrations->...";
83 findingRecord<CastorPedestalsRcd>();
87 findingRecord<CastorPedestalWidthsRcd>();
91 findingRecord<CastorGainsRcd>();
95 findingRecord<CastorGainWidthsRcd>();
99 findingRecord<CastorQIEDataRcd>();
103 findingRecord<CastorChannelQualityRcd>();
107 findingRecord<CastorElectronicsMapRcd>();
111 findingRecord<CastorRecoParamsRcd>();
115 findingRecord<CastorSaturationCorrsRcd>();
129 edm::LogInfo(
"HCAL") <<
"CastorHardcodeCalibrations::setIntervalFor-> key: " << record <<
" time: " << iTime.
eventID()
135 edm::LogInfo(
"HCAL") <<
"CastorHardcodeCalibrations::producePedestals-> ...";
136 auto result = std::make_unique<CastorPedestals>(
false);
137 std::vector<HcalGenericDetId>
cells = allCells(h2mode_);
138 for (std::vector<HcalGenericDetId>::const_iterator cell = cells.begin(); cell != cells.end(); ++cell) {
140 result->addValues(item);
146 edm::LogInfo(
"HCAL") <<
"CastorHardcodeCalibrations::producePedestalWidths-> ...";
147 auto result = std::make_unique<CastorPedestalWidths>(
false);
148 std::vector<HcalGenericDetId>
cells = allCells(h2mode_);
149 for (std::vector<HcalGenericDetId>::const_iterator cell = cells.begin(); cell != cells.end(); ++cell) {
151 result->addValues(item);
157 edm::LogInfo(
"HCAL") <<
"CastorHardcodeCalibrations::produceGains-> ...";
158 auto result = std::make_unique<CastorGains>();
159 std::vector<HcalGenericDetId>
cells = allCells(h2mode_);
160 for (std::vector<HcalGenericDetId>::const_iterator cell = cells.begin(); cell != cells.end(); ++cell) {
162 result->addValues(item);
168 edm::LogInfo(
"HCAL") <<
"CastorHardcodeCalibrations::produceGainWidths-> ...";
169 auto result = std::make_unique<CastorGainWidths>();
170 std::vector<HcalGenericDetId>
cells = allCells(h2mode_);
171 for (std::vector<HcalGenericDetId>::const_iterator cell = cells.begin(); cell != cells.end(); ++cell) {
173 result->addValues(item);
179 edm::LogInfo(
"HCAL") <<
"CastorHardcodeCalibrations::produceQIEData-> ...";
180 auto result = std::make_unique<CastorQIEData>();
181 std::vector<HcalGenericDetId>
cells = allCells(h2mode_);
182 for (std::vector<HcalGenericDetId>::const_iterator cell = cells.begin(); cell != cells.end(); ++cell) {
184 result->addCoder(coder);
191 edm::LogInfo(
"HCAL") <<
"CastorHardcodeCalibrations::produceChannelQuality-> ...";
192 auto result = std::make_unique<CastorChannelQuality>();
193 std::vector<HcalGenericDetId>
cells = allCells(h2mode_);
194 for (std::vector<HcalGenericDetId>::const_iterator cell = cells.begin(); cell != cells.end(); ++cell) {
196 result->addValues(item);
203 edm::LogInfo(
"HCAL") <<
"CastorHardcodeCalibrations::produceElectronicsMap-> ...";
205 auto result = std::make_unique<CastorElectronicsMap>();
211 edm::LogInfo(
"HCAL") <<
"CastorHardcodeCalibrations::produceRecoParams-> ...";
212 auto result = std::make_unique<CastorRecoParams>();
213 std::vector<HcalGenericDetId>
cells = allCells(h2mode_);
214 for (std::vector<HcalGenericDetId>::const_iterator cell = cells.begin(); cell != cells.end(); ++cell) {
216 result->addValues(item);
223 edm::LogInfo(
"HCAL") <<
"CastorHardcodeCalibrations::produceSaturationCorrs-> ...";
224 auto result = std::make_unique<CastorSaturationCorrs>();
225 std::vector<HcalGenericDetId>
cells = allCells(h2mode_);
226 for (std::vector<HcalGenericDetId>::const_iterator cell = cells.begin(); cell != cells.end(); ++cell) {
228 result->addValues(item);
CastorPedestalWidth makePedestalWidth(HcalGenericDetId fId)
T getUntrackedParameter(std::string const &, T const &) const
CastorQIECoder makeQIECoder(HcalGenericDetId fId)
const EventID & eventID() const
std::unique_ptr< CastorQIEData > produceQIEData(const CastorQIEDataRcd &rcd)
void makeHardcodeMap(CastorElectronicsMap &emap)
std::unique_ptr< CastorRecoParams > produceRecoParams(const CastorRecoParamsRcd &rcd)
std::unique_ptr< CastorChannelQuality > produceChannelQuality(const CastorChannelQualityRcd &rcd)
static const IOVSyncValue & endOfTime()
constexpr uint32_t rawId() const
get the raw id
std::pair< Time_t, Time_t > ValidityInterval
std::unique_ptr< CastorPedestalWidths > producePedestalWidths(const CastorPedestalWidthsRcd &rcd)
CastorHardcodeCalibrations(const edm::ParameterSet &)
std::unique_ptr< CastorPedestals > producePedestals(const CastorPedestalsRcd &rcd)
std::unique_ptr< CastorSaturationCorrs > produceSaturationCorrs(const CastorSaturationCorrsRcd &rcd)
std::unique_ptr< CastorGainWidths > produceGainWidths(const CastorGainWidthsRcd &rcd)
static const IOVSyncValue & beginOfTime()
CastorRecoParam makeRecoParam(HcalGenericDetId fId)
std::unique_ptr< CastorElectronicsMap > produceElectronicsMap(const CastorElectronicsMapRcd &rcd)
const char * name() const
CastorSaturationCorr makeSaturationCorr(HcalGenericDetId fId)
Namespace of DDCMS conversion namespace.
virtual bool valid(const HcalCastorDetId &id) const
CastorGainWidth makeGainWidth(HcalGenericDetId fId)
CastorPedestal makePedestal(HcalGenericDetId fId, bool fSmear=false)
~CastorHardcodeCalibrations() override
CastorGain makeGain(HcalGenericDetId fId, bool fSmear=false)
std::unique_ptr< CastorGains > produceGains(const CastorGainsRcd &rcd)
const Timestamp & time() const
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
TimeValue_t value() const