DD4hep  01.18
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
Public Member Functions | Protected Attributes | List of all members
dd4hep::rec::GearHandle Class Reference

Simple wrapper class for objects of type GearParametersImpl that can be added to DetElements with the extension mechanism. More...

#include <DDGear.h>

Public Member Functions

 GearHandle ()
 Default c'tor - only used by dd4hep extenbsion mechanism. More...
 
 GearHandle (gear::GearParametersImpl *gearObj, const std::string &nam)
 User c'tor - specify a name (should be the canonical name used in gear, eg. More...
 
virtual ~GearHandle ()
 D'tor deletes GearParametersImpl object if ownerhsip has not been taken away. More...
 
const std::stringname ()
 Name of GearParametersImpl object - should be the canonical name used in gear, eg. More...
 
gear::GearParametersImpl * gearObject ()
 Get GearParametersImpl object. More...
 
gear::GearParametersImpl * takeGearObject ()
 Get GearParametersImpl object and transfer ownership. More...
 
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 &)
 dummy implementation of required c'tors to allow using the extension mechanism More...
 
 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

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

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

Definition at line 49 of file DDGear.h.

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.

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.

References _gObj.

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.

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

Definition at line 87 of file DDGear.h.

Member Function Documentation

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.

References _materials, and std::vector< T >::push_back().

Referenced by dd4hep::rec::createGearForCLIC(), and dd4hep::rec::createGearForILD().

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

Get GearParametersImpl object.

Definition at line 65 of file DDGear.h.

References _gObj.

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.

References _materials.

Referenced by dd4hep::rec::createGearMgr().

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.

References _name.

Referenced by dd4hep::rec::createGearMgr().

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

Get GearParametersImpl object and transfer ownership.

Definition at line 68 of file DDGear.h.

References _gObj.

Referenced by dd4hep::rec::createGearMgr().

Member Data Documentation

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

Definition at line 43 of file DDGear.h.

Referenced by gearObject(), takeGearObject(), and ~GearHandle().

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

Definition at line 45 of file DDGear.h.

Referenced by addMaterial(), and materials().

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

Definition at line 44 of file DDGear.h.

Referenced by name().


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