CbmRoot
|
#include <CbmSetup.h>
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) |
CbmFieldMap * | CreateFieldMap () |
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... | |
CbmGeoSetupProvider * | GetProvider () |
Get the geo setup provider. More... | |
void | SetProvider (CbmGeoSetupProvider *value) |
Set the geo setup provider. More... | |
Static Public Member Functions | |
static CbmSetup * | Instance () |
Private Member Functions | |
CbmSetup () | |
! Setup provider More... | |
CbmSetup (const CbmSetup &) | |
CbmSetup | operator= (const CbmSetup &) |
ClassDef (CbmSetup, 3) | |
Private Attributes | |
CbmGeoSetupProvider * | fProvider |
Static Private Attributes | |
static CbmSetup * | fgInstance = NULL |
Pointer to static instance. More... | |
Definition at line 31 of file CbmSetup.h.
|
inline |
Destructor
Definition at line 34 of file CbmSetup.h.
|
inlineprivate |
! Setup provider
Default constructor
Definition at line 205 of file CbmSetup.h.
Referenced by Instance().
|
private |
Copy constructor and assignment operator (not implemented )
|
private |
|
virtual |
Clear the setup
All settings are removed.
Definition at line 35 of file CbmSetup.cxx.
References fProvider, and CbmGeoSetupProvider::Reset().
CbmFieldMap * CbmSetup::CreateFieldMap | ( | ) |
Create the field map using the given settings
Definition at line 40 of file CbmSetup.cxx.
References fProvider, CbmGeoSetup::GetField(), CbmGeoSetupField::GetFilePath(), CbmGeoSetupField::GetMatrix(), CbmGeoSetupField::GetScale(), CbmGeoSetupProvider::GetSetup(), CbmGeoSetupField::GetTag(), CbmFieldMapData::GetType(), CbmFieldMap::SetPosition(), and CbmFieldMap::SetScale().
Referenced by CbmTransport::Run().
Bool_t CbmSetup::GetGeoFileName | ( | ECbmModuleId | moduleId, |
TString & | fileName | ||
) |
Get a geometry file name
[in] | moduleId | Module identifier (type ESystemId or EPassiveId) |
[out] | fileName | Geometry file name for this module |
Definition at line 87 of file CbmSetup.cxx.
References fProvider, CbmGeoSetup::GetModuleMap(), and CbmGeoSetupProvider::GetSetup().
Bool_t CbmSetup::GetGeoTag | ( | ECbmModuleId | moduleId, |
TString & | tag | ||
) |
Get a geometry tag
[in] | moduleId | Module identifier (type ESystemId or EPassiveId) |
[out] | tag | Geometry tag for this module |
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().
|
inline |
Get materials (media) file path
Definition at line 57 of file CbmSetup.h.
References fProvider, CbmGeoSetupMedia::GetFilePath(), CbmGeoSetup::GetMedia(), and CbmGeoSetupProvider::GetSetup().
|
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().
|
inline |
|
static |
Get singleton instance of CbmSetup
Definition at line 115 of file CbmSetup.cxx.
References CbmSetup(), and fgInstance.
Referenced by CbmMuchToTofVectors::Init(), CbmTrdToTofVector::Init(), CbmVectorFinder::Init(), CbmMuchFindVectorsGem::Init(), CbmTrdFindVectors::Init(), and CbmBinnedSettings::Use().
Bool_t CbmSetup::IsActive | ( | ECbmModuleId | moduleId | ) |
Get the activity flag of a detector
moduleId | Module identifier (type ESystemId or EPassiveId) |
Definition at line 123 of file CbmSetup.cxx.
References fProvider, CbmGeoSetup::GetModuleMap(), and CbmGeoSetupProvider::GetSetup().
Referenced by CbmBinnedSettings::Use().
|
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().
|
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().
|
inlinevirtual |
|
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().
void CbmSetup::RemoveModule | ( | ECbmModuleId | moduleId | ) |
Remove a module from the current setup
moduleId | Module identifier (enum SystemId or kMagnet etc.) |
Definition at line 133 of file CbmSetup.cxx.
References fProvider, and CbmGeoSetupProvider::RemoveModule().
void CbmSetup::SetActive | ( | ECbmModuleId | moduleId, |
Bool_t | active = kTRUE |
||
) |
Activate a module (detector)
moduleId | Module identifier. SystemId for detectors, or kMagnet, kPipe, kTarget |
active | Activity 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().
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
tag | Field map tag |
scale | Field 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().
|
inline |
Set the field scaling factor
scale | Field 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().
|
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().
void CbmSetup::SetModule | ( | ECbmModuleId | moduleId, |
const char * | geoTag, | ||
Bool_t | active = kTRUE |
||
) |
Add a module to the setup
moduleId | Module identifier. SystemId for detectors, or kMagnet, kPipe, kTarget |
geoTag | Geometry version for module |
active | Activity 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().
|
inline |
Set the geo setup provider.
value | provider This class takes the ownership of the provider |
Definition at line 192 of file CbmSetup.h.
References fProvider.
Referenced by SetSetupSource().
void CbmSetup::SetSetupSource | ( | ECbmSetupSource | setupSource | ) |
Set the source the setup will be loaded from.
setupSource | enum value ECbmSetupSource |
Definition at line 229 of file CbmSetup.cxx.
References kDb, kRepo, and SetProvider().
Referenced by CbmTransport::SetSetupSource().
string CbmSetup::ToString | ( | ) | const |
Info to string.
Definition at line 197 of file CbmSetup.cxx.
References fProvider, CbmGeoSetupModule::GetActive(), CbmGeoSetup::GetField(), CbmGeoSetupModule::GetFilePath(), CbmGeoSetupField::GetMatrix(), CbmGeoSetup::GetModuleMap(), CbmModuleList::GetModuleNameCaps(), CbmGeoSetup::GetName(), GetNofModules(), CbmGeoSetupField::GetScale(), CbmGeoSetupProvider::GetSetup(), CbmGeoSetupField::GetTag(), and CbmGeoSetupModule::GetTag().
Referenced by Print().
|
staticprivate |
|
private |
Definition at line 200 of file CbmSetup.h.
Referenced by Clear(), CreateFieldMap(), GetGeoFileName(), GetGeoTag(), GetMediaFilePath(), GetNofModules(), GetProvider(), IsActive(), LoadSetup(), RegisterSetup(), RemoveModule(), SetActive(), SetField(), SetFieldScale(), SetMediaFilePath(), SetModule(), SetProvider(), and ToString().