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
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,
IdealGeometryRecord
m_detectorToken
 
const ESGetToken
< DDVectorRegistry,
DDVectorRegistryRcd
m_registryToken
 
const ESInputTag m_tag
 

Detailed Description

Definition at line 22 of file DDCMSDetector.cc.

Constructor & Destructor Documentation

DDCMSDetector::DDCMSDetector ( const ParameterSet p)
explicit

Definition at line 36 of file DDCMSDetector.cc.

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

Member Function Documentation

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

Definition at line 41 of file DDCMSDetector.cc.

References edm::ESHandleBase::description(), for(), edm::EventSetup::getTransientHandle(), mps_fire::i, log, m_detectorToken, m_registryToken, and AlCaHLTBitMon_ParallelJobs::p.

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
static std::vector< std::string > checklist log
edm::eventsetup::ComponentDescription const * description() const
Definition: ESHandle.cc:9
const ESGetToken< DDVectorRegistry, DDVectorRegistryRcd > m_registryToken
const ESGetToken< DDDetector, IdealGeometryRecord > m_detectorToken
for(Iditer=Id.begin();Iditer!=Id.end();Iditer++)
void DDCMSDetector::beginJob ( void  )
inlineoverride

Definition at line 26 of file DDCMSDetector.cc.

26 {}
void DDCMSDetector::endJob ( void  )
override

Definition at line 66 of file DDCMSDetector.cc.

66 {}

Member Data Documentation

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

Definition at line 32 of file DDCMSDetector.cc.

Referenced by analyze().

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

Definition at line 33 of file DDCMSDetector.cc.

Referenced by analyze().

const ESInputTag DDCMSDetector::m_tag
private

Definition at line 31 of file DDCMSDetector.cc.