CbmRoot
Loading...
Searching...
No Matches
CbmGeoSetupRepoProvider Class Reference

Setup provider with local (svn) repository functionality. More...

#include <CbmGeoSetupRepoProvider.h>

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

Public Member Functions

virtual std::vector< std::string > GetSetupTags ()
 Abstract method to get the list of setup tags.
 
virtual std::vector< std::string > GetFieldTags ()
 Abstract method to get the list of field tags.
 
virtual std::vector< std::string > GetMediaTags ()
 Abstract method to get the list of media tags.
 
virtual CbmGeoSetup GetSetupByTag (std::string setupTag, std::string revision)
 
virtual CbmGeoSetupModule GetModuleByTag (ECbmModuleId moduleId, std::string tag)
 Abstract method for constructing the module by id and tag.
 
virtual CbmGeoSetupField GetFieldByTag (std::string tag)
 Abstract method for constructing the field by tag.
 
virtual CbmGeoSetupMedia GetMediaByTag (std::string tag)
 Abstract method for constructing the media by tag.
 
virtual void LoadSetup (std::string setupTag, std::string revision="")
 
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.
 

Protected Member Functions

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

Protected Attributes

CbmGeoSetup fSetup {}
 

Private Member Functions

 ClassDef (CbmGeoSetupRepoProvider, 1)
 

Detailed Description

Setup provider with local (svn) repository functionality.

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 25 of file CbmGeoSetupRepoProvider.h.

Member Function Documentation

◆ ClassDef()

CbmGeoSetupRepoProvider::ClassDef ( CbmGeoSetupRepoProvider ,
1  )
private

◆ GetDefaultCaveModule()

CbmGeoSetupModule CbmGeoSetupProvider::GetDefaultCaveModule ( )
protectedinherited

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

Definition at line 159 of file CbmGeoSetupProvider.cxx.

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

◆ GetFieldByTag()

CbmGeoSetupField CbmGeoSetupRepoProvider::GetFieldByTag ( std::string tag)
virtual

Abstract method for constructing the field by tag.

Implements CbmGeoSetupProvider.

Definition at line 266 of file CbmGeoSetupRepoProvider.cxx.

References CbmGeoSetupProvider::fSetup, CbmGeoSetup::GetField(), CbmGeoSetupField::SetFilePath(), and CbmGeoSetupField::SetTag().

Referenced by GetSetupByTag().

◆ GetFieldTags()

std::vector< std::string > CbmGeoSetupRepoProvider::GetFieldTags ( )
virtual

Abstract method to get the list of field tags.

Implements CbmGeoSetupProvider.

Definition at line 104 of file CbmGeoSetupRepoProvider.cxx.

◆ GetMediaByTag()

CbmGeoSetupMedia CbmGeoSetupRepoProvider::GetMediaByTag ( std::string tag)
virtual

Abstract method for constructing the media by tag.

Implements CbmGeoSetupProvider.

Definition at line 288 of file CbmGeoSetupRepoProvider.cxx.

References CbmGeoSetupProvider::fSetup, CbmGeoSetup::GetMedia(), CbmGeoSetupMedia::SetFilePath(), and CbmGeoSetupMedia::SetTag().

Referenced by GetSetupByTag().

◆ GetMediaTags()

std::vector< std::string > CbmGeoSetupRepoProvider::GetMediaTags ( )
virtual

Abstract method to get the list of media tags.

Implements CbmGeoSetupProvider.

Definition at line 111 of file CbmGeoSetupRepoProvider.cxx.

◆ GetModuleByTag()

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

Abstract method for constructing the module by id and tag.

Implements CbmGeoSetupProvider.

Definition at line 219 of file CbmGeoSetupRepoProvider.cxx.

Referenced by GetSetupByTag().

◆ GetSetup()

CbmGeoSetup & CbmGeoSetupProvider::GetSetup ( )
inlineinherited

◆ GetSetupByTag()

CbmGeoSetup CbmGeoSetupRepoProvider::GetSetupByTag ( std::string setupTag,
std::string revision )
virtual

Gets setup from local repository by tag. A file like setup_sis100_electron.C will be parsed for its content with regular expressions and information about modules, media and field will be extracted. revision is ignored

Implements CbmGeoSetupProvider.

Definition at line 122 of file CbmGeoSetupRepoProvider.cxx.

References CbmGeoSetupProvider::fSetup, CbmGeoSetupProvider::GetDefaultCaveModule(), GetFieldByTag(), CbmGeoSetupField::GetMatrix(), GetMediaByTag(), GetModuleByTag(), CbmGeoSetup::GetModuleMap(), CbmGeoSetup::GetTag(), kCave, CbmGeoSetup::SetField(), CbmGeoSetup::SetMedia(), CbmGeoSetup::SetModuleMap(), CbmGeoSetup::SetName(), CbmGeoSetupField::SetScale(), and CbmGeoSetup::SetTag().

Referenced by LoadSetup().

◆ GetSetupTags()

std::vector< std::string > CbmGeoSetupRepoProvider::GetSetupTags ( )
virtual

Abstract method to get the list of setup tags.

Implements CbmGeoSetupProvider.

Definition at line 97 of file CbmGeoSetupRepoProvider.cxx.

◆ LoadSetup()

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

Loads setup from local repository by tag. See GetSetupByTag for actual implementation. revision is ignored

Implements CbmGeoSetupProvider.

Definition at line 320 of file CbmGeoSetupRepoProvider.cxx.

References CbmGeoSetupProvider::fSetup, and GetSetupByTag().

◆ RegisterSetup()

void CbmGeoSetupProvider::RegisterSetup ( )
inherited

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

Definition at line 75 of file CbmGeoSetupProvider.cxx.

References counter, CbmGeoSetupProvider::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)
inherited

Removes the module from setup.

Definition at line 63 of file CbmGeoSetupProvider.cxx.

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

Referenced by CbmSetup::RemoveModule().

◆ Reset()

void CbmGeoSetupProvider::Reset ( )
inherited

Resets the setup to default (empty)

Definition at line 157 of file CbmGeoSetupProvider.cxx.

References CbmGeoSetupProvider::fSetup.

Referenced by CbmSetup::Clear().

◆ SetFieldTag()

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

◆ SetModuleTag()

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

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 CbmGeoSetupProvider::fSetup, CbmGeoSetupProvider::GetModuleByTag(), and CbmGeoSetup::GetModuleMap().

Referenced by CbmSetup::SetModule().

Member Data Documentation

◆ fSetup


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