38 std::vector<HcalGenericDetId> allCells (
bool h2_mode) {
39 static std::vector<HcalGenericDetId>
result;
46 for(
int sector=1; sector<17; sector++) {
49 if (castortopology.
valid(cell)) result.push_back(cell);
51 if (castortopology.
valid(cell)) result.push_back(cell);
56 for(
int sector= 1; sector < 17; sector++){
59 if(castortopology.
valid(cell)) result.push_back(cell);
61 if(castortopology.
valid(cell)) result.push_back(cell);
74 edm::LogInfo(
"HCAL") <<
"CastorHardcodeCalibrations::CastorHardcodeCalibrations->...";
82 findingRecord <CastorPedestalsRcd> ();
86 findingRecord <CastorPedestalWidthsRcd> ();
90 findingRecord <CastorGainsRcd> ();
94 findingRecord <CastorGainWidthsRcd> ();
98 findingRecord <CastorQIEDataRcd> ();
102 findingRecord <CastorChannelQualityRcd> ();
106 findingRecord <CastorElectronicsMapRcd> ();
110 findingRecord <CastorRecoParamsRcd> ();
114 findingRecord <CastorSaturationCorrsRcd> ();
131 edm::LogInfo(
"HCAL") <<
"CastorHardcodeCalibrations::setIntervalFor-> key: " << record <<
" time: " << iTime.
eventID() <<
'/' << iTime.
time ().
value ();
136 edm::LogInfo(
"HCAL") <<
"CastorHardcodeCalibrations::producePedestals-> ...";
137 auto result = std::make_unique<CastorPedestals>(
false);
138 std::vector <HcalGenericDetId>
cells = allCells(h2mode_);
139 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
141 result->addValues(item);
147 edm::LogInfo(
"HCAL") <<
"CastorHardcodeCalibrations::producePedestalWidths-> ...";
148 auto result = std::make_unique<CastorPedestalWidths>(
false);
149 std::vector <HcalGenericDetId>
cells = allCells(h2mode_);
150 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
152 result->addValues(item);
158 edm::LogInfo(
"HCAL") <<
"CastorHardcodeCalibrations::produceGains-> ...";
159 auto result = std::make_unique<CastorGains>();
160 std::vector <HcalGenericDetId>
cells = allCells(h2mode_);
161 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
163 result->addValues(item);
169 edm::LogInfo(
"HCAL") <<
"CastorHardcodeCalibrations::produceGainWidths-> ...";
170 auto result = std::make_unique<CastorGainWidths>();
171 std::vector <HcalGenericDetId>
cells = allCells(h2mode_);
172 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
174 result->addValues(item);
180 edm::LogInfo(
"HCAL") <<
"CastorHardcodeCalibrations::produceQIEData-> ...";
181 auto result = std::make_unique<CastorQIEData>();
182 std::vector <HcalGenericDetId>
cells = allCells(h2mode_);
183 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
185 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);
202 edm::LogInfo(
"HCAL") <<
"CastorHardcodeCalibrations::produceElectronicsMap-> ...";
204 auto result = std::make_unique<CastorElectronicsMap>();
210 edm::LogInfo(
"HCAL") <<
"CastorHardcodeCalibrations::produceRecoParams-> ...";
211 auto result = std::make_unique<CastorRecoParams>();
212 std::vector <HcalGenericDetId>
cells = allCells(h2mode_);
213 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
215 result->addValues(item);
221 edm::LogInfo(
"HCAL") <<
"CastorHardcodeCalibrations::produceSaturationCorrs-> ...";
222 auto result = std::make_unique<CastorSaturationCorrs>();
223 std::vector <HcalGenericDetId>
cells = allCells(h2mode_);
224 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
226 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