CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
PCaloGeometryBuilder Class Reference
Inheritance diagram for PCaloGeometryBuilder:
edm::one::EDAnalyzer< edm::one::WatchRuns > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void analyze (edm::Event const &iEvent, edm::EventSetup const &) override
 
void beginRun (edm::Run const &iEvent, edm::EventSetup const &) override
 
void endRun (edm::Run const &iEvent, edm::EventSetup const &) override
 
 PCaloGeometryBuilder (const edm::ParameterSet &pset)
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const noexcept final
 
bool wantsGlobalRuns () const noexcept final
 
bool wantsInputProcessBlocks () const noexcept final
 
bool wantsProcessBlocks () const noexcept final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const noexcept
 
bool wantsStreamRuns () const noexcept
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

edm::ESGetToken< CaloSubdetectorGeometry, CastorGeometry::AlignedRecordcastGeomToken_
 
edm::ESGetToken< CaloSubdetectorGeometry, CaloTowerGeometry::AlignedRecordctGeomToken_
 
edm::ESGetToken< CaloSubdetectorGeometry, EcalBarrelGeometry::AlignedRecordebGeomToken_
 
edm::ESGetToken< CaloSubdetectorGeometry, EcalEndcapGeometry::AlignedRecordeeGeomToken_
 
edm::ESGetToken< CaloSubdetectorGeometry, EcalPreshowerGeometry::AlignedRecordesGeomToken_
 
edm::ESGetToken< CaloSubdetectorGeometry, HcalGeometry::AlignedRecordhcalGeomToken_
 
edm::ESGetToken< CaloSubdetectorGeometry, HGCalGeometry::AlignedRecordhgcalGeomToken_
 
bool m_ecalE
 
bool m_ecalP
 
bool m_hgcal
 
edm::ESGetToken< CaloSubdetectorGeometry, ZdcGeometry::AlignedRecordzdcGeomToken_
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 17 of file PCaloGeometryBuilder.cc.

Constructor & Destructor Documentation

◆ PCaloGeometryBuilder()

PCaloGeometryBuilder::PCaloGeometryBuilder ( const edm::ParameterSet pset)
inline

Definition at line 19 of file PCaloGeometryBuilder.cc.

References castGeomToken_, ctGeomToken_, ebGeomToken_, eeGeomToken_, esGeomToken_, hcalGeomToken_, hgcalGeomToken_, CaloTowerGeometry::producerTag(), ZdcGeometry::producerTag(), CastorGeometry::producerTag(), EcalPreshowerGeometry::producerTag(), HcalGeometry::producerTag(), EcalEndcapGeometry::producerTag(), EcalBarrelGeometry::producerTag(), HGCalGeometry::producerTag(), AlCaHLTBitMon_QueryRunRegistry::string, and zdcGeomToken_.

20  : m_ecalE(pset.getUntrackedParameter<bool>("EcalE", true)),
21  m_ecalP(pset.getUntrackedParameter<bool>("EcalP", true)),
22  m_hgcal(pset.getUntrackedParameter<bool>("HGCal", false)) {
23  const std::string toDB("_toDB");
24  ebGeomToken_ = esConsumes<edm::Transition::BeginRun>(edm::ESInputTag("", EcalBarrelGeometry::producerTag() + toDB));
25  eeGeomToken_ = esConsumes<edm::Transition::BeginRun>(edm::ESInputTag("", EcalEndcapGeometry::producerTag() + toDB));
26  esGeomToken_ =
27  esConsumes<edm::Transition::BeginRun>(edm::ESInputTag("", EcalPreshowerGeometry::producerTag() + toDB));
28  hgcalGeomToken_ = esConsumes<edm::Transition::BeginRun>(edm::ESInputTag("", HGCalGeometry::producerTag() + toDB));
29  hcalGeomToken_ = esConsumes<edm::Transition::BeginRun>(edm::ESInputTag("", HcalGeometry::producerTag() + toDB));
30  ctGeomToken_ = esConsumes<edm::Transition::BeginRun>(edm::ESInputTag("", CaloTowerGeometry::producerTag() + toDB));
31  zdcGeomToken_ = esConsumes<edm::Transition::BeginRun>(edm::ESInputTag("", ZdcGeometry::producerTag() + toDB));
32  castGeomToken_ = esConsumes<edm::Transition::BeginRun>(edm::ESInputTag("", CastorGeometry::producerTag() + toDB));
33  }
edm::ESGetToken< CaloSubdetectorGeometry, EcalEndcapGeometry::AlignedRecord > eeGeomToken_
edm::ESGetToken< CaloSubdetectorGeometry, EcalPreshowerGeometry::AlignedRecord > esGeomToken_
static std::string producerTag()
Definition: ZdcGeometry.h:45
edm::ESGetToken< CaloSubdetectorGeometry, ZdcGeometry::AlignedRecord > zdcGeomToken_
edm::ESGetToken< CaloSubdetectorGeometry, CastorGeometry::AlignedRecord > castGeomToken_
static std::string producerTag()
static std::string producerTag()
Definition: HcalGeometry.h:65
static std::string producerTag()
static std::string producerTag()
static std::string producerTag()
edm::ESGetToken< CaloSubdetectorGeometry, HGCalGeometry::AlignedRecord > hgcalGeomToken_
static std::string producerTag()
edm::ESGetToken< CaloSubdetectorGeometry, EcalBarrelGeometry::AlignedRecord > ebGeomToken_
static std::string producerTag()
edm::ESGetToken< CaloSubdetectorGeometry, HcalGeometry::AlignedRecord > hcalGeomToken_
edm::ESGetToken< CaloSubdetectorGeometry, CaloTowerGeometry::AlignedRecord > ctGeomToken_

Member Function Documentation

◆ analyze()

void PCaloGeometryBuilder::analyze ( edm::Event const &  iEvent,
edm::EventSetup const &   
)
inlineoverridevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 36 of file PCaloGeometryBuilder.cc.

36 {}

◆ beginRun()

void PCaloGeometryBuilder::beginRun ( edm::Run const &  iEvent,
edm::EventSetup const &  es 
)
override

Definition at line 53 of file PCaloGeometryBuilder.cc.

References castGeomToken_, ctGeomToken_, ebGeomToken_, eeGeomToken_, esGeomToken_, edm::EventSetup::getHandle(), hcalGeomToken_, hgcalGeomToken_, m_ecalE, m_ecalP, m_hgcal, CaloTowerGeometry::producerTag(), ZdcGeometry::producerTag(), CastorGeometry::producerTag(), EcalPreshowerGeometry::producerTag(), HcalGeometry::producerTag(), EcalEndcapGeometry::producerTag(), EcalBarrelGeometry::producerTag(), HGCalGeometry::producerTag(), and zdcGeomToken_.

53  {
54  edm::LogInfo("PCaloGeometryBuilder") << "Writing out " << EcalBarrelGeometry::producerTag() << std::endl;
55  auto pGeb = es.getHandle(ebGeomToken_);
56  if (m_ecalE) {
57  edm::LogInfo("PCaloGeometryBuilder") << "Writing out " << EcalEndcapGeometry::producerTag() << std::endl;
58  auto pGeb = es.getHandle(eeGeomToken_);
59  }
60 
61  if (m_ecalP) {
62  edm::LogInfo("PCaloGeometryBuilder") << "Writing out " << EcalPreshowerGeometry::producerTag() << std::endl;
63  auto pGes = es.getHandle(esGeomToken_);
64  }
65 
66  if (m_hgcal) {
67  edm::LogInfo("PCaloGeometryBuilder") << "Writing out " << HGCalGeometry::producerTag() << std::endl;
68  auto pGhgcal = es.getHandle(hgcalGeomToken_);
69  ;
70  }
71 
72  edm::LogInfo("PCaloGeometryBuilder") << "Writing out " << HcalGeometry::producerTag() << std::endl;
73  auto pGhcal = es.getHandle(hcalGeomToken_);
74 
75  edm::LogInfo("PCaloGeometryBuilder") << "Writing out " << CaloTowerGeometry::producerTag() << std::endl;
76  auto pGct = es.getHandle(ctGeomToken_);
77 
78  edm::LogInfo("PCaloGeometryBuilder") << "Writing out " << ZdcGeometry::producerTag() << std::endl;
79  auto pGzdc = es.getHandle(zdcGeomToken_);
80 
81  edm::LogInfo("PCaloGeometryBuilder") << "Writing out " << CastorGeometry::producerTag() << std::endl;
82  auto pGcast = es.getHandle(castGeomToken_);
83 }
edm::ESGetToken< CaloSubdetectorGeometry, EcalEndcapGeometry::AlignedRecord > eeGeomToken_
edm::ESGetToken< CaloSubdetectorGeometry, EcalPreshowerGeometry::AlignedRecord > esGeomToken_
static std::string producerTag()
Definition: ZdcGeometry.h:45
edm::ESGetToken< CaloSubdetectorGeometry, ZdcGeometry::AlignedRecord > zdcGeomToken_
edm::ESGetToken< CaloSubdetectorGeometry, CastorGeometry::AlignedRecord > castGeomToken_
static std::string producerTag()
static std::string producerTag()
Definition: HcalGeometry.h:65
static std::string producerTag()
static std::string producerTag()
static std::string producerTag()
edm::ESGetToken< CaloSubdetectorGeometry, HGCalGeometry::AlignedRecord > hgcalGeomToken_
static std::string producerTag()
Log< level::Info, false > LogInfo
edm::ESGetToken< CaloSubdetectorGeometry, EcalBarrelGeometry::AlignedRecord > ebGeomToken_
static std::string producerTag()
edm::ESGetToken< CaloSubdetectorGeometry, HcalGeometry::AlignedRecord > hcalGeomToken_
edm::ESGetToken< CaloSubdetectorGeometry, CaloTowerGeometry::AlignedRecord > ctGeomToken_

◆ endRun()

void PCaloGeometryBuilder::endRun ( edm::Run const &  iEvent,
edm::EventSetup const &   
)
inlineoverride

Definition at line 37 of file PCaloGeometryBuilder.cc.

37 {}

Member Data Documentation

◆ castGeomToken_

edm::ESGetToken<CaloSubdetectorGeometry, CastorGeometry::AlignedRecord> PCaloGeometryBuilder::castGeomToken_
private

Definition at line 50 of file PCaloGeometryBuilder.cc.

Referenced by beginRun(), and PCaloGeometryBuilder().

◆ ctGeomToken_

edm::ESGetToken<CaloSubdetectorGeometry, CaloTowerGeometry::AlignedRecord> PCaloGeometryBuilder::ctGeomToken_
private

Definition at line 48 of file PCaloGeometryBuilder.cc.

Referenced by beginRun(), and PCaloGeometryBuilder().

◆ ebGeomToken_

edm::ESGetToken<CaloSubdetectorGeometry, EcalBarrelGeometry::AlignedRecord> PCaloGeometryBuilder::ebGeomToken_
private

Definition at line 43 of file PCaloGeometryBuilder.cc.

Referenced by beginRun(), and PCaloGeometryBuilder().

◆ eeGeomToken_

edm::ESGetToken<CaloSubdetectorGeometry, EcalEndcapGeometry::AlignedRecord> PCaloGeometryBuilder::eeGeomToken_
private

Definition at line 44 of file PCaloGeometryBuilder.cc.

Referenced by beginRun(), and PCaloGeometryBuilder().

◆ esGeomToken_

Definition at line 45 of file PCaloGeometryBuilder.cc.

Referenced by beginRun(), and PCaloGeometryBuilder().

◆ hcalGeomToken_

edm::ESGetToken<CaloSubdetectorGeometry, HcalGeometry::AlignedRecord> PCaloGeometryBuilder::hcalGeomToken_
private

Definition at line 47 of file PCaloGeometryBuilder.cc.

Referenced by beginRun(), and PCaloGeometryBuilder().

◆ hgcalGeomToken_

edm::ESGetToken<CaloSubdetectorGeometry, HGCalGeometry::AlignedRecord> PCaloGeometryBuilder::hgcalGeomToken_
private

Definition at line 46 of file PCaloGeometryBuilder.cc.

Referenced by beginRun(), and PCaloGeometryBuilder().

◆ m_ecalE

bool PCaloGeometryBuilder::m_ecalE
private

Definition at line 40 of file PCaloGeometryBuilder.cc.

Referenced by beginRun().

◆ m_ecalP

bool PCaloGeometryBuilder::m_ecalP
private

Definition at line 41 of file PCaloGeometryBuilder.cc.

Referenced by beginRun().

◆ m_hgcal

bool PCaloGeometryBuilder::m_hgcal
private

Definition at line 42 of file PCaloGeometryBuilder.cc.

Referenced by beginRun().

◆ zdcGeomToken_

edm::ESGetToken<CaloSubdetectorGeometry, ZdcGeometry::AlignedRecord> PCaloGeometryBuilder::zdcGeomToken_
private

Definition at line 49 of file PCaloGeometryBuilder.cc.

Referenced by beginRun(), and PCaloGeometryBuilder().