CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes
HcalDbProducer Class Reference

#include <CalibFormats/HcalDbProducer/interface/HcalDbProducer.h>

Inheritance diagram for HcalDbProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

 HcalDbProducer (const edm::ParameterSet &)
 
std::shared_ptr< HcalDbServiceproduce (const HcalDbRecord &)
 
std::unique_ptr< HcalChannelQualityproduceChannelQualityWithTopo (const HcalChannelQualityRcd &)
 
std::unique_ptr< HcalPedestalsproduceEffectivePedestalsWithTopo (const HcalPedestalsRcd &)
 
std::unique_ptr< HcalPedestalWidthsproduceEffectivePedestalWidthsWithTopo (const HcalPedestalWidthsRcd &)
 
std::unique_ptr< HcalGainsproduceGainsWithTopo (const HcalGainsRcd &)
 
std::unique_ptr< HcalGainWidthsproduceGainWidthsWithTopo (const HcalGainWidthsRcd &)
 
std::unique_ptr< HcalL1TriggerObjectsproduceL1triggerObjectsWithTopo (const HcalL1TriggerObjectsRcd &)
 
std::unique_ptr< HcalLUTCorrsproduceLUTCorrsWithTopo (const HcalLUTCorrsRcd &)
 
std::unique_ptr< HcalLutMetadataproduceLUTMetadataWithTopo (const HcalLutMetadataRcd &)
 
std::unique_ptr< HcalMCParamsproduceMCParamsWithTopo (const HcalMCParamsRcd &)
 
std::unique_ptr< HcalPedestalsproducePedestalsWithTopo (const HcalPedestalsRcd &)
 
std::unique_ptr< HcalPedestalWidthsproducePedestalWidthsWithTopo (const HcalPedestalWidthsRcd &)
 
std::unique_ptr< HcalPFCorrsproducePFCorrsWithTopo (const HcalPFCorrsRcd &)
 
std::unique_ptr< HcalQIEDataproduceQIEDataWithTopo (const HcalQIEDataRcd &)
 
std::unique_ptr< HcalQIETypesproduceQIETypesWithTopo (const HcalQIETypesRcd &)
 
std::unique_ptr< HcalRecoParamsproduceRecoParamsWithTopo (const HcalRecoParamsRcd &)
 
std::unique_ptr< HcalRespCorrsproduceRespCorrsWithTopo (const HcalRespCorrsRcd &)
 
std::unique_ptr< HcalSiPMParametersproduceSiPMParametersWithTopo (const HcalSiPMParametersRcd &)
 
std::unique_ptr< HcalTimeCorrsproduceTimeCorrsWithTopo (const HcalTimeCorrsRcd &)
 
std::unique_ptr< HcalTPChannelParametersproduceTPChannelParametersWithTopo (const HcalTPChannelParametersRcd &)
 
std::unique_ptr< HcalZSThresholdsproduceZSThresholdsWithTopo (const HcalZSThresholdsRcd &)
 
void setupEffectivePedestals (const HcalPedestalsRcd &, HcalDbService &)
 
void setupEffectivePedestalWidths (const HcalPedestalWidthsRcd &, HcalDbService &)
 
void setupPedestals (const HcalPedestalsRcd &, HcalDbService &)
 
void setupPedestalWidths (const HcalPedestalWidthsRcd &, HcalDbService &)
 
 ~HcalDbProducer () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer ()(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval) override
 overrides DataProxyProvider method More...
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
 DataProxyProvider ()
 
const ComponentDescriptiondescription () const
 
bool isUsingRecord (const EventSetupRecordKey &) const
 
const KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey) const
 
void resetProxies (const EventSetupRecordKey &iRecordType)
 
void resetProxiesIfTransient (const EventSetupRecordKey &iRecordType)
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 

Private Types

using HostType = edm::ESProductHost< HcalDbService, HcalPedestalsRcd, HcalPedestalWidthsRcd, HcalGainsRcd, HcalGainWidthsRcd, HcalQIEDataRcd, HcalQIETypesRcd, HcalChannelQualityRcd, HcalZSThresholdsRcd, HcalRespCorrsRcd, HcalL1TriggerObjectsRcd, HcalTimeCorrsRcd, HcalLUTCorrsRcd, HcalPFCorrsRcd, HcalLutMetadataRcd, HcalSiPMParametersRcd, HcalTPChannelParametersRcd, HcalMCParamsRcd, HcalRecoParamsRcd, HcalElectronicsMapRcd, HcalFrontEndMapRcd, HcalSiPMCharacteristicsRcd, HcalTPParametersRcd >
 

Private Member Functions

template<typename ProductType , typename RecordType >
void setupHcalDbService (HostType &host, const HcalDbRecord &record, const char *label, const char *dumpName, const char *dumpHeader)
 

Static Private Member Functions

template<typename ProductType , typename RecordType >
static std::unique_ptr< ProductType > produceWithTopology (RecordType const &record)
 

Private Attributes

edm::ReusableObjectHolder< HostTypeholder_
 
std::vector< std::string > mDumpRequest
 
std::ostream * mDumpStream
 

Additional Inherited Members

- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair< DataKey, edm::propagate_const< std::shared_ptr< DataProxy > > > > KeyedProxies
 
typedef std::vector< EventSetupRecordKeyKeys
 
typedef std::map< EventSetupRecordKey, KeyedProxiesRecordProxies
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::ESProducer
 ESProducer (const ESProducer &)=delete
 
ESProducer const & operator= (const ESProducer &)=delete
 
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &iLabel={})
 
template<typename T >
auto setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
auto setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord >
auto setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
ESConsumesCollectorT< TRecord > setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={})
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList) override
 override DataProxyProvider method More...
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
void eraseAll (const EventSetupRecordKey &iRecordKey)
 deletes all the Proxies in aStream More...
 
void invalidateProxies (const EventSetupRecordKey &iRecordKey)
 
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &)
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 37 of file HcalDbProducer.h.

Member Typedef Documentation

Definition at line 94 of file HcalDbProducer.h.

Constructor & Destructor Documentation

HcalDbProducer::HcalDbProducer ( const edm::ParameterSet fConfig)

Definition at line 28 of file HcalDbProducer.cc.

References gather_cfg::cout, edm::ParameterSet::getUntrackedParameter(), mDumpRequest, mDumpStream, produceChannelQualityWithTopo(), produceEffectivePedestalsWithTopo(), produceEffectivePedestalWidthsWithTopo(), produceGainsWithTopo(), produceGainWidthsWithTopo(), produceL1triggerObjectsWithTopo(), produceLUTCorrsWithTopo(), produceLUTMetadataWithTopo(), produceMCParamsWithTopo(), producePedestalsWithTopo(), producePedestalWidthsWithTopo(), producePFCorrsWithTopo(), produceQIEDataWithTopo(), produceQIETypesWithTopo(), produceRecoParamsWithTopo(), produceRespCorrsWithTopo(), produceSiPMParametersWithTopo(), produceTimeCorrsWithTopo(), produceTPChannelParametersWithTopo(), produceZSThresholdsWithTopo(), edm::ESProducer::setWhatProduced(), and AlCaHLTBitMon_QueryRunRegistry::string.

29  : ESProducer(),
30  mDumpRequest (),
31  mDumpStream(nullptr)
32 {
33  setWhatProduced (this);
34 
55 
56  mDumpRequest = fConfig.getUntrackedParameter <std::vector <std::string> > ("dump", std::vector<std::string>());
57  if (!mDumpRequest.empty()) {
58  std::string otputFile = fConfig.getUntrackedParameter <std::string> ("file", "");
59  mDumpStream = otputFile.empty () ? &std::cout : new std::ofstream (otputFile.c_str());
60  }
61 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:124
T getUntrackedParameter(std::string const &, T const &) const
std::unique_ptr< HcalLutMetadata > produceLUTMetadataWithTopo(const HcalLutMetadataRcd &)
std::unique_ptr< HcalQIETypes > produceQIETypesWithTopo(const HcalQIETypesRcd &)
std::unique_ptr< HcalTimeCorrs > produceTimeCorrsWithTopo(const HcalTimeCorrsRcd &)
std::unique_ptr< HcalPedestalWidths > producePedestalWidthsWithTopo(const HcalPedestalWidthsRcd &)
std::unique_ptr< HcalRespCorrs > produceRespCorrsWithTopo(const HcalRespCorrsRcd &)
std::unique_ptr< HcalSiPMParameters > produceSiPMParametersWithTopo(const HcalSiPMParametersRcd &)
std::unique_ptr< HcalTPChannelParameters > produceTPChannelParametersWithTopo(const HcalTPChannelParametersRcd &)
std::unique_ptr< HcalChannelQuality > produceChannelQualityWithTopo(const HcalChannelQualityRcd &)
std::vector< std::string > mDumpRequest
std::unique_ptr< HcalPedestals > produceEffectivePedestalsWithTopo(const HcalPedestalsRcd &)
std::unique_ptr< HcalPFCorrs > producePFCorrsWithTopo(const HcalPFCorrsRcd &)
std::unique_ptr< HcalLUTCorrs > produceLUTCorrsWithTopo(const HcalLUTCorrsRcd &)
std::unique_ptr< HcalGains > produceGainsWithTopo(const HcalGainsRcd &)
std::unique_ptr< HcalZSThresholds > produceZSThresholdsWithTopo(const HcalZSThresholdsRcd &)
std::unique_ptr< HcalRecoParams > produceRecoParamsWithTopo(const HcalRecoParamsRcd &)
std::unique_ptr< HcalL1TriggerObjects > produceL1triggerObjectsWithTopo(const HcalL1TriggerObjectsRcd &)
std::unique_ptr< HcalMCParams > produceMCParamsWithTopo(const HcalMCParamsRcd &)
std::unique_ptr< HcalGainWidths > produceGainWidthsWithTopo(const HcalGainWidthsRcd &)
std::ostream * mDumpStream
std::unique_ptr< HcalQIEData > produceQIEDataWithTopo(const HcalQIEDataRcd &)
std::unique_ptr< HcalPedestals > producePedestalsWithTopo(const HcalPedestalsRcd &)
std::unique_ptr< HcalPedestalWidths > produceEffectivePedestalWidthsWithTopo(const HcalPedestalWidthsRcd &)
HcalDbProducer::~HcalDbProducer ( )
override

Definition at line 63 of file HcalDbProducer.cc.

References gather_cfg::cout, and mDumpStream.

63  {
64 
65  if (mDumpStream != &std::cout) delete mDumpStream;
66 }
std::ostream * mDumpStream

Member Function Documentation

std::shared_ptr< HcalDbService > HcalDbProducer::produce ( const HcalDbRecord record)

Definition at line 69 of file HcalDbProducer.cc.

References edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), h, holder_, query::host, edm::ReusableObjectHolder< T >::makeOrGet(), record, setupEffectivePedestals(), setupEffectivePedestalWidths(), setupPedestals(), and setupPedestalWidths().

Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), and HTMLExport.HTMLExportStatic::export().

69  {
70 
71  auto host = holder_.makeOrGet([]() {
72  return new HostType;
73  });
74 
75  bool pedestalWidthsChanged = false;
76  host->ifRecordChanges<HcalPedestalWidthsRcd>(record,
77  [this,h=host.get(),&pedestalWidthsChanged](auto const& rec) {
79  pedestalWidthsChanged = true;
80  });
81 
82 
83  bool pedestalsChanged = false;
84  host->ifRecordChanges<HcalPedestalsRcd>(record,
85  [this,h=host.get(),&pedestalsChanged](auto const& rec) {
86  setupEffectivePedestals(rec, *h);
87  pedestalsChanged = true;
88  });
89 
90  setupHcalDbService<HcalRecoParams, HcalRecoParamsRcd>(
91  *host, record, "withTopo", "RecoParams", "New HCAL RecoParams set");
92 
93  setupHcalDbService<HcalMCParams, HcalMCParamsRcd>(
94  *host, record, "withTopo", "MCParams", "New HCAL MCParams set");
95 
96  setupHcalDbService<HcalLutMetadata, HcalLutMetadataRcd>(
97  *host, record, "withTopo", "LutMetadata", "New HCAL LUT Metadata set");
98 
99  setupHcalDbService<HcalTPParameters, HcalTPParametersRcd>(
100  *host, record, "", "TPParameters", "New HCAL TPParameters set");
101 
102  setupHcalDbService<HcalTPChannelParameters, HcalTPChannelParametersRcd>(
103  *host, record, "withTopo", "TPChannelParameters", "New HCAL TPChannelParameters set");
104 
105  setupHcalDbService<HcalSiPMCharacteristics, HcalSiPMCharacteristicsRcd>(
106  *host, record, "", "SiPMCharacteristics", "New HCAL SiPMCharacteristics set");
107 
108  setupHcalDbService<HcalSiPMParameters, HcalSiPMParametersRcd>(
109  *host, record, "withTopo", "SiPMParameters", "New HCAL SiPMParameters set");
110 
111  setupHcalDbService<HcalFrontEndMap, HcalFrontEndMapRcd>(
112  *host, record, "", "FrontEndMap", "New HCAL FrontEnd Map set");
113 
114  setupHcalDbService<HcalElectronicsMap, HcalElectronicsMapRcd>(
115  *host, record, "", "ElectronicsMap", "New HCAL Electronics Map set");
116 
117  setupHcalDbService<HcalL1TriggerObjects, HcalL1TriggerObjectsRcd>(
118  *host, record, "withTopo", "L1TriggerObjects", "New HCAL L1TriggerObjects set");
119 
120  setupHcalDbService<HcalZSThresholds, HcalZSThresholdsRcd>(
121  *host, record, "withTopo", "ZSThresholds", "New HCAL ZSThresholds set");
122 
123  setupHcalDbService<HcalChannelQuality, HcalChannelQualityRcd>(
124  *host, record, "withTopo", "ChannelQuality", "New HCAL ChannelQuality set");
125 
126  setupHcalDbService<HcalGainWidths, HcalGainWidthsRcd>(
127  *host, record, "withTopo", "GainWidths", "New HCAL GainWidths set");
128 
129  setupHcalDbService<HcalQIETypes, HcalQIETypesRcd>(
130  *host, record, "withTopo", "QIETypes", "New HCAL QIETypes set");
131 
132  setupHcalDbService<HcalQIEData, HcalQIEDataRcd>(
133  *host, record, "withTopo", "QIEData", "New HCAL QIEData set");
134 
135  setupHcalDbService<HcalTimeCorrs, HcalTimeCorrsRcd>(
136  *host, record, "withTopo", "TimeCorrs", "New HCAL TimeCorrs set");
137 
138  setupHcalDbService<HcalPFCorrs, HcalPFCorrsRcd>(
139  *host, record, "withTopo", "PFCorrs", "New HCAL PFCorrs set");
140 
141  setupHcalDbService<HcalLUTCorrs, HcalLUTCorrsRcd>(
142  *host, record, "withTopo", "LUTCorrs", "New HCAL LUTCorrs set");
143 
144  setupHcalDbService<HcalGains, HcalGainsRcd>(
145  *host, record, "withTopo", "Gains", "New HCAL Gains set");
146 
147  setupHcalDbService<HcalRespCorrs, HcalRespCorrsRcd>(
148  *host, record, "withTopo", "RespCorrs", "New HCAL RespCorrs set");
149 
150  if (pedestalWidthsChanged) {
152  setupPedestalWidths(rec, *host);
153  }
154 
155  if (pedestalsChanged) {
156  HcalPedestalsRcd const& rec = record.getRecord<HcalPedestalsRcd>();
157  setupPedestals(rec, *host);
158  }
159 
160  return host;
161 }
host
Definition: query.py:115
void setupPedestals(const HcalPedestalsRcd &, HcalDbService &)
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
JetCorrectorParameters::Record record
Definition: classes.h:7
std::shared_ptr< T > makeOrGet(F iFunc)
If there isn&#39;t an object already available, creates a new one using iFunc.
void setupEffectivePedestalWidths(const HcalPedestalWidthsRcd &, HcalDbService &)
edm::ESProductHost< HcalDbService, HcalPedestalsRcd, HcalPedestalWidthsRcd, HcalGainsRcd, HcalGainWidthsRcd, HcalQIEDataRcd, HcalQIETypesRcd, HcalChannelQualityRcd, HcalZSThresholdsRcd, HcalRespCorrsRcd, HcalL1TriggerObjectsRcd, HcalTimeCorrsRcd, HcalLUTCorrsRcd, HcalPFCorrsRcd, HcalLutMetadataRcd, HcalSiPMParametersRcd, HcalTPChannelParametersRcd, HcalMCParamsRcd, HcalRecoParamsRcd, HcalElectronicsMapRcd, HcalFrontEndMapRcd, HcalSiPMCharacteristicsRcd, HcalTPParametersRcd > HostType
void setupPedestalWidths(const HcalPedestalWidthsRcd &, HcalDbService &)
edm::ReusableObjectHolder< HostType > holder_
void setupEffectivePedestals(const HcalPedestalsRcd &, HcalDbService &)
std::unique_ptr< HcalChannelQuality > HcalDbProducer::produceChannelQualityWithTopo ( const HcalChannelQualityRcd record)

Definition at line 226 of file HcalDbProducer.cc.

References record.

Referenced by HcalDbProducer().

226  {
227  return produceWithTopology<HcalChannelQuality>(record);
228 }
JetCorrectorParameters::Record record
Definition: classes.h:7
std::unique_ptr< HcalPedestals > HcalDbProducer::produceEffectivePedestalsWithTopo ( const HcalPedestalsRcd record)

Definition at line 174 of file HcalDbProducer.cc.

References edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::get(), and edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord().

Referenced by HcalDbProducer().

174  {
175 
177  record.get("effective", item);
178 
179  auto productWithTopology = std::make_unique<HcalPedestals>(*item);
180 
182  record.getRecord<HcalRecNumberingRecord>().get(htopo);
183  const HcalTopology* topo=&(*htopo);
184  productWithTopology->setTopo(topo);
185 
186  return productWithTopology;
187 }
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
std::unique_ptr< HcalPedestalWidths > HcalDbProducer::produceEffectivePedestalWidthsWithTopo ( const HcalPedestalWidthsRcd record)

Definition at line 190 of file HcalDbProducer.cc.

References edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::get().

Referenced by HcalDbProducer().

190  {
191 
193  record.get("effective", item);
194 
195  auto productWithTopology = std::make_unique<HcalPedestalWidths>(*item);
196 
198  record. template getRecord<HcalRecNumberingRecord>().get(htopo);
199  const HcalTopology* topo=&(*htopo);
200  productWithTopology->setTopo(topo);
201 
202  return productWithTopology;
203 }
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
std::unique_ptr< HcalGains > HcalDbProducer::produceGainsWithTopo ( const HcalGainsRcd record)

Definition at line 206 of file HcalDbProducer.cc.

References record.

Referenced by HcalDbProducer().

206  {
207  return produceWithTopology<HcalGains>(record);
208 }
JetCorrectorParameters::Record record
Definition: classes.h:7
std::unique_ptr< HcalGainWidths > HcalDbProducer::produceGainWidthsWithTopo ( const HcalGainWidthsRcd record)

Definition at line 211 of file HcalDbProducer.cc.

References record.

Referenced by HcalDbProducer().

211  {
212  return produceWithTopology<HcalGainWidths>(record);
213 }
JetCorrectorParameters::Record record
Definition: classes.h:7
std::unique_ptr< HcalL1TriggerObjects > HcalDbProducer::produceL1triggerObjectsWithTopo ( const HcalL1TriggerObjectsRcd record)

Definition at line 241 of file HcalDbProducer.cc.

References record.

Referenced by HcalDbProducer().

241  {
242  return produceWithTopology<HcalL1TriggerObjects>(record);
243 }
JetCorrectorParameters::Record record
Definition: classes.h:7
std::unique_ptr< HcalLUTCorrs > HcalDbProducer::produceLUTCorrsWithTopo ( const HcalLUTCorrsRcd record)

Definition at line 251 of file HcalDbProducer.cc.

References record.

Referenced by HcalDbProducer().

251  {
252  return produceWithTopology<HcalLUTCorrs>(record);
253 }
JetCorrectorParameters::Record record
Definition: classes.h:7
std::unique_ptr< HcalLutMetadata > HcalDbProducer::produceLUTMetadataWithTopo ( const HcalLutMetadataRcd record)

Definition at line 261 of file HcalDbProducer.cc.

References record.

Referenced by HcalDbProducer().

261  {
262  return produceWithTopology<HcalLutMetadata>(record);
263 }
JetCorrectorParameters::Record record
Definition: classes.h:7
std::unique_ptr< HcalMCParams > HcalDbProducer::produceMCParamsWithTopo ( const HcalMCParamsRcd record)

Definition at line 276 of file HcalDbProducer.cc.

References record.

Referenced by HcalDbProducer().

276  {
277  return produceWithTopology<HcalMCParams>(record);
278 }
JetCorrectorParameters::Record record
Definition: classes.h:7
std::unique_ptr< HcalPedestals > HcalDbProducer::producePedestalsWithTopo ( const HcalPedestalsRcd record)

Definition at line 164 of file HcalDbProducer.cc.

References record.

Referenced by HcalDbProducer().

164  {
165  return produceWithTopology<HcalPedestals>(record);
166 }
JetCorrectorParameters::Record record
Definition: classes.h:7
std::unique_ptr< HcalPedestalWidths > HcalDbProducer::producePedestalWidthsWithTopo ( const HcalPedestalWidthsRcd record)

Definition at line 169 of file HcalDbProducer.cc.

References record.

Referenced by HcalDbProducer().

169  {
170  return produceWithTopology<HcalPedestalWidths>(record);
171 }
JetCorrectorParameters::Record record
Definition: classes.h:7
std::unique_ptr< HcalPFCorrs > HcalDbProducer::producePFCorrsWithTopo ( const HcalPFCorrsRcd record)

Definition at line 256 of file HcalDbProducer.cc.

References record.

Referenced by HcalDbProducer().

256  {
257  return produceWithTopology<HcalPFCorrs>(record);
258 }
JetCorrectorParameters::Record record
Definition: classes.h:7
std::unique_ptr< HcalQIEData > HcalDbProducer::produceQIEDataWithTopo ( const HcalQIEDataRcd record)

Definition at line 216 of file HcalDbProducer.cc.

References record.

Referenced by HcalDbProducer().

216  {
217  return produceWithTopology<HcalQIEData>(record);
218 }
JetCorrectorParameters::Record record
Definition: classes.h:7
std::unique_ptr< HcalQIETypes > HcalDbProducer::produceQIETypesWithTopo ( const HcalQIETypesRcd record)

Definition at line 221 of file HcalDbProducer.cc.

References record.

Referenced by HcalDbProducer().

221  {
222  return produceWithTopology<HcalQIETypes>(record);
223 }
JetCorrectorParameters::Record record
Definition: classes.h:7
std::unique_ptr< HcalRecoParams > HcalDbProducer::produceRecoParamsWithTopo ( const HcalRecoParamsRcd record)

Definition at line 281 of file HcalDbProducer.cc.

References record.

Referenced by HcalDbProducer().

281  {
282  return produceWithTopology<HcalRecoParams>(record);
283 }
JetCorrectorParameters::Record record
Definition: classes.h:7
std::unique_ptr< HcalRespCorrs > HcalDbProducer::produceRespCorrsWithTopo ( const HcalRespCorrsRcd record)

Definition at line 236 of file HcalDbProducer.cc.

References record.

Referenced by HcalDbProducer().

236  {
237  return produceWithTopology<HcalRespCorrs>(record);
238 }
JetCorrectorParameters::Record record
Definition: classes.h:7
std::unique_ptr< HcalSiPMParameters > HcalDbProducer::produceSiPMParametersWithTopo ( const HcalSiPMParametersRcd record)

Definition at line 266 of file HcalDbProducer.cc.

References record.

Referenced by HcalDbProducer().

266  {
267  return produceWithTopology<HcalSiPMParameters>(record);
268 }
JetCorrectorParameters::Record record
Definition: classes.h:7
std::unique_ptr< HcalTimeCorrs > HcalDbProducer::produceTimeCorrsWithTopo ( const HcalTimeCorrsRcd record)

Definition at line 246 of file HcalDbProducer.cc.

References record.

Referenced by HcalDbProducer().

246  {
247  return produceWithTopology<HcalTimeCorrs>(record);
248 }
JetCorrectorParameters::Record record
Definition: classes.h:7
std::unique_ptr< HcalTPChannelParameters > HcalDbProducer::produceTPChannelParametersWithTopo ( const HcalTPChannelParametersRcd record)

Definition at line 271 of file HcalDbProducer.cc.

References record.

Referenced by HcalDbProducer().

271  {
272  return produceWithTopology<HcalTPChannelParameters>(record);
273 }
JetCorrectorParameters::Record record
Definition: classes.h:7
template<typename ProductType , typename RecordType >
static std::unique_ptr<ProductType> HcalDbProducer::produceWithTopology ( RecordType const &  record)
inlinestaticprivate

Definition at line 97 of file HcalDbProducer.h.

97  {
98 
100  record.get(item);
101 
102  auto productWithTopology = std::make_unique<ProductType>(*item);
103 
105  record. template getRecord<HcalRecNumberingRecord>().get(htopo);
106  const HcalTopology* topo=&(*htopo);
107  productWithTopology->setTopo(topo);
108 
109  return productWithTopology;
110  }
JetCorrectorParameters::Record record
Definition: classes.h:7
std::unique_ptr< HcalZSThresholds > HcalDbProducer::produceZSThresholdsWithTopo ( const HcalZSThresholdsRcd record)

Definition at line 231 of file HcalDbProducer.cc.

References record.

Referenced by HcalDbProducer().

231  {
232  return produceWithTopology<HcalZSThresholds>(record);
233 }
JetCorrectorParameters::Record record
Definition: classes.h:7
void HcalDbProducer::setupEffectivePedestals ( const HcalPedestalsRcd record,
HcalDbService service 
)

Definition at line 297 of file HcalDbProducer.cc.

References HcalDbASCIIIO::dumpObject(), spr::find(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::get(), mDumpRequest, mDumpStream, edm::ESHandle< T >::product(), HcalDbService::setData(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by produce().

298  {
300  record.get("withTopoEff", item);
301  service.setData(item.product(), true);
302 
303  if (std::find (mDumpRequest.begin(), mDumpRequest.end(), std::string ("EffectivePedestals")) != mDumpRequest.end()) {
304  *mDumpStream << "New HCAL EffectivePedestals set" << std::endl;
306  }
307 }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
std::vector< std::string > mDumpRequest
void setData(const HcalPedestals *fItem, bool eff=false)
Definition: HcalDbService.h:65
bool dumpObject(std::ostream &fOutput, const HcalPedestals &fObject)
std::ostream * mDumpStream
T const * product() const
Definition: ESHandle.h:86
void HcalDbProducer::setupEffectivePedestalWidths ( const HcalPedestalWidthsRcd record,
HcalDbService service 
)

Definition at line 321 of file HcalDbProducer.cc.

References HcalDbASCIIIO::dumpObject(), spr::find(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::get(), mDumpRequest, mDumpStream, edm::ESHandle< T >::product(), HcalDbService::setData(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by produce().

322  {
324  record.get("withTopoEff", item);
325  service.setData(item.product(), true);
326 
327  if (std::find (mDumpRequest.begin(), mDumpRequest.end(), std::string ("EffectivePedestalWidths")) != mDumpRequest.end()) {
328  *mDumpStream << "New HCAL EffectivePedestalWidths set" << std::endl;
330  }
331 }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
std::vector< std::string > mDumpRequest
void setData(const HcalPedestals *fItem, bool eff=false)
Definition: HcalDbService.h:65
bool dumpObject(std::ostream &fOutput, const HcalPedestals &fObject)
std::ostream * mDumpStream
T const * product() const
Definition: ESHandle.h:86
template<typename ProductType , typename RecordType >
void HcalDbProducer::setupHcalDbService ( HostType host,
const HcalDbRecord record,
const char *  label,
const char *  dumpName,
const char *  dumpHeader 
)
inlineprivate

Definition at line 113 of file HcalDbProducer.h.

References HcalDbASCIIIO::dumpObject(), spr::find(), query::host, edm::ESProductHost< Product, RecordTypes >::ifRecordChanges(), label, mDumpRequest, mDumpStream, edm::ESHandle< T >::product(), record, and AlCaHLTBitMon_QueryRunRegistry::string.

117  {
118 
119  host.ifRecordChanges<RecordType>(record,
120  [this, &host, label, dumpName, dumpHeader](auto const& rec) {
122  rec.get(label, item);
123  host.setData(item.product());
124 
125  if (std::find (mDumpRequest.begin(), mDumpRequest.end(), std::string (dumpName)) != mDumpRequest.end()) {
126  *mDumpStream << dumpHeader << std::endl;
128  }
129  });
130  }
host
Definition: query.py:115
JetCorrectorParameters::Record record
Definition: classes.h:7
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
char const * label
std::vector< std::string > mDumpRequest
bool dumpObject(std::ostream &fOutput, const HcalPedestals &fObject)
std::ostream * mDumpStream
T const * product() const
Definition: ESHandle.h:86
void HcalDbProducer::setupPedestals ( const HcalPedestalsRcd record,
HcalDbService service 
)

Definition at line 285 of file HcalDbProducer.cc.

References HcalDbASCIIIO::dumpObject(), spr::find(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::get(), mDumpRequest, mDumpStream, edm::ESHandle< T >::product(), HcalDbService::setData(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by produce().

286  {
288  record.get("withTopo", item);
289  service.setData(item.product());
290 
291  if (std::find (mDumpRequest.begin(), mDumpRequest.end(), std::string ("Pedestals")) != mDumpRequest.end()) {
292  *mDumpStream << "New HCAL Pedestals set" << std::endl;
294  }
295 }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
std::vector< std::string > mDumpRequest
void setData(const HcalPedestals *fItem, bool eff=false)
Definition: HcalDbService.h:65
bool dumpObject(std::ostream &fOutput, const HcalPedestals &fObject)
std::ostream * mDumpStream
T const * product() const
Definition: ESHandle.h:86
void HcalDbProducer::setupPedestalWidths ( const HcalPedestalWidthsRcd record,
HcalDbService service 
)

Definition at line 309 of file HcalDbProducer.cc.

References HcalDbASCIIIO::dumpObject(), spr::find(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::get(), mDumpRequest, mDumpStream, edm::ESHandle< T >::product(), HcalDbService::setData(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by produce().

310  {
312  record.get("withTopo", item);
313  service.setData(item.product());
314 
315  if (std::find (mDumpRequest.begin(), mDumpRequest.end(), std::string ("PedestalWidths")) != mDumpRequest.end()) {
316  *mDumpStream << "New HCAL PedestalWidths set" << std::endl;
318  }
319 }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
std::vector< std::string > mDumpRequest
void setData(const HcalPedestals *fItem, bool eff=false)
Definition: HcalDbService.h:65
bool dumpObject(std::ostream &fOutput, const HcalPedestals &fObject)
std::ostream * mDumpStream
T const * product() const
Definition: ESHandle.h:86

Member Data Documentation

edm::ReusableObjectHolder<HostType> HcalDbProducer::holder_
private

Definition at line 133 of file HcalDbProducer.h.

Referenced by produce().

std::vector<std::string> HcalDbProducer::mDumpRequest
private
std::ostream* HcalDbProducer::mDumpStream
private