CbmRoot
Loading...
Searching...
No Matches
CbmGeoSetupProvider Class Referenceabstract

Abstract interface class for providing the CBM detector setup description, module list, magnetic field, material descriptions etc. More...

#include <CbmGeoSetupProvider.h>

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

Public Member Functions

virtual ~CbmGeoSetupProvider ()=default
 Default destructor is necessary.
 
void SetModuleTag (ECbmModuleId moduleId, std::string tag, Bool_t active)
 Loads the detector with a tag into setup, will invoke GetModuleByTag.
 
void RemoveModule (ECbmModuleId moduleId)
 Removes the module from setup.
 
void SetFieldTag (std::string tag)
 Loads the field with a tag and adds it to the setup.
 
void RegisterSetup ()
 Registers the previously loaded setup with FairRoot. Replaces the registerSetup.C macro.
 
void Reset ()
 Resets the setup to default (empty)
 
CbmGeoSetupGetSetup ()
 Direct access to underlying geometry setup representation. Allows for fine-tuning of parameters, for exmaple, transformation matrices.
 
virtual std::vector< std::string > GetSetupTags ()=0
 Abstract method to get the list of setup tags.
 
virtual std::vector< std::string > GetMediaTags ()=0
 Abstract method to get the list of media tags.
 
virtual std::vector< std::string > GetFieldTags ()=0
 Abstract method to get the list of field tags.
 
virtual CbmGeoSetup GetSetupByTag (std::string setupTag, std::string revision)=0
 Abstract method for constructing the setup by id and tag.
 
virtual CbmGeoSetupModule GetModuleByTag (ECbmModuleId moduleId, std::string tag)=0
 Abstract method for constructing the module by id and tag.
 
virtual CbmGeoSetupField GetFieldByTag (std::string tag)=0
 Abstract method for constructing the field by tag.
 
virtual CbmGeoSetupMedia GetMediaByTag (std::string tag)=0
 Abstract method for constructing the media by tag.
 
virtual void LoadSetup (std::string setupTag, std::string revision="")=0
 Abstract method to load the setup with a tag and revision version.
 

Protected Member Functions

CbmGeoSetupModule GetDefaultCaveModule ()
 Gets defauk cave if none was provided by the other means.
 

Protected Attributes

CbmGeoSetup fSetup {}
 

Private Member Functions

 ClassDef (CbmGeoSetupProvider, 1)
 underlying geometry setup representation.
 

Detailed Description

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 32 of file CbmGeoSetupProvider.h.

Constructor & Destructor Documentation

◆ ~CbmGeoSetupProvider()

virtual CbmGeoSetupProvider::~CbmGeoSetupProvider ( )
virtualdefault

Default destructor is necessary.

Member Function Documentation

◆ ClassDef()

CbmGeoSetupProvider::ClassDef ( CbmGeoSetupProvider ,
1  )
private

underlying geometry setup representation.

◆ GetDefaultCaveModule()

CbmGeoSetupModule CbmGeoSetupProvider::GetDefaultCaveModule ( )
protected

Gets defauk cave if none was provided by the other means.

Definition at line 159 of file CbmGeoSetupProvider.cxx.

Referenced by CbmGeoSetupRepoProvider::GetSetupByTag(), and CbmGeoSetupDbProvider::LoadSetup().

◆ GetFieldByTag()

virtual CbmGeoSetupField CbmGeoSetupProvider::GetFieldByTag ( std::string tag)
pure virtual

Abstract method for constructing the field by tag.

Implemented in CbmGeoSetupDbProvider, and CbmGeoSetupRepoProvider.

Referenced by CbmSetup::SetField(), and SetFieldTag().

◆ GetFieldTags()

virtual std::vector< std::string > CbmGeoSetupProvider::GetFieldTags ( )
pure virtual

Abstract method to get the list of field tags.

Implemented in CbmGeoSetupDbProvider, and CbmGeoSetupRepoProvider.

◆ GetMediaByTag()

virtual CbmGeoSetupMedia CbmGeoSetupProvider::GetMediaByTag ( std::string tag)
pure virtual

Abstract method for constructing the media by tag.

Implemented in CbmGeoSetupDbProvider, and CbmGeoSetupRepoProvider.

◆ GetMediaTags()

virtual std::vector< std::string > CbmGeoSetupProvider::GetMediaTags ( )
pure virtual

Abstract method to get the list of media tags.

Implemented in CbmGeoSetupDbProvider, and CbmGeoSetupRepoProvider.

◆ GetModuleByTag()

virtual CbmGeoSetupModule CbmGeoSetupProvider::GetModuleByTag ( ECbmModuleId moduleId,
std::string tag )
pure virtual

Abstract method for constructing the module by id and tag.

Implemented in CbmGeoSetupDbProvider, and CbmGeoSetupRepoProvider.

Referenced by SetModuleTag().

◆ GetSetup()

CbmGeoSetup & CbmGeoSetupProvider::GetSetup ( )
inline

◆ GetSetupByTag()

virtual CbmGeoSetup CbmGeoSetupProvider::GetSetupByTag ( std::string setupTag,
std::string revision )
pure virtual

Abstract method for constructing the setup by id and tag.

Implemented in CbmGeoSetupDbProvider, and CbmGeoSetupRepoProvider.

◆ GetSetupTags()

virtual std::vector< std::string > CbmGeoSetupProvider::GetSetupTags ( )
pure virtual

Abstract method to get the list of setup tags.

Implemented in CbmGeoSetupDbProvider, and CbmGeoSetupRepoProvider.

◆ LoadSetup()

virtual void CbmGeoSetupProvider::LoadSetup ( std::string setupTag,
std::string revision = "" )
pure virtual

Abstract method to load the setup with a tag and revision version.

Implemented in CbmGeoSetupDbProvider, and CbmGeoSetupRepoProvider.

Referenced by CbmSetup::LoadSetup().

◆ RegisterSetup()

void CbmGeoSetupProvider::RegisterSetup ( )

Registers the previously loaded setup with FairRoot. Replaces the registerSetup.C macro.

Definition at line 75 of file CbmGeoSetupProvider.cxx.

References counter, fSetup, CbmGeoSetupMedia::GetFilePath(), CbmGeoSetup::GetMedia(), CbmGeoSetup::GetModuleMap(), CbmGeoSetup::GetName(), kBmon, kCave, kFsd, kHodo, kMagnet, kMuch, kMvd, kNofSystems, kPipe, kPlatform, kPsd, kRich, kSts, kTarget, kTof, and kTrd.

Referenced by CbmSetup::RegisterSetup().

◆ RemoveModule()

void CbmGeoSetupProvider::RemoveModule ( ECbmModuleId moduleId)

Removes the module from setup.

Definition at line 63 of file CbmGeoSetupProvider.cxx.

References fSetup, and CbmGeoSetup::GetModuleMap().

Referenced by CbmSetup::RemoveModule().

◆ Reset()

void CbmGeoSetupProvider::Reset ( )

Resets the setup to default (empty)

Definition at line 157 of file CbmGeoSetupProvider.cxx.

References fSetup.

Referenced by CbmSetup::Clear().

◆ SetFieldTag()

void CbmGeoSetupProvider::SetFieldTag ( std::string tag)

Loads the field with a tag and adds it to the setup.

Parameters
tagfield tag to load

Definition at line 65 of file CbmGeoSetupProvider.cxx.

References fSetup, CbmGeoSetup::GetField(), GetFieldByTag(), CbmGeoSetupField::GetMatrix(), CbmGeoSetupField::GetScale(), CbmGeoSetup::SetField(), CbmGeoSetupField::SetMatrix(), and CbmGeoSetupField::SetScale().

◆ SetModuleTag()

void CbmGeoSetupProvider::SetModuleTag ( ECbmModuleId moduleId,
std::string tag,
Bool_t active )

Loads the detector with a tag into setup, will invoke GetModuleByTag.

Parameters
moduleIdECbmModuleId @patam tag module tag to load
activeindicates if the module will be treated as active in Monte-Carlo, exact treatment depends on actual implementation of a FairModule
Note
This method has a side effect for backward compatibility -when loading the magnet module, the field with the same tag will be auto-loaded.

Definition at line 56 of file CbmGeoSetupProvider.cxx.

References fSetup, GetModuleByTag(), and CbmGeoSetup::GetModuleMap().

Referenced by CbmSetup::SetModule().

Member Data Documentation

◆ fSetup


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