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
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
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 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

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
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 13 of file CompareDDCompactViews.cc.

Constructor & Destructor Documentation

◆ CompareDDCompactViews()

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

Definition at line 29 of file CompareDDCompactViews.cc.

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

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

◆ ~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 ( )
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.

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

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 }
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:81
DDLParser is the main class of Detector Description Language Parser.
Definition: DDLParser.h:63
DDComparators need to know if names of DDRotation matter.
bool DDCheckMaterials(std::ostream &, std::vector< std::pair< std::string, std::string > > *=nullptr)
bool DDCompareCPV(const DDCompactView &lhs, const DDCompactView &rhs, const DDCompOptions &ddco)

◆ 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().