CbmRoot
CbmSetup Class Reference

#include <CbmSetup.h>

Inheritance diagram for CbmSetup:
[legend]
Collaboration diagram for CbmSetup:
[legend]

Public Member Functions

 ~CbmSetup ()
 
virtual void Clear (Option_t *opt="")
 
void LoadSetup (const char *setupName)
 
void RegisterSetup ()
 
std::string GetMediaFilePath ()
 
void SetMediaFilePath (std::string filePath)
 
CbmFieldMapCreateFieldMap ()
 
Bool_t GetGeoTag (ECbmModuleId moduleId, TString &tag)
 
Bool_t GetGeoFileName (ECbmModuleId moduleId, TString &fileName)
 
Int_t GetNofModules () const
 
Bool_t IsActive (ECbmModuleId moduleId)
 
Bool_t IsEmpty () const
 
virtual void Print (Option_t *="") const
 Info to screen. More...
 
void RemoveModule (ECbmModuleId moduleId)
 
void SetActive (ECbmModuleId moduleId, Bool_t active=kTRUE)
 
void SetField (const char *tag, Double_t scale=1., Double_t xPos=0., Double_t yPos=0., Double_t zPos=0.)
 
void SetFieldScale (Double_t scale)
 
void SetModule (ECbmModuleId moduleId, const char *geoTag, Bool_t active=kTRUE)
 
std::string ToString () const
 Info to string. More...
 
void SetSetupSource (ECbmSetupSource setupSource)
 Set the source the setup will be loaded from. More...
 
CbmGeoSetupProviderGetProvider ()
 Get the geo setup provider. More...
 
void SetProvider (CbmGeoSetupProvider *value)
 Set the geo setup provider. More...
 

Static Public Member Functions

static CbmSetupInstance ()
 

Private Member Functions

 CbmSetup ()
 ! Setup provider More...
 
 CbmSetup (const CbmSetup &)
 
CbmSetup operator= (const CbmSetup &)
 
 ClassDef (CbmSetup, 3)
 

Private Attributes

CbmGeoSetupProviderfProvider
 

Static Private Attributes

static CbmSetupfgInstance = NULL
 Pointer to static instance. More...
 

Detailed Description

Definition at line 31 of file CbmSetup.h.

Constructor & Destructor Documentation

◆ ~CbmSetup()

CbmSetup::~CbmSetup ( )
inline

Destructor

Definition at line 34 of file CbmSetup.h.

◆ CbmSetup() [1/2]

CbmSetup::CbmSetup ( )
inlineprivate

! Setup provider

Default constructor

Definition at line 205 of file CbmSetup.h.

Referenced by Instance().

◆ CbmSetup() [2/2]

CbmSetup::CbmSetup ( const CbmSetup )
private

Copy constructor and assignment operator (not implemented )

Member Function Documentation

◆ ClassDef()

CbmSetup::ClassDef ( CbmSetup  ,
 
)
private

◆ Clear()

void CbmSetup::Clear ( Option_t *  opt = "")
virtual

Clear the setup

All settings are removed.

Definition at line 35 of file CbmSetup.cxx.

References fProvider, and CbmGeoSetupProvider::Reset().

◆ CreateFieldMap()

◆ GetGeoFileName()

Bool_t CbmSetup::GetGeoFileName ( ECbmModuleId  moduleId,
TString &  fileName 
)

Get a geometry file name

Parameters
[in]moduleIdModule identifier (type ESystemId or EPassiveId)
[out]fileNameGeometry file name for this module
Returns
kTRUE if module is present in setup; else kFALSE

Definition at line 87 of file CbmSetup.cxx.

References fProvider, CbmGeoSetup::GetModuleMap(), and CbmGeoSetupProvider::GetSetup().

◆ GetGeoTag()

Bool_t CbmSetup::GetGeoTag ( ECbmModuleId  moduleId,
TString &  tag 
)

Get a geometry tag

Parameters
[in]moduleIdModule identifier (type ESystemId or EPassiveId)
[out]tagGeometry tag for this module
Returns
kTRUE if module is present in setup; else kFALSE

Definition at line 101 of file CbmSetup.cxx.

References fProvider, CbmGeoSetup::GetModuleMap(), and CbmGeoSetupProvider::GetSetup().

Referenced by CbmMuchToTofVectors::Init(), CbmTrdToTofVector::Init(), CbmMuchFindVectorsGem::Init(), and CbmTrdFindVectors::Init().

◆ GetMediaFilePath()

std::string CbmSetup::GetMediaFilePath ( )
inline

Get materials (media) file path

Definition at line 57 of file CbmSetup.h.

References fProvider, CbmGeoSetupMedia::GetFilePath(), CbmGeoSetup::GetMedia(), and CbmGeoSetupProvider::GetSetup().

◆ GetNofModules()

Int_t CbmSetup::GetNofModules ( ) const
inline

Get number of modules in the setup @value Number of modules in setup

Definition at line 90 of file CbmSetup.h.

References fProvider, CbmGeoSetup::GetModuleMap(), and CbmGeoSetupProvider::GetSetup().

Referenced by IsEmpty(), and ToString().

◆ GetProvider()

CbmGeoSetupProvider* CbmSetup::GetProvider ( )
inline

Get the geo setup provider.

Definition at line 185 of file CbmSetup.h.

References fProvider.

◆ Instance()

CbmSetup * CbmSetup::Instance ( )
static

◆ IsActive()

Bool_t CbmSetup::IsActive ( ECbmModuleId  moduleId)

Get the activity flag of a detector

Parameters
moduleIdModule identifier (type ESystemId or EPassiveId)
Returns
kTRUE if detector and active, else kFALSE

Definition at line 123 of file CbmSetup.cxx.

References fProvider, CbmGeoSetup::GetModuleMap(), and CbmGeoSetupProvider::GetSetup().

Referenced by CbmBinnedSettings::Use().

◆ IsEmpty()

Bool_t CbmSetup::IsEmpty ( ) const
inline

Check whether the setup is empty (contains no modules) @value kTRUE if the number of modules is null

Definition at line 109 of file CbmSetup.h.

References GetNofModules().

◆ LoadSetup()

void CbmSetup::LoadSetup ( const char *  setupName)
inline

Load setup modules, field and media. Afterward the parameters can be overriden over the provider See CbmGeoSetupProvider::GetSetup() for details Actual functionality is implemented in the CbmGeoSetupProvider

Definition at line 48 of file CbmSetup.h.

References fProvider, and CbmGeoSetupProvider::LoadSetup().

Referenced by CbmTransport::LoadSetup().

◆ operator=()

CbmSetup CbmSetup::operator= ( const CbmSetup )
private

◆ Print()

virtual void CbmSetup::Print ( Option_t *  = "") const
inlinevirtual

Info to screen.

Definition at line 113 of file CbmSetup.h.

References ToString().

◆ RegisterSetup()

void CbmSetup::RegisterSetup ( )
inline

Register setup modules, field and media with FairRoot Actual functionality is implemented in the CbmGeoSetupProvider

Definition at line 53 of file CbmSetup.h.

References fProvider, and CbmGeoSetupProvider::RegisterSetup().

Referenced by CbmTransport::RegisterSetup().

◆ RemoveModule()

void CbmSetup::RemoveModule ( ECbmModuleId  moduleId)

Remove a module from the current setup

Parameters
moduleIdModule identifier (enum SystemId or kMagnet etc.)

Definition at line 133 of file CbmSetup.cxx.

References fProvider, and CbmGeoSetupProvider::RemoveModule().

◆ SetActive()

void CbmSetup::SetActive ( ECbmModuleId  moduleId,
Bool_t  active = kTRUE 
)

Activate a module (detector)

Parameters
moduleIdModule identifier. SystemId for detectors, or kMagnet, kPipe, kTarget
activeActivity tag for module (only in case of detectors)

Activate or deactivate a detector already present in the setup. The method will have no effect if called for a passive module (target, pipe, magnet). If a detector is flagged active, its ProcessHits method will be called during the transport simulation.

Definition at line 140 of file CbmSetup.cxx.

References fProvider, CbmGeoSetup::GetModuleMap(), and CbmGeoSetupProvider::GetSetup().

◆ SetField()

void CbmSetup::SetField ( const char *  tag,
Double_t  scale = 1.,
Double_t  xPos = 0.,
Double_t  yPos = 0.,
Double_t  zPos = 0. 
)

Set the magnetic field map

Parameters
tagField map tag
scaleField scaling factor

The magnetic field map is automatically selected according to the magnet geometry version. The user can, however, override this by choosing a different field map. In this case, consistency between field map and magnet geometry is within the responsibility of the user.

Definition at line 157 of file CbmSetup.cxx.

References fProvider, CbmGeoSetup::GetField(), CbmGeoSetupProvider::GetFieldByTag(), CbmGeoSetupField::GetMatrix(), CbmGeoSetupProvider::GetSetup(), CbmGeoSetupField::GetTag(), CbmGeoSetup::SetField(), and CbmGeoSetupField::SetScale().

◆ SetFieldScale()

void CbmSetup::SetFieldScale ( Double_t  scale)
inline

Set the field scaling factor

Parameters
scaleField scaling factor

The currently selected field map will be scaled by the specified factor.

Definition at line 157 of file CbmSetup.h.

References fProvider, CbmGeoSetup::GetField(), CbmGeoSetupProvider::GetSetup(), and CbmGeoSetupField::SetScale().

◆ SetMediaFilePath()

void CbmSetup::SetMediaFilePath ( std::string  filePath)
inline

Set materials (media) file path

Definition at line 63 of file CbmSetup.h.

References fProvider, CbmGeoSetup::GetMedia(), CbmGeoSetupProvider::GetSetup(), and CbmGeoSetupMedia::SetFilePath().

Referenced by CbmTransport::SetMediaFileName().

◆ SetModule()

void CbmSetup::SetModule ( ECbmModuleId  moduleId,
const char *  geoTag,
Bool_t  active = kTRUE 
)

Add a module to the setup

Parameters
moduleIdModule identifier. SystemId for detectors, or kMagnet, kPipe, kTarget
geoTagGeometry version for module
activeActivity tag for module (only in case of detectors)

The module / detector will be added to the setup. If a detector is flagged active, its ProcessHits method will be called during the transport simulation.

Definition at line 176 of file CbmSetup.cxx.

References fProvider, CbmGeoSetup::GetModuleMap(), CbmGeoSetupProvider::GetSetup(), CbmGeoSetupModule::GetTag(), and CbmGeoSetupProvider::SetModuleTag().

◆ SetProvider()

void CbmSetup::SetProvider ( CbmGeoSetupProvider value)
inline

Set the geo setup provider.

Parameters
valueprovider This class takes the ownership of the provider

Definition at line 192 of file CbmSetup.h.

References fProvider.

Referenced by SetSetupSource().

◆ SetSetupSource()

void CbmSetup::SetSetupSource ( ECbmSetupSource  setupSource)

Set the source the setup will be loaded from.

Parameters
setupSourceenum value ECbmSetupSource

Definition at line 229 of file CbmSetup.cxx.

References kDb, kRepo, and SetProvider().

Referenced by CbmTransport::SetSetupSource().

◆ ToString()

Member Data Documentation

◆ fgInstance

CbmSetup * CbmSetup::fgInstance = NULL
staticprivate

Pointer to static instance.

Definition at line 198 of file CbmSetup.h.

Referenced by Instance().

◆ fProvider


The documentation for this class was generated from the following files:
CbmGeoSetupRepoProvider
Setup provider with local (svn) repository functionality.
Definition: CbmGeoSetupRepoProvider.h:21