CbmRoot
CbmGeoSetupDbProvider Class Reference

Setup provider with database functionality. More...

#include <CbmGeoSetupDbProvider.h>

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

Public Member Functions

virtual std::vector< std::string > GetSetupTags ()
 Abstract method to get the list of setup tags. More...
 
virtual std::vector< std::string > GetFieldTags ()
 Abstract method to get the list of field tags. More...
 
virtual std::vector< std::string > GetMediaTags ()
 Abstract method to get the list of media tags. More...
 
virtual CbmGeoSetup GetSetupByTag (std::string setupTag, std::string revision)
 Abstract method for constructing the setup by id and tag. More...
 
virtual CbmGeoSetupModule GetModuleByTag (ECbmModuleId moduleId, std::string tag)
 Abstract method for constructing the module by id and tag. More...
 
virtual CbmGeoSetupField GetFieldByTag (std::string tag)
 Abstract method for constructing the field by tag. More...
 
virtual CbmGeoSetupMedia GetMediaByTag (std::string tag)
 Abstract method for constructing the media by tag. More...
 
virtual void LoadSetup (std::string setupTag, std::string revision="")
 Abstract method to load the setup with a tag and revision version. 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...
 
CbmGeoSetupGetSetup ()
 Direct access to underlying geometry setup representation. Allows for fine-tuning of parameters, for exmaple, transformation matrices. 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 (CbmGeoSetupDbProvider, 1)
 

Detailed Description

Setup provider with database functionality.

This class implements the CbmGeoSetupProvider interface to fetch available setups, fields and media definitions from DB. Database functionality is described in http://lt-jds.jinr.ru/record/72420 This class works with a local SQLite replica of the real geometry database hosted elsewhere. See CMakeLists.txt for replica loading configuration.

Definition at line 21 of file CbmGeoSetupDbProvider.h.

Member Function Documentation

◆ ClassDef()

CbmGeoSetupDbProvider::ClassDef ( CbmGeoSetupDbProvider  ,
 
)
private

◆ GetDefaultCaveModule()

CbmGeoSetupModule CbmGeoSetupProvider::GetDefaultCaveModule ( )
protectedinherited

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 LoadSetup().

◆ GetFieldByTag()

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

◆ GetFieldTags()

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

Abstract method to get the list of field tags.

Implements CbmGeoSetupProvider.

Definition at line 121 of file CbmGeoSetupDbProvider.cxx.

◆ GetMediaByTag()

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

◆ GetMediaTags()

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

Abstract method to get the list of media tags.

Implements CbmGeoSetupProvider.

Definition at line 125 of file CbmGeoSetupDbProvider.cxx.

◆ GetModuleByTag()

◆ GetSetup()

CbmGeoSetup& CbmGeoSetupProvider::GetSetup ( )
inlineinherited

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 CbmGeoSetupProvider::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().

◆ GetSetupByTag()

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

Abstract method for constructing the setup by id and tag.

Implements CbmGeoSetupProvider.

Definition at line 130 of file CbmGeoSetupDbProvider.cxx.

References pos, and CbmGeoSetup::SetId().

Referenced by LoadSetup().

◆ GetSetupTags()

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

Abstract method to get the list of setup tags.

Implements CbmGeoSetupProvider.

Definition at line 101 of file CbmGeoSetupDbProvider.cxx.

◆ LoadSetup()

◆ RegisterSetup()

void CbmGeoSetupProvider::RegisterSetup ( )
inherited

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

Definition at line 78 of file CbmGeoSetupProvider.cxx.

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

◆ RemoveModule()

void CbmGeoSetupProvider::RemoveModule ( ECbmModuleId  moduleId)
inherited

Removes the module from setup.

Definition at line 65 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 173 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 57 of file CbmGeoSetupProvider.cxx.

References CbmGeoSetupProvider::fSetup, CbmGeoSetupProvider::GetModuleByTag(), CbmGeoSetup::GetModuleMap(), and CbmGeoSetupModule::SetActive().

Referenced by CbmSetup::SetModule().

Member Data Documentation

◆ fSetup


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