CbmRoot
|
Abstract interface class for providing the CBM detector setup description, module list, magnetic field, material descriptions etc. More...
#include <CbmGeoSetupProvider.h>
Public Member Functions | |
virtual | ~CbmGeoSetupProvider ()=default |
Default destructor is necessary. More... | |
void | SetModuleTag (ECbmModuleId moduleId, std::string tag, Bool_t active) |
Loads the detector with a tag into setup, will invoke GetModuleByTag. More... | |
void | RemoveModule (ECbmModuleId moduleId) |
Removes the module from setup. More... | |
void | SetFieldTag (std::string tag) |
Loads the field with a tag and adds it to the setup. More... | |
void | RegisterSetup () |
Registers the previously loaded setup with FairRoot. Replaces the registerSetup.C macro. More... | |
void | Reset () |
Resets the setup to default (empty) More... | |
CbmGeoSetup & | GetSetup () |
Direct access to underlying geometry setup representation. Allows for fine-tuning of parameters, for exmaple, transformation matrices. More... | |
virtual std::vector< std::string > | GetSetupTags ()=0 |
Abstract method to get the list of setup tags. More... | |
virtual std::vector< std::string > | GetMediaTags ()=0 |
Abstract method to get the list of media tags. More... | |
virtual std::vector< std::string > | GetFieldTags ()=0 |
Abstract method to get the list of field tags. More... | |
virtual CbmGeoSetup | GetSetupByTag (std::string setupTag, std::string revision)=0 |
Abstract method for constructing the setup by id and tag. More... | |
virtual CbmGeoSetupModule | GetModuleByTag (ECbmModuleId moduleId, std::string tag)=0 |
Abstract method for constructing the module by id and tag. More... | |
virtual CbmGeoSetupField | GetFieldByTag (std::string tag)=0 |
Abstract method for constructing the field by tag. More... | |
virtual CbmGeoSetupMedia | GetMediaByTag (std::string tag)=0 |
Abstract method for constructing the media by tag. More... | |
virtual void | LoadSetup (std::string setupTag, std::string revision="")=0 |
Abstract method to load the setup with a tag and revision version. More... | |
Protected Member Functions | |
CbmGeoSetupModule | GetDefaultCaveModule () |
Gets defauk cave if none was provided by the other means. More... | |
Protected Attributes | |
CbmGeoSetup | fSetup {} |
Private Member Functions | |
ClassDef (CbmGeoSetupProvider, 1) | |
underlying geometry setup representation. More... | |
Abstract interface class for providing the CBM detector setup description, module list, magnetic field, material descriptions etc.
This class implements the CbmGeoSetupProvider interface to fetch available setups, fields and media definitions from filesystem. This class works with the svn repository and local filesystem. Revisions, dates and authors of changes are fetched directly from svn. Setup definition is parsed from setup files like setup_sis100_electron.C with regular expressions and follows the established scheme of setup loading.
Definition at line 26 of file CbmGeoSetupProvider.h.
|
virtualdefault |
Default destructor is necessary.
|
private |
underlying geometry setup representation.
|
protected |
Gets defauk cave if none was provided by the other means.
Definition at line 175 of file CbmGeoSetupProvider.cxx.
References kCave, CbmGeoSetupModule::SetFilePath(), CbmGeoSetupModule::SetModuleId(), CbmGeoSetupModule::SetName(), and CbmGeoSetupModule::SetTag().
Referenced by CbmGeoSetupRepoProvider::GetSetupByTag(), and CbmGeoSetupDbProvider::LoadSetup().
|
pure virtual |
Abstract method for constructing the field by tag.
Implemented in CbmGeoSetupDbProvider, and CbmGeoSetupRepoProvider.
Referenced by CbmSetup::SetField(), and SetFieldTag().
|
pure virtual |
Abstract method to get the list of field tags.
Implemented in CbmGeoSetupDbProvider, and CbmGeoSetupRepoProvider.
|
pure virtual |
Abstract method for constructing the media by tag.
Implemented in CbmGeoSetupDbProvider, and CbmGeoSetupRepoProvider.
|
pure virtual |
Abstract method to get the list of media tags.
Implemented in CbmGeoSetupDbProvider, and CbmGeoSetupRepoProvider.
|
pure virtual |
Abstract method for constructing the module by id and tag.
Implemented in CbmGeoSetupDbProvider, and CbmGeoSetupRepoProvider.
Referenced by SetModuleTag().
|
inline |
Direct access to underlying geometry setup representation. Allows for fine-tuning of parameters, for exmaple, transformation matrices.
Definition at line 62 of file CbmGeoSetupProvider.h.
References fSetup.
Referenced by CbmSetup::CreateFieldMap(), CbmSetup::GetGeoFileName(), CbmSetup::GetGeoTag(), CbmSetup::GetMediaFilePath(), CbmSetup::GetNofModules(), CbmSetup::IsActive(), CbmSetup::SetActive(), CbmSetup::SetField(), CbmSetup::SetFieldScale(), CbmSetup::SetMediaFilePath(), CbmSetup::SetModule(), and CbmSetup::ToString().
|
pure virtual |
Abstract method for constructing the setup by id and tag.
Implemented in CbmGeoSetupDbProvider, and CbmGeoSetupRepoProvider.
|
pure virtual |
Abstract method to get the list of setup tags.
Implemented in CbmGeoSetupDbProvider, and CbmGeoSetupRepoProvider.
|
pure virtual |
Abstract method to load the setup with a tag and revision version.
Implemented in CbmGeoSetupDbProvider, and CbmGeoSetupRepoProvider.
Referenced by CbmSetup::LoadSetup().
void CbmGeoSetupProvider::RegisterSetup | ( | ) |
Registers the previously loaded setup with FairRoot. Replaces the registerSetup.C macro.
Definition at line 78 of file CbmGeoSetupProvider.cxx.
References counter, fSetup, CbmGeoSetupMedia::GetFilePath(), CbmGeoSetup::GetMedia(), CbmGeoSetup::GetModuleMap(), CbmGeoSetup::GetName(), kCave, kHodo, kMagnet, kMuch, kMvd, kPipe, kPlatform, kPsd, kRich, kSts, kTarget, kTof, kTrd, and split().
Referenced by CbmSetup::RegisterSetup().
void CbmGeoSetupProvider::RemoveModule | ( | ECbmModuleId | moduleId | ) |
Removes the module from setup.
Definition at line 65 of file CbmGeoSetupProvider.cxx.
References fSetup, and CbmGeoSetup::GetModuleMap().
Referenced by CbmSetup::RemoveModule().
void CbmGeoSetupProvider::Reset | ( | ) |
Resets the setup to default (empty)
Definition at line 173 of file CbmGeoSetupProvider.cxx.
References fSetup.
Referenced by CbmSetup::Clear().
void CbmGeoSetupProvider::SetFieldTag | ( | std::string | tag | ) |
Loads the field with a tag and adds it to the setup.
tag | field tag to load |
Definition at line 69 of file CbmGeoSetupProvider.cxx.
References fSetup, CbmGeoSetup::GetField(), GetFieldByTag(), CbmGeoSetupField::GetMatrix(), CbmGeoSetupField::GetScale(), CbmGeoSetup::SetField(), CbmGeoSetupField::SetMatrix(), and CbmGeoSetupField::SetScale().
void CbmGeoSetupProvider::SetModuleTag | ( | ECbmModuleId | moduleId, |
std::string | tag, | ||
Bool_t | active | ||
) |
Loads the detector with a tag into setup, will invoke GetModuleByTag.
moduleId | ECbmModuleId @patam tag module tag to load |
active | indicates if the module will be treated as active in Monte-Carlo, exact treatment depends on actual implementation of a FairModule |
Definition at line 57 of file CbmGeoSetupProvider.cxx.
References fSetup, GetModuleByTag(), CbmGeoSetup::GetModuleMap(), and CbmGeoSetupModule::SetActive().
Referenced by CbmSetup::SetModule().
|
protected |
Definition at line 90 of file CbmGeoSetupProvider.h.
Referenced by CbmGeoSetupRepoProvider::GetFieldByTag(), CbmGeoSetupRepoProvider::GetMediaByTag(), GetSetup(), CbmGeoSetupRepoProvider::GetSetupByTag(), CbmGeoSetupRepoProvider::LoadSetup(), CbmGeoSetupDbProvider::LoadSetup(), RegisterSetup(), RemoveModule(), Reset(), SetFieldTag(), and SetModuleTag().