Belle II Software development
KLMGeometryPar Class Reference

Wrapper class around bklm::GeometryPar and EKLM::GeometryData. More...

#include <KLMGeometryPar.h>

Static Public Member Functions

static const bklm::GeometryParBarrelInstance ()
 Return a pointer to the bklm::GeometryPar instance.
 
static const EKLM::GeometryDataEndcapInstance ()
 Return a pointer to the EKLM::GeometryData instance.
 

Private Member Functions

 KLMGeometryPar ()
 Private constructor.
 
 ~KLMGeometryPar ()
 Private destructor.
 

Detailed Description

Wrapper class around bklm::GeometryPar and EKLM::GeometryData.

It only returns an instance to the barrel or endcap geometry.

This class has a ROOT dictionary, therefore it can be used in python modules:

import basf2
import ROOT
class KLMGeometryPrinter(basf2.Module):
def beginRun(self):
bklm = ROOT.Belle2.KLMGeometryPar.BarrelInstance()
if bklm:
print(bklm.getLayerInnerRadius(5))
eklm = ROOT.Belle2.KLMGeometryPar.EndcapInstance()
if eklm:
print(eklm.getStripLength(21))
Note
In order to return something meaningful, the python module has to be added to a path after the Gearbox and the Geometry modules.

Definition at line 40 of file KLMGeometryPar.h.

Member Function Documentation

◆ BarrelInstance()

static const bklm::GeometryPar * BarrelInstance ( )
inlinestatic

Return a pointer to the bklm::GeometryPar instance.

Definition at line 47 of file KLMGeometryPar.h.

48 {
50 }
static GeometryPar * instance(void)
Static method to get a reference to the singleton GeometryPar instance.
Definition: GeometryPar.cc:27

◆ EndcapInstance()

static const EKLM::GeometryData * EndcapInstance ( )
inlinestatic

Return a pointer to the EKLM::GeometryData instance.

Definition at line 55 of file KLMGeometryPar.h.

56 {
58 }
static const GeometryData & Instance(enum DataSource dataSource=c_Database, const GearDir *gearDir=nullptr)
Instantiation.
Definition: GeometryData.cc:33

The documentation for this class was generated from the following file: