CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
HGCalTriggerGeometryESProducer Class Reference
Inheritance diagram for HGCalTriggerGeometryESProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Types

typedef std::unique_ptr< HGCalTriggerGeometryBaseReturnType
 

Public Member Functions

 HGCalTriggerGeometryESProducer (const edm::ParameterSet &)
 
ReturnType produce (const CaloGeometryRecord &)
 
 ~HGCalTriggerGeometryESProducer () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ESProducer (const ESProducer &)=delete
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
ESProducer const & operator= (const ESProducer &)=delete
 
template<typename Record >
void updateFromMayConsumes (unsigned int iIndex, const Record &iRecord)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer ()(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
 ESProxyFactoryProducer (const ESProxyFactoryProducer &)=delete
 
const ESProxyFactoryProduceroperator= (const ESProxyFactoryProducer &)=delete
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
void createKeyedProxies (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
 DataProxyProvider ()
 
 DataProxyProvider (const DataProxyProvider &)=delete
 
const ComponentDescriptiondescription () const
 
void fillRecordsNotAllowingConcurrentIOVs (std::set< EventSetupRecordKey > &recordsNotAllowingConcurrentIOVs) const
 
virtual void initConcurrentIOVs (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
bool isUsingRecord (const EventSetupRecordKey &key) const
 
KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey, unsigned int iovIndex=0)
 
const DataProxyProvideroperator= (const DataProxyProvider &)=delete
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 

Private Attributes

edm::ESGetToken< CaloGeometry, CaloGeometryRecordcalo_geometry_token_
 
edm::ESGetToken< HGCalGeometry, IdealGeometryRecordee_geometry_token_
 
edm::ParameterSet geometry_config_
 
std::string geometry_name_
 
edm::ESGetToken< HGCalGeometry, IdealGeometryRecordhsc_geometry_token_
 
edm::ESGetToken< HGCalGeometry, IdealGeometryRecordhsi_geometry_token_
 
bool isV9Geometry_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Types inherited from edm::ESProxyFactoryProducer
using EventSetupRecordKey = eventsetup::EventSetupRecordKey
 
- Protected Types inherited from edm::eventsetup::DataProxyProvider
using KeyedProxiesVector = std::vector< std::pair< DataKey, std::shared_ptr< DataProxy >>>
 
- Protected Member Functions inherited from edm::ESProducer
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 EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
KeyedProxiesVector registerProxies (const EventSetupRecordKey &, unsigned int iovIndex) override
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &key)
 

Detailed Description

Definition at line 12 of file HGCalTriggerGeometryESProducer.cc.

Member Typedef Documentation

Definition at line 17 of file HGCalTriggerGeometryESProducer.cc.

Constructor & Destructor Documentation

HGCalTriggerGeometryESProducer::HGCalTriggerGeometryESProducer ( const edm::ParameterSet iConfig)

Definition at line 31 of file HGCalTriggerGeometryESProducer.cc.

References calo_geometry_token_, ee_geometry_token_, hsc_geometry_token_, hsi_geometry_token_, isV9Geometry_, and edm::ESProducer::setWhatProduced().

32  : geometry_config_(iConfig.getParameterSet("TriggerGeometry")),
34  isV9Geometry_(iConfig.getParameter<bool>("isV9Geometry")) {
35  auto cc = setWhatProduced(this);
36  if (isV9Geometry_) {
37  cc.setConsumes(ee_geometry_token_, edm::ESInputTag{"", "HGCalEESensitive"})
38  .setConsumes(hsi_geometry_token_, edm::ESInputTag{"", "HGCalHESiliconSensitive"})
39  .setConsumes(hsc_geometry_token_, edm::ESInputTag{"", "HGCalHEScintillatorSensitive"});
40  } else {
41  cc.setConsumes(calo_geometry_token_);
42  }
43 }
T getParameter(std::string const &) const
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > calo_geometry_token_
edm::ESGetToken< HGCalGeometry, IdealGeometryRecord > hsi_geometry_token_
ParameterSet const & getParameterSet(std::string const &) const
edm::ESGetToken< HGCalGeometry, IdealGeometryRecord > hsc_geometry_token_
edm::ESGetToken< HGCalGeometry, IdealGeometryRecord > ee_geometry_token_
HGCalTriggerGeometryESProducer::~HGCalTriggerGeometryESProducer ( )
override

Definition at line 45 of file HGCalTriggerGeometryESProducer.cc.

45  {
46  // do anything here that needs to be done at desctruction time
47  // (e.g. close files, deallocate resources etc.)
48 }

Member Function Documentation

HGCalTriggerGeometryESProducer::ReturnType HGCalTriggerGeometryESProducer::produce ( const CaloGeometryRecord iRecord)

Definition at line 50 of file HGCalTriggerGeometryESProducer.cc.

References calo_geometry_token_, beamerCreator::create(), DEFINE_FWK_EVENTSETUP_MODULE, ee_geometry_token_, Exception, DetId::Forward, geometry, geometry_config_, geometry_name_, timingPdfMaker::get, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::get(), DetId::Hcal, HcalEndcap, HGCEE, HGCHEF, hsc_geometry_token_, hsi_geometry_token_, and isV9Geometry_.

50  {
51  //using namespace edm::es;
53  if (isV9Geometry_) {
54  // Initialize trigger geometry for V9 HGCAL geometry
55  geometry->initialize(
56  &iRecord.get(ee_geometry_token_), &iRecord.get(hsi_geometry_token_), &iRecord.get(hsc_geometry_token_));
57  } else {
58  // Initialize trigger geometry for V7/V8 HGCAL geometry
59  const auto& calo_geometry = iRecord.get(calo_geometry_token_);
60  if (not(calo_geometry.getSubdetectorGeometry(DetId::Forward, HGCEE) &&
61  calo_geometry.getSubdetectorGeometry(DetId::Forward, HGCHEF) &&
62  calo_geometry.getSubdetectorGeometry(DetId::Hcal, HcalEndcap))) {
63  throw cms::Exception("LogicError")
64  << "Configuration asked for non-V9 geometry, but the CaloGeometry does not look like one";
65  }
66  geometry->initialize(&calo_geometry);
67  }
68  return geometry;
69 }
def create(alignables, pedeDump, additionalData, outputFile, config)
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > calo_geometry_token_
edm::ESGetToken< HGCalGeometry, IdealGeometryRecord > hsi_geometry_token_
std::unique_ptr< HGCalTriggerGeometryBase > ReturnType
ESHandle< TrackerGeometry > geometry
edm::ESGetToken< HGCalGeometry, IdealGeometryRecord > hsc_geometry_token_
edm::ESGetToken< HGCalGeometry, IdealGeometryRecord > ee_geometry_token_

Member Data Documentation

edm::ESGetToken<CaloGeometry, CaloGeometryRecord> HGCalTriggerGeometryESProducer::calo_geometry_token_
private

Definition at line 24 of file HGCalTriggerGeometryESProducer.cc.

Referenced by HGCalTriggerGeometryESProducer(), and produce().

edm::ESGetToken<HGCalGeometry, IdealGeometryRecord> HGCalTriggerGeometryESProducer::ee_geometry_token_
private

Definition at line 25 of file HGCalTriggerGeometryESProducer.cc.

Referenced by HGCalTriggerGeometryESProducer(), and produce().

edm::ParameterSet HGCalTriggerGeometryESProducer::geometry_config_
private

Definition at line 22 of file HGCalTriggerGeometryESProducer.cc.

Referenced by produce().

std::string HGCalTriggerGeometryESProducer::geometry_name_
private

Definition at line 23 of file HGCalTriggerGeometryESProducer.cc.

Referenced by produce().

edm::ESGetToken<HGCalGeometry, IdealGeometryRecord> HGCalTriggerGeometryESProducer::hsc_geometry_token_
private

Definition at line 27 of file HGCalTriggerGeometryESProducer.cc.

Referenced by HGCalTriggerGeometryESProducer(), and produce().

edm::ESGetToken<HGCalGeometry, IdealGeometryRecord> HGCalTriggerGeometryESProducer::hsi_geometry_token_
private

Definition at line 26 of file HGCalTriggerGeometryESProducer.cc.

Referenced by HGCalTriggerGeometryESProducer(), and produce().

bool HGCalTriggerGeometryESProducer::isV9Geometry_
private

Definition at line 28 of file HGCalTriggerGeometryESProducer.cc.

Referenced by HGCalTriggerGeometryESProducer(), and produce().