CMS 3D CMS Logo

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

Public Member Functions

void analyze (edm::Event const &, edm::EventSetup const &) override
 
void beginJob () override
 
void beginRun (edm::Run const &, edm::EventSetup const &) override
 
 CompareDDCompactViews (const edm::ParameterSet &)
 
void endJob () override
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
 ~CompareDDCompactViews () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns >
 EDAnalyzer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () 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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > 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
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

std::string m_fname1
 
std::string m_fname2
 

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
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Definition at line 13 of file CompareDDCompactViews.cc.

Constructor & Destructor Documentation

◆ CompareDDCompactViews()

CompareDDCompactViews::CompareDDCompactViews ( const edm::ParameterSet iConfig)
explicit

Definition at line 29 of file CompareDDCompactViews.cc.

29  {
30  m_fname1 = iConfig.getUntrackedParameter<std::string>("XMLFileName1");
31  m_fname2 = iConfig.getUntrackedParameter<std::string>("XMLFileName2");
32 }

References edm::ParameterSet::getUntrackedParameter(), m_fname1, m_fname2, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ ~CompareDDCompactViews()

CompareDDCompactViews::~CompareDDCompactViews ( )
inlineoverride

Definition at line 16 of file CompareDDCompactViews.cc.

16 {}

Member Function Documentation

◆ analyze()

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

Implements edm::one::EDAnalyzerBase.

Definition at line 20 of file CompareDDCompactViews.cc.

20 {}

◆ beginJob()

void CompareDDCompactViews::beginJob ( void  )
inlineoverridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 18 of file CompareDDCompactViews.cc.

18 {}

◆ beginRun()

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

Definition at line 34 of file CompareDDCompactViews.cc.

34  {
35  DDCompactView cpv1;
36  DDLParser parser1(cpv1);
37  parser1.parseOneFile(m_fname1);
39  cpv1.lockdown();
40 
41  DDCompactView cpv2;
42  DDLParser parser2(cpv2);
43  parser2.parseOneFile(m_fname2);
45  cpv2.lockdown();
46 
47  DDCompOptions ddco;
48  bool graphmatch = DDCompareCPV(cpv1, cpv2, ddco);
49 
50  if (graphmatch) {
51  std::cout << "DDCompactView graphs match" << std::endl;
52  } else {
53  std::cout << "DDCompactView graphs do NOT match" << std::endl;
54  }
55 }

References gather_cfg::cout, DDCheckMaterials(), DDCompareCPV(), DDCompactView::lockdown(), m_fname1, m_fname2, and DDLParser::parseOneFile().

◆ endJob()

void CompareDDCompactViews::endJob ( void  )
inlineoverridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 22 of file CompareDDCompactViews.cc.

22 {}

◆ endRun()

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

Definition at line 21 of file CompareDDCompactViews.cc.

21 {}

Member Data Documentation

◆ m_fname1

std::string CompareDDCompactViews::m_fname1
private

Definition at line 25 of file CompareDDCompactViews.cc.

Referenced by beginRun(), and CompareDDCompactViews().

◆ m_fname2

std::string CompareDDCompactViews::m_fname2
private

Definition at line 26 of file CompareDDCompactViews.cc.

Referenced by beginRun(), and CompareDDCompactViews().

DDCompareCPV
bool DDCompareCPV(const DDCompactView &lhs, const DDCompactView &rhs, const DDCompOptions &ddco)
Definition: DDCompareTools.cc:63
gather_cfg.cout
cout
Definition: gather_cfg.py:144
DDCompactView::lockdown
void lockdown()
Definition: DDCompactView.cc:104
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
DDCompactView
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:81
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DDLParser
DDLParser is the main class of Detector Description Language Parser.
Definition: DDLParser.h:63
CompareDDCompactViews::m_fname2
std::string m_fname2
Definition: CompareDDCompactViews.cc:26
DDCompOptions
DDComparators need to know if names of DDRotation matter.
Definition: DDCompareTools.h:22
CompareDDCompactViews::m_fname1
std::string m_fname1
Definition: CompareDDCompactViews.cc:25
DDCheckMaterials
bool DDCheckMaterials(std::ostream &, std::vector< std::pair< std::string, std::string > > *=nullptr)