CMS 3D CMS Logo

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

Public Member Functions

void analyze (edm::Event const &iEvent, edm::EventSetup const &) override
 
void beginJob () override
 
 DDCMSDetector (const edm::ParameterSet &p)
 
void endJob () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer<>
 EDAnalyzer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const 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
 
bool wantsStreamRuns () const
 
 ~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
 
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::vector< ModuleDescription const * > &modules, 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
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

std::string m_confGeomXMLFiles
 
std::vector< std::string > m_files
 
std::vector< std::string > m_relFiles
 

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)
 
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 ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
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)
 

Detailed Description

Definition at line 12 of file DDCMSDetector.cc.

Constructor & Destructor Documentation

DDCMSDetector::DDCMSDetector ( const edm::ParameterSet p)
explicit

Definition at line 27 of file DDCMSDetector.cc.

References edm::FileInPath::fullPath(), edm::ParameterSet::getParameter(), m_confGeomXMLFiles, m_files, m_relFiles, and AlCaHLTBitMon_QueryRunRegistry::string.

28 {
29  m_confGeomXMLFiles = edm::FileInPath( iConfig.getParameter<std::string>( "confGeomXMLFiles" )).fullPath();
30 
31  m_relFiles = iConfig.getParameter<std::vector<std::string> >( "geomXMLFiles" );
32  for( const auto& it : m_relFiles ) {
33  edm::FileInPath fp( it );
34  m_files.emplace_back( fp.fullPath());
35  }
36 }
std::vector< std::string > m_relFiles
std::vector< std::string > m_files
std::string m_confGeomXMLFiles
std::string fullPath() const
Definition: FileInPath.cc:197

Member Function Documentation

void DDCMSDetector::analyze ( edm::Event const &  iEvent,
edm::EventSetup const &   
)
overridevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 39 of file DDCMSDetector.cc.

References gather_cfg::cout, heppy_report::description, align::Detector, PatBasicFWLiteAnalyzer::files, mps_fire::i, m_confGeomXMLFiles, m_files, dataset::name, AlCaHLTBitMon_ParallelJobs::p, PhysicsTools::registry, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by beginJob().

40 {
41  dd4hep::Detector& description = dd4hep::Detector::getInstance();
42 
43  std::string name( "DD4hep_CompactLoader" );
44 
45  const char* files[] = { m_confGeomXMLFiles.c_str(), nullptr };
46  description.apply( name.c_str(), 2, (char**)files );
47 
48  for( const auto& it : m_files )
49  std::cout << it << std::endl;
50 
52  std::cout << "DD Vector Registry size: " << registry->size() << "\n";
53  for( const auto& p: *registry ) {
54  std::cout << " " << p.first << " => ";
55  for( const auto& i : p.second )
56  std::cout << i << ", ";
57  std::cout << '\n';
58  }
59 }
std::vector< std::string > m_files
std::string m_confGeomXMLFiles
static Interceptor::Registry registry("Interceptor")
void DDCMSDetector::beginJob ( void  )
inlineoverridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 16 of file DDCMSDetector.cc.

References analyze(), endJob(), and iEvent.

16 {}
void DDCMSDetector::endJob ( void  )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 62 of file DDCMSDetector.cc.

References DEFINE_FWK_MODULE.

Referenced by beginJob().

63 {
64  // FIXME: It does not clean up:
65  // dd4hep::Detector::getInstance().destroyInstance();
66 }

Member Data Documentation

std::string DDCMSDetector::m_confGeomXMLFiles
private

Definition at line 22 of file DDCMSDetector.cc.

Referenced by analyze(), and DDCMSDetector().

std::vector< std::string > DDCMSDetector::m_files
private

Definition at line 24 of file DDCMSDetector.cc.

Referenced by analyze(), and DDCMSDetector().

std::vector< std::string > DDCMSDetector::m_relFiles
private

Definition at line 23 of file DDCMSDetector.cc.

Referenced by DDCMSDetector().