CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
HcalDbProducer::ServiceTokenImpl< ProductType, RecordType, LABEL, EffectiveType > Class Template Reference

Public Member Functions

 ServiceTokenImpl ()
 
void setConsumes (edm::ESConsumesCollector &cc)
 
void setupHcalDbService (HostType &host, const RecordType &record, const std::vector< std::string > &dumpRequest, std::ostream *dumpStream)
 

Private Attributes

std::string dumpName_
 
edm::ESGetToken< ProductType, RecordType > token_
 

Detailed Description

template<typename ProductType, typename RecordType, const char * LABEL, typename EffectiveType>
class HcalDbProducer::ServiceTokenImpl< ProductType, RecordType, LABEL, EffectiveType >

Definition at line 80 of file HcalDbProducer.cc.

Constructor & Destructor Documentation

◆ ServiceTokenImpl()

template<typename ProductType , typename RecordType , const char * LABEL, typename EffectiveType >
HcalDbProducer::ServiceTokenImpl< ProductType, RecordType, LABEL, EffectiveType >::ServiceTokenImpl ( )
inline

Definition at line 82 of file HcalDbProducer.cc.

83  : dumpName_(edm::typeDemangle(typeid(ProductType).name()).substr(4)) // remove leading "Hcal"
84  {
85  if constexpr (EffectiveType::value) {
86  dumpName_ = "Effective" + dumpName_;
87  }
88  }

References HcalDbProducer::ServiceTokenImpl< ProductType, RecordType, LABEL, EffectiveType >::dumpName_, and relativeConstraints::value.

Member Function Documentation

◆ setConsumes()

template<typename ProductType , typename RecordType , const char * LABEL, typename EffectiveType >
void HcalDbProducer::ServiceTokenImpl< ProductType, RecordType, LABEL, EffectiveType >::setConsumes ( edm::ESConsumesCollector cc)
inline

◆ setupHcalDbService()

template<typename ProductType , typename RecordType , const char * LABEL, typename EffectiveType >
void HcalDbProducer::ServiceTokenImpl< ProductType, RecordType, LABEL, EffectiveType >::setupHcalDbService ( HostType host,
const RecordType &  record,
const std::vector< std::string > &  dumpRequest,
std::ostream *  dumpStream 
)
inline

Definition at line 90 of file HcalDbProducer.cc.

93  {
94  const auto& item = record.get(token_);
95  serviceSetData(host, item, EffectiveType{});
96 
97  if (std::find(dumpRequest.begin(), dumpRequest.end(), dumpName_) != dumpRequest.end()) {
98  *dumpStream << "New HCAL " << dumpName_ << " set" << std::endl;
99  HcalDbASCIIIO::dumpObject(*dumpStream, item);
100  }
101  }

References HcalDbProducer::ServiceTokenImpl< ProductType, RecordType, LABEL, EffectiveType >::dumpName_, HcalDbASCIIIO::dumpObject(), spr::find(), query::host, B2GTnPMonitor_cfi::item, AlCaHarvesting_cff::record, HcalDbProducer::serviceSetData(), and HcalDbProducer::ServiceTokenImpl< ProductType, RecordType, LABEL, EffectiveType >::token_.

Member Data Documentation

◆ dumpName_

template<typename ProductType , typename RecordType , const char * LABEL, typename EffectiveType >
std::string HcalDbProducer::ServiceTokenImpl< ProductType, RecordType, LABEL, EffectiveType >::dumpName_
private

◆ token_

template<typename ProductType , typename RecordType , const char * LABEL, typename EffectiveType >
edm::ESGetToken<ProductType, RecordType> HcalDbProducer::ServiceTokenImpl< ProductType, RecordType, LABEL, EffectiveType >::token_
private
edm::ESInputTag
Definition: ESInputTag.h:87
edm::typeDemangle
std::string typeDemangle(char const *mangledName)
Definition: TypeDemangler.cc:93
HcalDbProducer::serviceSetData
static void serviceSetData(HostType &host, const ProductType &item, std::false_type)
Definition: HcalDbProducer.cc:72
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
query.host
string host
Definition: query.py:115
HcalDbProducer::ServiceTokenImpl::token_
edm::ESGetToken< ProductType, RecordType > token_
Definition: HcalDbProducer.cc:104
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
AlCaHarvesting_cff.record
record
Definition: AlCaHarvesting_cff.py:42
cc
HcalDbASCIIIO::dumpObject
bool dumpObject(std::ostream &fOutput, const HcalPedestals &fObject)
HcalDbProducer::ServiceTokenImpl::dumpName_
std::string dumpName_
Definition: HcalDbProducer.cc:105
relativeConstraints.value
value
Definition: relativeConstraints.py:53
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17