CMS 3D CMS Logo

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

Public Member Functions

void analyze (Event const &iEvent, EventSetup const &) override
 
void beginJob () override
 
 DTGeometryTest (const ParameterSet &)
 
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
 
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

const string m_label
 
const edm::ESGetToken< DTGeometry, MuonGeometryRecordm_token
 

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 18 of file DTGeometryTest.cc.

Constructor & Destructor Documentation

◆ DTGeometryTest()

DTGeometryTest::DTGeometryTest ( const ParameterSet iConfig)
explicit

Definition at line 31 of file DTGeometryTest.cc.

32  : m_label(iConfig.getUntrackedParameter<string>("fromDataLabel", "")),
33  m_token(esConsumes<DTGeometry, MuonGeometryRecord>(edm::ESInputTag{"", m_label})) {}

References m_label.

Member Function Documentation

◆ analyze()

void DTGeometryTest::analyze ( Event const &  iEvent,
EventSetup const &  iEventSetup 
)
overridevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 35 of file DTGeometryTest.cc.

35  {
36  LogVerbatim("DTGeometryTest") << "DTGeometryTest::analyze: " << m_label;
37  ESTransientHandle<DTGeometry> pDD = iEventSetup.getTransientHandle(m_token);
38 
39  LogVerbatim("DTGeometryTest") << " Geometry node for DTGeom is " << (pDD.isValid() ? "valid" : "not valid");
40  LogVerbatim("DTGeometryTest") << " I have " << pDD->detTypes().size() << " detTypes";
41  LogVerbatim("DTGeometryTest") << " I have " << pDD->detUnits().size() << " detUnits";
42  LogVerbatim("DTGeometryTest") << " I have " << pDD->dets().size() << " dets";
43  LogVerbatim("DTGeometryTest") << " I have " << pDD->layers().size() << " layers";
44  LogVerbatim("DTGeometryTest") << " I have " << pDD->superLayers().size() << " superlayers";
45  LogVerbatim("DTGeometryTest") << " I have " << pDD->chambers().size() << " chambers";
46 
47  // check chamber
48  LogVerbatim("DTGeometryTest") << "CHAMBERS " << string(120, '-');
49 
50  LogVerbatim("DTGeometryTest").log([&](auto& log) {
51  for (auto det : pDD->chambers()) {
52  const BoundPlane& surf = det->surface();
53  log << "Chamber " << det->id() << " Position " << surf.position() << " normVect "
54  << roundVecIfNear0(surf.normalVector()) << " bounds W/H/L: " << surf.bounds().width() << "/"
55  << surf.bounds().thickness() << "/" << surf.bounds().length() << "\n";
56  }
57  });
58  LogVerbatim("DTGeometryTest") << "END " << string(120, '-');
59 
60  // check superlayers
61  LogVerbatim("DTGeometryTest") << "SUPERLAYERS " << string(120, '-');
62  LogVerbatim("DTGeometryTest").log([&](auto& log) {
63  for (auto det : pDD->superLayers()) {
64  const BoundPlane& surf = det->surface();
65  log << "SuperLayer " << det->id() << " chamber " << det->chamber()->id() << " Position " << surf.position()
66  << " normVect " << roundVecIfNear0(surf.normalVector()) << " bounds W/H/L: " << surf.bounds().width() << "/"
67  << surf.bounds().thickness() << "/" << surf.bounds().length() << "\n";
68  }
69  });
70  LogVerbatim("DTGeometryTest") << "END " << string(120, '-');
71 
72  // check layers
73  LogVerbatim("DTGeometryTest") << "LAYERS " << string(120, '-');
74 
75  LogVerbatim("DTGeometryTest").log([&](auto& log) {
76  for (auto det : pDD->layers()) {
77  const DTTopology& topo = det->specificTopology();
78  const BoundPlane& surf = det->surface();
79  log << "Layer " << det->id() << " SL " << det->superLayer()->id() << " chamber " << det->chamber()->id()
80  << " Topology W/H/L: " << topo.cellWidth() << "/" << topo.cellHeight() << "/" << topo.cellLenght()
81  << " first/last/# wire " << topo.firstChannel() << "/" << topo.lastChannel() << "/" << topo.channels()
82  << " Position " << surf.position() << " normVect " << roundVecIfNear0(surf.normalVector())
83  << " bounds W/H/L: " << surf.bounds().width() << "/" << surf.bounds().thickness() << "/"
84  << surf.bounds().length() << "\n";
85  }
86  });
87  LogVerbatim("DTGeometryTest") << "END " << string(120, '-');
88 }

References DTTopology::cellHeight(), DTTopology::cellLenght(), DTTopology::cellWidth(), DTGeometry::chambers(), DTTopology::channels(), DTGeometry::dets(), DTGeometry::detTypes(), DTGeometry::detUnits(), DTTopology::firstChannel(), edm::EventSetup::getTransientHandle(), edm::ESHandleBase::isValid(), DTTopology::lastChannel(), DTGeometry::layers(), dqm-mbProfile::log, m_label, m_token, cms_rounding::roundVecIfNear0(), AlCaHLTBitMon_QueryRunRegistry::string, and DTGeometry::superLayers().

◆ beginJob()

void DTGeometryTest::beginJob ( void  )
inlineoverridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 22 of file DTGeometryTest.cc.

22 {}

◆ endJob()

void DTGeometryTest::endJob ( void  )
inlineoverridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 24 of file DTGeometryTest.cc.

24 {}

Member Data Documentation

◆ m_label

const string DTGeometryTest::m_label
private

Definition at line 27 of file DTGeometryTest.cc.

Referenced by analyze(), and DTGeometryTest().

◆ m_token

const edm::ESGetToken<DTGeometry, MuonGeometryRecord> DTGeometryTest::m_token
private

Definition at line 28 of file DTGeometryTest.cc.

Referenced by analyze().

edm::ESInputTag
Definition: ESInputTag.h:87
DTGeometryTest::m_token
const edm::ESGetToken< DTGeometry, MuonGeometryRecord > m_token
Definition: DTGeometryTest.cc:28
cms_rounding::roundVecIfNear0
constexpr valType roundVecIfNear0(valType value, double tolerance=1.e-7)
Definition: Rounding.h:18
DTTopology::channels
int channels() const
Returns the number of wires in the layer.
Definition: DTTopology.h:76
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
DTTopology::cellWidth
float cellWidth() const
Returns the cell width.
Definition: DTTopology.h:69
DTTopology
Definition: DTTopology.h:28
DTTopology::firstChannel
int firstChannel() const
Returns the wire number of the first wire.
Definition: DTTopology.h:79
DTGeometry::layers
const std::vector< const DTLayer * > & layers() const
Return a vector of all SuperLayer.
Definition: DTGeometry.cc:88
DTGeometry::chambers
const std::vector< const DTChamber * > & chambers() const
Return a vector of all Chamber.
Definition: DTGeometry.cc:84
DTGeometry::dets
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
Definition: DTGeometry.cc:63
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DTTopology::cellLenght
float cellLenght() const
Definition: DTTopology.h:74
DTGeometryTest::m_label
const string m_label
Definition: DTGeometryTest.cc:27
DTGeometry::superLayers
const std::vector< const DTSuperLayer * > & superLayers() const
Return a vector of all SuperLayer.
Definition: DTGeometry.cc:86
edm::ESHandleBase::isValid
bool isValid() const
Definition: ESHandle.h:44
edm::ESTransientHandle
Definition: ESTransientHandle.h:41
DTTopology::lastChannel
int lastChannel() const
Returns the wire number of the last wire.
Definition: DTTopology.h:81
DTTopology::cellHeight
float cellHeight() const
Returns the cell height.
Definition: DTTopology.h:71
DTGeometry::detUnits
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
Definition: DTGeometry.cc:61
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
BoundPlane
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
DTGeometry::detTypes
const DetTypeContainer & detTypes() const override
Return a vector of all det types.
Definition: DTGeometry.cc:37