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

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.

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

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

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

Definition at line 90 of file HcalDbProducer.cc.

References edm::ESConsumesCollector::setConsumes(), and HcalDbProducer::ServiceTokenImpl< ProductType, RecordType, LABEL, EffectiveType >::token_.

90 { cc.setConsumes(token_, edm::ESInputTag{"", LABEL}); }
edm::ESGetToken< ProductType, RecordType > token_
ESConsumesCollector & setConsumes(ESGetToken< Product, Record > &token, ESInputTag const &tag)
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.

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_.

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  }
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:19
edm::ESGetToken< ProductType, RecordType > token_
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