CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

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.

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

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

Member Function Documentation

template<typename ProductType , typename RecordType , const char * LABEL, typename EffectiveType >
void HcalDbProducer::ServiceTokenImpl< ProductType, RecordType, LABEL, EffectiveType >::setConsumes ( edm::ESConsumesCollector cc)
inline
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.

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

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  }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
edm::ESGetToken< ProductType, RecordType > token_
string host
Definition: query.py:115
static void serviceSetData(HostType &host, const ProductType &item, std::false_type)
bool dumpObject(std::ostream &fOutput, const HcalPedestals &fObject)

Member Data Documentation

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