CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
List of all members | Public Member Functions | Private Attributes
DDCMSDetector Class Reference
Inheritance diagram for DDCMSDetector:

Public Member Functions

void analyze (Event const &iEvent, EventSetup const &) override
 
void beginJob () override
 
 DDCMSDetector (const ParameterSet &p)
 
void endJob () override
 

Private Attributes

const ESGetToken< DDDetector, IdealGeometryRecordm_detectorToken
 
const ESGetToken< DDVectorRegistry, DDVectorRegistryRcdm_registryToken
 
const ESInputTag m_tag
 

Detailed Description

Definition at line 22 of file DDCMSDetector.cc.

Constructor & Destructor Documentation

◆ DDCMSDetector()

DDCMSDetector::DDCMSDetector ( const ParameterSet p)
explicit

Definition at line 36 of file DDCMSDetector.cc.

37  : m_tag(iConfig.getParameter<ESInputTag>("DDDetector")),
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
const ESGetToken< DDVectorRegistry, DDVectorRegistryRcd > m_registryToken
const ESGetToken< DDDetector, IdealGeometryRecord > m_detectorToken
const ESInputTag m_tag

Member Function Documentation

◆ analyze()

void DDCMSDetector::analyze ( Event const &  iEvent,
EventSetup const &  iEventSetup 
)
override

Definition at line 41 of file DDCMSDetector.cc.

References cms::DDDetector::description(), edm::EventSetup::getTransientHandle(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, dqm-mbProfile::log, m_detectorToken, m_registryToken, AlCaHLTBitMon_ParallelJobs::p, and cms::DDVectorRegistry::vectors.

41  {
42  ESTransientHandle<DDDetector> det = iEventSetup.getTransientHandle(m_detectorToken);
43 
44  LogVerbatim("Geometry") << "Iterate over the detectors:\n";
45  LogVerbatim("Geometry").log([&](auto& log) {
46  for (auto const& it : det->description()->detectors()) {
47  dd4hep::DetElement det(it.second);
48  log << it.first << ": " << det.path();
49  }
50  });
51  LogVerbatim("Geometry") << "..done!";
52 
53  ESTransientHandle<DDVectorRegistry> registry = iEventSetup.getTransientHandle(m_registryToken);
54 
55  LogVerbatim("Geometry") << "DD Vector Registry size: " << registry->vectors.size();
56  LogVerbatim("Geometry").log([&](auto& log) {
57  for (const auto& p : registry->vectors) {
58  log << " " << p.first << " => ";
59  for (const auto& i : p.second)
60  log << i << ", ";
61  log << '\n';
62  }
63  });
64 }
Log< level::Info, true > LogVerbatim
dd4hep::Detector const * description() const
Definition: DDDetector.h:35
const ESGetToken< DDVectorRegistry, DDVectorRegistryRcd > m_registryToken
const ESGetToken< DDDetector, IdealGeometryRecord > m_detectorToken

◆ beginJob()

void DDCMSDetector::beginJob ( )
inlineoverride

Definition at line 26 of file DDCMSDetector.cc.

26 {}

◆ endJob()

void DDCMSDetector::endJob ( void  )
override

Definition at line 66 of file DDCMSDetector.cc.

66 {}

Member Data Documentation

◆ m_detectorToken

const ESGetToken<DDDetector, IdealGeometryRecord> DDCMSDetector::m_detectorToken
private

Definition at line 32 of file DDCMSDetector.cc.

Referenced by analyze().

◆ m_registryToken

const ESGetToken<DDVectorRegistry, DDVectorRegistryRcd> DDCMSDetector::m_registryToken
private

Definition at line 33 of file DDCMSDetector.cc.

Referenced by analyze().

◆ m_tag

const ESInputTag DDCMSDetector::m_tag
private

Definition at line 31 of file DDCMSDetector.cc.