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 81 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 83 of file HcalDbProducer.cc.

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

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 91 of file HcalDbProducer.cc.

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

References HcalDbProducer::ServiceTokenImpl< ProductType, RecordType, LABEL, EffectiveType >::dumpName_, HcalDbASCIIIO::dumpObject(), spr::find(), query::host, B2GTnPMonitor_cfi::item, GlobalPosition_Frontier_DevDB_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:73
GlobalPosition_Frontier_DevDB_cff.record
record
Definition: GlobalPosition_Frontier_DevDB_cff.py:10
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:105
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
cc
HcalDbASCIIIO::dumpObject
bool dumpObject(std::ostream &fOutput, const HcalPedestals &fObject)
HcalDbProducer::ServiceTokenImpl::dumpName_
std::string dumpName_
Definition: HcalDbProducer.cc:106
relativeConstraints.value
value
Definition: relativeConstraints.py:53
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17