DD4hep  1.28.0
Detector Description Toolkit for High Energy Physics
Public Member Functions | Protected Attributes | List of all members
dd4hep::rec::GearHandle Class Reference

#include <DDGear.h>

Public Member Functions

 GearHandle ()
 
 GearHandle (gear::GearParametersImpl *gearObj, const std::string &nam)
 
virtual ~GearHandle ()
 
const std::string & name ()
 
gear::GearParametersImpl * gearObject ()
 
gear::GearParametersImpl * takeGearObject ()
 
void addMaterial (const std::string nam, double A, double Z, double density, double radLen, double intLen)
 add a SimpleMaterial object More...
 
const std::vector< gear::SimpleMaterialImpl > & materials ()
 get all materials assigned to this wrapper More...
 
 GearHandle (const DetElement &)
 
 GearHandle (const GearHandle &, const DetElement &)
 

Protected Attributes

gear::GearParametersImpl * _gObj
 
std::string _name
 
std::vector< gear::SimpleMaterialImpl > _materials
 

Detailed Description

Simple wrapper class for objects of type GearParametersImpl that can be added to DetElements with the extension mechanism. There can only be one such object added to any given DetElement

Author
F.Gaede, DESY
Version
$Id$

Definition at line 40 of file DDGear.h.

Constructor & Destructor Documentation

◆ GearHandle() [1/4]

dd4hep::rec::GearHandle::GearHandle ( )
inline

Default c'tor - only used by dd4hep extenbsion mechanism.

Definition at line 49 of file DDGear.h.

◆ GearHandle() [2/4]

dd4hep::rec::GearHandle::GearHandle ( gear::GearParametersImpl *  gearObj,
const std::string &  nam 
)
inline

User c'tor - specify a name (should be the canonical name used in gear, eg. TPCParameters, SITParameters, etc.) and the GearParametersImpl object

Definition at line 53 of file DDGear.h.

◆ ~GearHandle()

virtual dd4hep::rec::GearHandle::~GearHandle ( )
inlinevirtual

D'tor deletes GearParametersImpl object if ownerhsip has not been taken away

Definition at line 56 of file DDGear.h.

◆ GearHandle() [3/4]

dd4hep::rec::GearHandle::GearHandle ( const DetElement )
inline

dummy implementation of required c'tors to allow using the extension mechanism

Definition at line 86 of file DDGear.h.

◆ GearHandle() [4/4]

dd4hep::rec::GearHandle::GearHandle ( const GearHandle ,
const DetElement  
)
inline

Definition at line 87 of file DDGear.h.

Member Function Documentation

◆ addMaterial()

void dd4hep::rec::GearHandle::addMaterial ( const std::string  nam,
double  A,
double  Z,
double  density,
double  radLen,
double  intLen 
)
inline

add a SimpleMaterial object

Definition at line 76 of file DDGear.h.

◆ gearObject()

gear::GearParametersImpl* dd4hep::rec::GearHandle::gearObject ( )
inline

Get GearParametersImpl object

Definition at line 65 of file DDGear.h.

◆ materials()

const std::vector< gear::SimpleMaterialImpl >& dd4hep::rec::GearHandle::materials ( )
inline

get all materials assigned to this wrapper

Definition at line 82 of file DDGear.h.

◆ name()

const std::string& dd4hep::rec::GearHandle::name ( )
inline

Name of GearParametersImpl object - should be the canonical name used in gear, eg. TPCParameters, SITParameters, etc.

Definition at line 62 of file DDGear.h.

◆ takeGearObject()

gear::GearParametersImpl* dd4hep::rec::GearHandle::takeGearObject ( )
inline

Get GearParametersImpl object and transfer ownership

Definition at line 68 of file DDGear.h.

Member Data Documentation

◆ _gObj

gear::GearParametersImpl* dd4hep::rec::GearHandle::_gObj
protected

Definition at line 43 of file DDGear.h.

◆ _materials

std::vector< gear::SimpleMaterialImpl > dd4hep::rec::GearHandle::_materials
protected

Definition at line 45 of file DDGear.h.

◆ _name

std::string dd4hep::rec::GearHandle::_name
protected

Definition at line 44 of file DDGear.h.


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