BmnRoot 26.10.0-233-gb9bbe585
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
GeoSetup Class Reference

GeoSetup class. More...

#include <GeoSetup.h>

Collaboration diagram for GeoSetup:

Public Member Functions

 GeoSetup ()
 ~GeoSetup ()
 Destructor method.
int LoadSetupToGeoManager (string_view setup_tag)
 Load selected geometry setup from the Local Geometry Database and create gGeoManager instance.
int LoadSetupToFairRunSim (string_view setupTag, const char *localSettings=nullptr)
 Load selected geometry setup from the Local or Central (defined by url) Geometry Database and add it to the FairRunSim instance.
FairField * GetMagneticField ()
 Get magnetic field of the current setup geometry.
double GetRefVoltage ()
 Get reference voltage of the magnetic field of the current setup geometry, i.e.
string GetParameterFile (string_view detector_name)
 Get path to parameter file for the given detector name of the current setup.
string GetMaterialFile ()
 Get the material file of the current setup, which defines the media of the setup geometry.
string GetLastApprovedSetupTag (string_view tag_prefix)
 Get tag for the last approved setup corresponding to the pattern.
string_view GetSetupTag ()
 Get tag for the loaded setup.

Static Public Member Functions

static int ParseGeometryTag (TString &geometry_tag, TString &local_settings)
 Parse the geometry tag, which can contain the path to an XML file with a local customization of the setup (see examples/README.md) after the ';' separator, e.g.

Private Member Functions

unsigned long int GetServerRevision (const char *url=GEO_SERVER_HOST)
std::pair< int, string > GetTagName4PatternServer (string_view pattern_tag, const char *url=GEO_SERVER_HOST)
std::pair< int, uint64_t > CheckTagOnServer (string_view setup_tag, const char *url=GEO_SERVER_HOST)
unsigned long int GetLocalRevision (TString &localDbPath)
std::pair< int, string > GetTagName4PatternLocal (string_view pattern_tag, TString &localDbPath)
int installLocalDB (string_view setup_tag, const char *url=GEO_SERVER_HOST)
void CloseDB ()
bool AddModuleToFairRunSim (module_r_ptr module, FairRunSim *fRun)
bool OpenLocalGeoDatabase ()
bool IsEqlMatrix (const char *fileName, TSQLRow *row)
TGeoNode * ConstructRootGeometry (const char *fileName)
TString PrepareWritableDbDir ()
string GetRootPath ()
string GetLocalDbPath ()
string ExpandGeomPath ()
TString & GetTmpPath ()
TString GetTmpFileName (const char *baseName)
TGeoVolume * GetRootVolume (TFile *f)
TString GetModuleName (int dbModuleUndex)
int GetModuleIndex (TString &name)
int GetModuleId (int dbModuleRev)
TString GetModuleType (int dbModuleRev)
module_r_ptr GetModuleRevision (int dbModuleRev)
bool LoadLocalSettings (const char *fileName)
bool ParseEditSetupModule (TXMLEngine &xml, XMLNodePointer_t node)
bool ParseAddSetupModule (TXMLEngine &xml, XMLNodePointer_t node)
bool ParseEditFieldMap (TXMLEngine &xml, XMLNodePointer_t node)
void ClearLocalSettings ()
setup_module_ptr FindModuleEdit (TString setup_module_tag, TString module_name, int dbModuleRev)
bool FindModuleGeometryFile (TString &file_path)
TString ExportModuleGeometry (const TString &file_path, const TString &module_name, const TGeoMatrix *placement, double xMove, double yMove, double zMove)
FairModule * CreateModule (const TString &class_name, const TString &module_name, bool isActive)
int LoadModuleToFairRunSim (int idsm, FairRunSim *fRun)
bool AddModuleToFairRunSim (int dbModuleRev, const char *path, FairRunSim *fRun)
int PutModules ()
int PutModuleRevisions ()

Static Private Member Functions

static bool exists_file (const char *name)
static bool IsWritableDir (const char *path)

Private Attributes

map< int, TString > m_modules_table
map< int, bool > m_modules_active
map< int, module_r_ptr > m_modules_revision_table
map< int, TString > m_loadedModule
map< TString, setup_module_ptr > m_moduleEdit
map< TString, setup_module_ptr > m_moduleEditByName
setup_module_ptr m_moduleEditAll = nullptr
vector< module_r_ptr > m_moduleAdd
TString m_ExternalField = ""
TSQLServer * m_db
FairField * m_field
double m_refVoltage = -1
int m_fid
int m_sid
TString m_tmpFolder
string m_setupTag = ""
string m_materialFile = ""

Detailed Description

It is used for loading necessary setup geometries from the Geometry Database.

Definition at line 46 of file GeoSetup.h.

Constructor & Destructor Documentation

◆ GeoSetup()

GeoSetup::GeoSetup ( )
inline

Definition at line 50 of file GeoSetup.h.

References m_db, m_fid, m_field, m_sid, and m_tmpFolder.

◆ ~GeoSetup()

GeoSetup::~GeoSetup ( )

Definition at line 531 of file GeoSetup.cxx.

References ClearLocalSettings(), and CloseDB().

Here is the call graph for this function:

Member Function Documentation

◆ AddModuleToFairRunSim() [1/2]

bool GeoSetup::AddModuleToFairRunSim ( int dbModuleRev,
const char * path,
FairRunSim * fRun )
private

Definition at line 1746 of file GeoSetup.cxx.

References MODULEREVISION::active, MODULEREVISION::class_name, CreateModule(), GetModuleRevision(), GetModuleType(), TString::Length(), and MODULEREVISION::object_name.

Here is the call graph for this function:

◆ AddModuleToFairRunSim() [2/2]

bool GeoSetup::AddModuleToFairRunSim ( module_r_ptr module,
FairRunSim * fRun )
private

Definition at line 1778 of file GeoSetup.cxx.

References MODULEREVISION::active, MODULEREVISION::class_name, CreateModule(), ExportModuleGeometry(), MODULEREVISION::file_path, TClass::GetClass(), TClass::InheritsFrom(), TString::IsNull(), MODULEREVISION::object_name, MODULEREVISION::xMove, MODULEREVISION::yMove, and MODULEREVISION::zMove.

Referenced by LoadModuleToFairRunSim(), and LoadSetupToFairRunSim().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckTagOnServer()

std::pair< int, uint64_t > GeoSetup::CheckTagOnServer ( string_view setup_tag,
const char * url = GEO_SERVER_HOST )
private

Definition at line 251 of file GeoSetup.cxx.

References TString::Data(), f, FieldToInt(), FieldToUInt64(), TString::Format(), GetTmpFileName(), ichar_equals(), and kWgetOptions.

Referenced by LoadSetupToFairRunSim(), and LoadSetupToGeoManager().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ClearLocalSettings()

void GeoSetup::ClearLocalSettings ( )
private

Definition at line 1452 of file GeoSetup.cxx.

References m_ExternalField, m_moduleAdd, m_moduleEdit, m_moduleEditAll, and m_moduleEditByName.

Referenced by ~GeoSetup(), LoadSetupToFairRunSim(), and LoadSetupToGeoManager().

Here is the caller graph for this function:

◆ CloseDB()

void GeoSetup::CloseDB ( )
private

Definition at line 516 of file GeoSetup.cxx.

References m_db, m_modules_active, m_modules_revision_table, and m_modules_table.

Referenced by ~GeoSetup(), installLocalDB(), and OpenLocalGeoDatabase().

Here is the caller graph for this function:

◆ ConstructRootGeometry()

TGeoNode * GeoSetup::ConstructRootGeometry ( const char * fileName)
private

Definition at line 1821 of file GeoSetup.cxx.

References f, TGeoVolume::GetNode(), and GetRootVolume().

Referenced by IsEqlMatrix().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateModule()

FairModule * GeoSetup::CreateModule ( const TString & class_name,
const TString & module_name,
bool isActive )
private

Definition at line 1599 of file GeoSetup.cxx.

References TString::Data(), TString::Format(), TClass::GetClass(), TClass::GetMethodWithPrototype(), TNamed::GetName(), TClass::InheritsFrom(), IsSafeTag(), TString::Last(), and TString::Remove().

Referenced by AddModuleToFairRunSim(), and AddModuleToFairRunSim().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ exists_file()

bool GeoSetup::exists_file ( const char * name)
staticprivate

Definition at line 34 of file GeoSetup.cxx.

Referenced by GetLocalRevision(), GetTagName4PatternLocal(), installLocalDB(), OpenLocalGeoDatabase(), and PrepareWritableDbDir().

Here is the caller graph for this function:

◆ ExpandGeomPath()

string GeoSetup::ExpandGeomPath ( )
private

Definition at line 1189 of file GeoSetup.cxx.

References TString::Chop(), TString::Data(), TString::EndsWith(), and TString::Length().

Referenced by GetLocalDbPath(), and GetRootPath().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ExportModuleGeometry()

TString GeoSetup::ExportModuleGeometry ( const TString & file_path,
const TString & module_name,
const TGeoMatrix * placement,
double xMove,
double yMove,
double zMove )
private

Definition at line 1540 of file GeoSetup.cxx.

References TString::Data(), TString::EndsWith(), TGeoVolume::Export(), f, TString::Format(), TGeoNodeMatrix::GetMatrix(), TGeoVolume::GetNode(), GetRootVolume(), GetTmpFileName(), TGeoHMatrix::GetTranslation(), gTmpGeometryFiles, gTmpGeometryPid, RemoveTmpGeometryFiles(), TGeoHMatrix::SetDx(), TGeoHMatrix::SetDy(), TGeoHMatrix::SetDz(), and TGeoNodeMatrix::SetMatrix().

Referenced by AddModuleToFairRunSim(), and LoadModuleToFairRunSim().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FindModuleEdit()

setup_module_ptr GeoSetup::FindModuleEdit ( TString setup_module_tag,
TString module_name,
int dbModuleRev )
private

Definition at line 1641 of file GeoSetup.cxx.

References GetModuleId(), m_moduleEdit, m_moduleEditAll, m_moduleEditByName, m_modules_active, and TString::ToUpper().

Referenced by LoadModuleToFairRunSim().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FindModuleGeometryFile()

bool GeoSetup::FindModuleGeometryFile ( TString & file_path)
private

Definition at line 1469 of file GeoSetup.cxx.

References TGeoManager::Class(), TGeoVolume::Class(), TString::EndsWith(), f, FileStat_t::fMode, TClass::GetClass(), GetRootPath(), TClass::InheritsFrom(), TString::IsNull(), and TFile::Open().

Referenced by ParseAddSetupModule(), and ParseEditSetupModule().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetLastApprovedSetupTag()

string GeoSetup::GetLastApprovedSetupTag ( string_view tag_prefix)
Parameters
tag_prefixThe prefix string to match against approved setup tags.
Returns
Tag of last approved setup corresponding to the prefix string. "" if no approved setup is found.

Definition at line 196 of file GeoSetup.cxx.

References GetLocalDbPath(), GetTagName4PatternLocal(), and GetTagName4PatternServer().

Referenced by BmnTrackingQaOffline::BmnTrackingQaOffline(), BmnLambdaEmbeddingQa::DoDrawEventsWithEmbeddedSignals(), eventdisplay(), BmnGlobalAlignment::Init(), BmnQaOffline::Init(), BmnTwoParticleDecay::Init(), LoadGeometry(), LoadGeoSetup(), PairCreation(), rc_rlerr(), run8_reco_bmn(), run_reco_aln(), run_reco_bmn(), run_reco_bmn(), run_reco_bmn(), run_reco_bmn(), run_reco_noa(), run_reco_src(), run_reco_TOF1(), run_sim_bmn(), and bmn::online::ReconstructionProcessor::SetupExperimentalRun().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetLocalDbPath()

string GeoSetup::GetLocalDbPath ( )
private

Definition at line 1222 of file GeoSetup.cxx.

References ExpandGeomPath().

Referenced by GetLastApprovedSetupTag(), installLocalDB(), LoadSetupToGeoManager(), and OpenLocalGeoDatabase().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetLocalRevision()

unsigned long int GeoSetup::GetLocalRevision ( TString & localDbPath)
private

Definition at line 324 of file GeoSetup.cxx.

References exists_file(), TSQLRow::GetField(), TSQLServer::IsConnected(), TSQLResult::Next(), and TSQLiteServer::Query().

Here is the call graph for this function:

◆ GetMagneticField()

FairField * GeoSetup::GetMagneticField ( )

The field map is returned as it was measured, i.e. with the unit scale corresponding to the reference voltage (see GetRefVoltage). The scale of the run ('field voltage of the run / reference voltage') is set by the caller before the field is initialized (in BmnRoot by BmnFunctionSet::SetFieldScale for any type of the field), the zero scale gives the zero field (the magnet is off, e.g. for the calibration runs).

Returns
Instance of the magnetic field class inherited from FairField. nullptr if the setup has no field.

Definition at line 1019 of file GeoSetup.cxx.

References FieldToDouble(), TSQLRow::GetField(), BmnFieldMap::GetFileName(), TString::IsNull(), m_db, m_ExternalField, m_fid, m_field, m_refVoltage, TSQLResult::Next(), and BmnFieldMap::SetFileName().

Referenced by dump_hits(), rc_rlerr(), run_reco_aln(), run_reco_bmn(), run_reco_bmn(), run_reco_bmn(), run_reco_noa(), and run_sim_bmn().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetMaterialFile()

string GeoSetup::GetMaterialFile ( )
Returns
Name of the material file in the Geometry Database. "" if the setup is not loaded or has no materials.

Definition at line 1146 of file GeoSetup.cxx.

References TSQLRow::GetField(), m_db, m_materialFile, m_sid, and TSQLResult::Next().

Here is the call graph for this function:

◆ GetModuleId()

int GeoSetup::GetModuleId ( int dbModuleRev)
private

Definition at line 1699 of file GeoSetup.cxx.

References m_modules_revision_table.

Referenced by FindModuleEdit(), and GetModuleType().

Here is the caller graph for this function:

◆ GetModuleIndex()

int GeoSetup::GetModuleIndex ( TString & name)
private

Definition at line 1677 of file GeoSetup.cxx.

References m_modules_table.

Referenced by GetParameterFile().

Here is the caller graph for this function:

◆ GetModuleName()

TString GeoSetup::GetModuleName ( int dbModuleUndex)
private

Definition at line 1665 of file GeoSetup.cxx.

References m_modules_table.

Referenced by GetModuleType().

Here is the caller graph for this function:

◆ GetModuleRevision()

module_r_ptr GeoSetup::GetModuleRevision ( int dbModuleRev)
private

Definition at line 1688 of file GeoSetup.cxx.

References m_modules_revision_table.

Referenced by AddModuleToFairRunSim().

Here is the caller graph for this function:

◆ GetModuleType()

TString GeoSetup::GetModuleType ( int dbModuleRev)
private

Definition at line 1709 of file GeoSetup.cxx.

References GetModuleId(), and GetModuleName().

Referenced by AddModuleToFairRunSim(), and LoadModuleToFairRunSim().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetParameterFile()

string GeoSetup::GetParameterFile ( string_view detector_name)
Parameters
detector_namethe name of the detector (the module name in the Geometry Database, e.g. GEM), for which the parameter file is needed.
Returns
Path to the parameter file in the storage of the Local Geometry Database. "" if file did not set.

Definition at line 1087 of file GeoSetup.cxx.

References TSQLRow::GetField(), GetModuleIndex(), GetRootPath(), m_db, m_sid, and TSQLResult::Next().

Here is the call graph for this function:

◆ GetRefVoltage()

double GeoSetup::GetRefVoltage ( )
inline

the voltage, at which the field map was measured. It is read from the Geometry Database together with the field map, so GetMagneticField has to be called before.

Returns
Reference voltage (mV). -1 if the field is not loaded, 0 if the Geometry Database does not provide the value (old versions of the database).

Definition at line 111 of file GeoSetup.h.

References m_refVoltage.

Referenced by dump_hits(), rc_rlerr(), run_reco_aln(), run_reco_bmn(), run_reco_bmn(), run_reco_bmn(), run_reco_noa(), and run_sim_bmn().

Here is the caller graph for this function:

◆ GetRootPath()

string GeoSetup::GetRootPath ( )
private

Definition at line 1210 of file GeoSetup.cxx.

References ExpandGeomPath().

Referenced by FindModuleGeometryFile(), GetParameterFile(), installLocalDB(), LoadModuleToFairRunSim(), and LoadSetupToGeoManager().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetRootVolume()

TGeoVolume * GeoSetup::GetRootVolume ( TFile * f)
private

Definition at line 1715 of file GeoSetup.cxx.

References TList::At(), TGeoManager::cd(), f, TKey::GetClassName(), TGeoNode::GetDaughter(), TGeoNode::GetNdaughters(), TGeoManager::GetNode(), TGeoNode::GetVolume(), and TKey::ReadObj().

Referenced by ConstructRootGeometry(), and ExportModuleGeometry().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetServerRevision()

unsigned long int GeoSetup::GetServerRevision ( const char * url = GEO_SERVER_HOST)
private

Definition at line 176 of file GeoSetup.cxx.

References TString::Data(), TString::Format(), and GetTmpFileName().

Here is the call graph for this function:

◆ GetSetupTag()

string_view GeoSetup::GetSetupTag ( )
inline
Returns
The Tag of loaded setup.

Definition at line 137 of file GeoSetup.h.

References m_setupTag.

◆ GetTagName4PatternLocal()

std::pair< int, string > GeoSetup::GetTagName4PatternLocal ( string_view pattern_tag,
TString & localDbPath )
private

Definition at line 298 of file GeoSetup.cxx.

References exists_file(), TSQLRow::GetField(), TSQLServer::IsConnected(), TSQLResult::Next(), TSQLiteServer::Query(), and SqlEscape().

Referenced by GetLastApprovedSetupTag().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetTagName4PatternServer()

std::pair< int, string > GeoSetup::GetTagName4PatternServer ( string_view pattern_tag,
const char * url = GEO_SERVER_HOST )
private

Definition at line 210 of file GeoSetup.cxx.

References TString::Data(), f, TString::Format(), GetTmpFileName(), IsSafeTag(), and kWgetOptions.

Referenced by GetLastApprovedSetupTag().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetTmpFileName()

TString GeoSetup::GetTmpFileName ( const char * baseName)
private

Definition at line 171 of file GeoSetup.cxx.

References TString::Format(), and GetTmpPath().

Referenced by CheckTagOnServer(), ExportModuleGeometry(), GetServerRevision(), GetTagName4PatternServer(), and installLocalDB().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetTmpPath()

TString & GeoSetup::GetTmpPath ( )
private

Definition at line 1232 of file GeoSetup.cxx.

References TString::Data(), UserGroup_t::fUser, and m_tmpFolder.

Referenced by GetTmpFileName(), and PrepareWritableDbDir().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ installLocalDB()

int GeoSetup::installLocalDB ( string_view setup_tag,
const char * url = GEO_SERVER_HOST )
private

Definition at line 407 of file GeoSetup.cxx.

References CloseDB(), TString::Data(), exists_file(), TString::Format(), FileStat_t::fSize, GetLocalDbPath(), GetRootPath(), GetTmpFileName(), gWritableDbDir, gWritableDbPid, IsSafeTag(), IsWritableDir(), kWgetOptions, TString::Length(), OpenLocalGeoDatabase(), PrepareWritableDbDir(), and RemoveWritableDbDir().

Referenced by LoadSetupToFairRunSim(), and LoadSetupToGeoManager().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsEqlMatrix()

bool GeoSetup::IsEqlMatrix ( const char * fileName,
TSQLRow * row )
private

Definition at line 1838 of file GeoSetup.cxx.

References ConstructRootGeometry(), FieldToDouble(), TSQLRow::GetField(), TGeoNode::GetMatrix(), TGeoMatrix::GetRotationMatrix(), TGeoMatrix::GetTranslation(), and i.

Referenced by LoadModuleToFairRunSim().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsWritableDir()

bool GeoSetup::IsWritableDir ( const char * path)
staticprivate

Definition at line 352 of file GeoSetup.cxx.

Referenced by installLocalDB(), and PrepareWritableDbDir().

Here is the caller graph for this function:

◆ LoadLocalSettings()

bool GeoSetup::LoadLocalSettings ( const char * fileName)
private

Definition at line 1247 of file GeoSetup.cxx.

References TXMLEngine::DocGetRootElement(), TXMLEngine::FreeDoc(), TXMLEngine::GetChild(), TXMLEngine::GetNext(), TXMLEngine::GetNodeName(), ParseAddSetupModule(), ParseEditFieldMap(), ParseEditSetupModule(), and TXMLEngine::ParseFile().

Referenced by LoadSetupToFairRunSim().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadModuleToFairRunSim()

int GeoSetup::LoadModuleToFairRunSim ( int idsm,
FairRunSim * fRun )
private

Definition at line 1872 of file GeoSetup.cxx.

References AddModuleToFairRunSim(), SETUPMODULE::enable, TString::EndsWith(), ExportModuleGeometry(), FieldToDouble(), FieldToInt(), SETUPMODULE::file_path, FindModuleEdit(), TSQLRow::GetField(), GetModuleType(), GetRootPath(), i, IsEqlMatrix(), TString::Length(), LoadModuleToFairRunSim(), m_db, m_loadedModule, TSQLResult::Next(), rotation, TGeoHMatrix::SetRotation(), TGeoHMatrix::SetTranslation(), TString::ToUpper(), SETUPMODULE::xMove, SETUPMODULE::yMove, and SETUPMODULE::zMove.

Referenced by LoadModuleToFairRunSim(), and LoadSetupToFairRunSim().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadSetupToFairRunSim()

int GeoSetup::LoadSetupToFairRunSim ( string_view setupTag,
const char * localSettings = nullptr )

Use for Simulation

Parameters
setupTagthe name of the setup tag.
localSettingspath to local setting file that can disable or move some detector in selected geometry (see examples/README.md). The setup is not loaded, if the local settings are wrong.
Returns
0, if the setup is loaded. Error code, if the setup is not loaded: -2 - the setup is not found, -3 - the setup is damaged (no modules, no geometry file or a module cannot be created), -4 - the local settings cannot be applied.

Definition at line 793 of file GeoSetup.cxx.

References AddModuleToFairRunSim(), CheckTagOnServer(), ClearLocalSettings(), TString::Data(), FieldToInt(), FieldToUInt64(), GEO_SERVER_HOST, TSQLRow::GetField(), installLocalDB(), LoadLocalSettings(), LoadModuleToFairRunSim(), m_db, m_fid, m_field, m_loadedModule, m_materialFile, m_moduleAdd, m_refVoltage, m_setupTag, m_sid, TSQLResult::Next(), OpenLocalGeoDatabase(), and SqlEscape().

Referenced by run_sim_bmn().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadSetupToGeoManager()

int GeoSetup::LoadSetupToGeoManager ( string_view setup_tag)

Use for Reconstruction and Analysis

Parameters
setup_tagthe name of the setup tag.
Returns
0, if the setup is loaded. Error code, if the setup is not loaded.

Definition at line 592 of file GeoSetup.cxx.

References TString::BeginsWith(), CheckTagOnServer(), ClearLocalSettings(), FieldToInt(), FieldToUInt64(), GEO_SERVER_HOST, TKey::GetClassName(), TSQLRow::GetField(), TDirectoryFile::GetListOfKeys(), GetLocalDbPath(), GetRootPath(), installLocalDB(), TString::IsNull(), TFile::IsOpen(), TObject::IsZombie(), TString::kBoth, m_db, m_fid, m_field, m_materialFile, m_refVoltage, m_setupTag, m_sid, TSQLResult::Next(), OpenLocalGeoDatabase(), TKey::ReadObj(), RemoveAssemblyShapes(), SqlEscape(), and TString::Strip().

Referenced by BmnTrackingQaOffline::BmnTrackingQaOffline(), BmnLambdaEmbeddingQa::DoDrawEventsWithEmbeddedSignals(), dump_hits(), eventdisplay(), BmnGlobalAlignment::Init(), BmnQaOffline::Init(), BmnTwoParticleDecay::Init(), LoadGeometry(), LoadGeoSetup(), PairCreation(), rc_rlerr(), run8_reco_bmn(), run_reco_aln(), run_reco_bmn(), run_reco_bmn(), run_reco_bmn(), run_reco_bmn(), run_reco_bmn(), run_reco_noa(), run_reco_src(), run_reco_TOF1(), and bmn::online::ReconstructionProcessor::SetupExperimentalRun().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OpenLocalGeoDatabase()

bool GeoSetup::OpenLocalGeoDatabase ( )
private

Definition at line 538 of file GeoSetup.cxx.

References CloseDB(), exists_file(), GetLocalDbPath(), m_db, PutModuleRevisions(), and PutModules().

Referenced by installLocalDB(), LoadSetupToFairRunSim(), and LoadSetupToGeoManager().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ParseAddSetupModule()

bool GeoSetup::ParseAddSetupModule ( TXMLEngine & xml,
XMLNodePointer_t node )
private

Definition at line 1357 of file GeoSetup.cxx.

References MODULEREVISION::active, AttrToBool(), AttrToDouble(), MODULEREVISION::class_name, TString::Data(), MODULEREVISION::file_path, FindModuleGeometryFile(), TXMLEngine::GetAttrName(), TXMLEngine::GetAttrValue(), TClass::GetClass(), TXMLEngine::GetFirstAttr(), TXMLEngine::GetNextAttr(), TClass::InheritsFrom(), TString::IsNull(), IsSafeTag(), m_moduleAdd, MODULEREVISION::object_name, MODULEREVISION::xMove, MODULEREVISION::yMove, and MODULEREVISION::zMove.

Referenced by LoadLocalSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ParseEditFieldMap()

bool GeoSetup::ParseEditFieldMap ( TXMLEngine & xml,
XMLNodePointer_t node )
private

Definition at line 1416 of file GeoSetup.cxx.

References TXMLEngine::GetAttrName(), TXMLEngine::GetAttrValue(), TXMLEngine::GetFirstAttr(), BmnFieldMap::GetMapFilePath(), TXMLEngine::GetNextAttr(), TString::IsNull(), and m_ExternalField.

Referenced by LoadLocalSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ParseEditSetupModule()

bool GeoSetup::ParseEditSetupModule ( TXMLEngine & xml,
XMLNodePointer_t node )
private

Definition at line 1286 of file GeoSetup.cxx.

References AttrToBool(), AttrToDouble(), SETUPMODULE::enable, SETUPMODULE::file_path, FindModuleGeometryFile(), TXMLEngine::GetAttrName(), TXMLEngine::GetAttrValue(), TXMLEngine::GetFirstAttr(), TXMLEngine::GetNextAttr(), TString::IsNull(), TString::kBoth, m_moduleEdit, m_moduleEditAll, m_moduleEditByName, PutModuleEdit(), TString::Strip(), TString::ToUpper(), SETUPMODULE::type, SETUPMODULE::xMove, SETUPMODULE::yMove, and SETUPMODULE::zMove.

Referenced by LoadLocalSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ParseGeometryTag()

int GeoSetup::ParseGeometryTag ( TString & geometry_tag,
TString & local_settings )
static

"run9_26.09.0;$VMCWORKDIR/my_setup.xml". If no XML file is given after the separator, the whole value is considered as the setup tag.

Parameters
geometry_tagthe geometry tag to parse, the parsed setup tag is returned via the same link.
local_settingsreturns the path to the XML file as given (not expanded, e.g. with $VMCWORKDIR) to be passed to LoadSetupToFairRunSim, "" if no file is given.
Returns
0 - success, < 0 - error codes: -1 - unexpected part in the tag, -2 - the XML file is not found.

Definition at line 742 of file GeoSetup.cxx.

References TObjArray::At(), TString::Contains(), TString::EndsWith(), TObjArray::GetEntriesFast(), i, TString::IsNull(), TString::kBoth, TString::kIgnoreCase, TString::Strip(), and TString::Tokenize().

Referenced by run_sim_bmn().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PrepareWritableDbDir()

TString GeoSetup::PrepareWritableDbDir ( )
private

Definition at line 376 of file GeoSetup.cxx.

References TString::Data(), exists_file(), TString::Format(), GetTmpPath(), and IsWritableDir().

Referenced by installLocalDB().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PutModuleRevisions()

int GeoSetup::PutModuleRevisions ( )
private

Definition at line 2079 of file GeoSetup.cxx.

References MODULEREVISION::active, MODULEREVISION::class_name, FieldToInt(), TSQLRow::GetField(), MODULEREVISION::idm, MODULEREVISION::idmr, m_db, m_modules_revision_table, TSQLResult::Next(), MODULEREVISION::object_name, and MODULEREVISION::rev.

Referenced by OpenLocalGeoDatabase().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PutModules()

int GeoSetup::PutModules ( )
private

Definition at line 2039 of file GeoSetup.cxx.

References FieldToInt(), TSQLRow::GetField(), m_db, m_modules_active, m_modules_table, and TSQLResult::Next().

Referenced by OpenLocalGeoDatabase().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_db

◆ m_ExternalField

TString GeoSetup::m_ExternalField = ""
private

Definition at line 155 of file GeoSetup.h.

Referenced by ClearLocalSettings(), GetMagneticField(), and ParseEditFieldMap().

◆ m_fid

int GeoSetup::m_fid
private

◆ m_field

FairField* GeoSetup::m_field
private

◆ m_loadedModule

map<int, TString> GeoSetup::m_loadedModule
private

Definition at line 145 of file GeoSetup.h.

Referenced by LoadModuleToFairRunSim(), and LoadSetupToFairRunSim().

◆ m_materialFile

string GeoSetup::m_materialFile = ""
private

Definition at line 171 of file GeoSetup.h.

Referenced by GetMaterialFile(), LoadSetupToFairRunSim(), and LoadSetupToGeoManager().

◆ m_moduleAdd

vector<module_r_ptr> GeoSetup::m_moduleAdd
private

Definition at line 152 of file GeoSetup.h.

Referenced by ClearLocalSettings(), LoadSetupToFairRunSim(), and ParseAddSetupModule().

◆ m_moduleEdit

map<TString, setup_module_ptr> GeoSetup::m_moduleEdit
private

Definition at line 147 of file GeoSetup.h.

Referenced by ClearLocalSettings(), FindModuleEdit(), and ParseEditSetupModule().

◆ m_moduleEditAll

setup_module_ptr GeoSetup::m_moduleEditAll = nullptr
private

Definition at line 151 of file GeoSetup.h.

Referenced by ClearLocalSettings(), FindModuleEdit(), and ParseEditSetupModule().

◆ m_moduleEditByName

map<TString, setup_module_ptr> GeoSetup::m_moduleEditByName
private

Definition at line 149 of file GeoSetup.h.

Referenced by ClearLocalSettings(), FindModuleEdit(), and ParseEditSetupModule().

◆ m_modules_active

map<int, bool> GeoSetup::m_modules_active
private

Definition at line 143 of file GeoSetup.h.

Referenced by CloseDB(), FindModuleEdit(), and PutModules().

◆ m_modules_revision_table

map<int, module_r_ptr> GeoSetup::m_modules_revision_table
private

Definition at line 144 of file GeoSetup.h.

Referenced by CloseDB(), GetModuleId(), GetModuleRevision(), and PutModuleRevisions().

◆ m_modules_table

map<int, TString> GeoSetup::m_modules_table
private

Definition at line 140 of file GeoSetup.h.

Referenced by CloseDB(), GetModuleIndex(), GetModuleName(), and PutModules().

◆ m_refVoltage

double GeoSetup::m_refVoltage = -1
private

◆ m_setupTag

string GeoSetup::m_setupTag = ""
private

Definition at line 169 of file GeoSetup.h.

Referenced by GetSetupTag(), LoadSetupToFairRunSim(), and LoadSetupToGeoManager().

◆ m_sid

int GeoSetup::m_sid
private

◆ m_tmpFolder

TString GeoSetup::m_tmpFolder
private

Definition at line 167 of file GeoSetup.h.

Referenced by GeoSetup(), and GetTmpPath().


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