BmnRoot 26.10.0-18-g4e3414f9
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 (double scale=-1)
 Get magnetic field of the current setup geometry.
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.
 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 (double scale=-1)
 Get magnetic field of the current setup geometry.
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.

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 ExpandDbFilePath ()
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)
int LoadModuleToFairRunSim (int idsm, FairRunSim *fRun)
bool AddModuleToFairRunSim (int dbModuleRev, const char *path, FairRunSim *fRun)
int PutModules ()
int PutModuleRevisions ()
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 ExpandDbFilePath ()
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)
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)
static bool exists_file (const char *name)
static bool IsWritableDir (const char *path)

Private Attributes

map< int, TString > m_modules_table
map< int, module_r_ptr > m_modules_revision_table
map< int, TString > m_loadedModule
map< TString, setup_module_ptr > m_moduleEdit
vector< module_r_ptr > m_moduleAdd
TSQLServer * m_db
FairField * m_field
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 39 of file GeoSetup.h.

Constructor & Destructor Documentation

◆ GeoSetup() [1/2]

GeoSetup::GeoSetup ( )
inline

Definition at line 43 of file GeoSetup.h.

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

◆ ~GeoSetup() [1/2]

GeoSetup::~GeoSetup ( )

Definition at line 453 of file GeoSetup.cxx.

◆ GeoSetup() [2/2]

GeoSetup::GeoSetup ( )
inline

Definition at line 43 of file GeoSetup.h.

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

◆ ~GeoSetup() [2/2]

GeoSetup::~GeoSetup ( )

Member Function Documentation

◆ AddModuleToFairRunSim() [1/4]

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

Definition at line 1261 of file GeoSetup.cxx.

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

Here is the call graph for this function:

◆ AddModuleToFairRunSim() [2/4]

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

◆ AddModuleToFairRunSim() [3/4]

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

Definition at line 1300 of file GeoSetup.cxx.

References MODULEREVISION::active, and MODULEREVISION::file_path.

Referenced by LoadModuleToFairRunSim(), and LoadSetupToFairRunSim().

Here is the caller graph for this function:

◆ AddModuleToFairRunSim() [4/4]

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

◆ CheckTagOnServer() [1/2]

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

Definition at line 178 of file GeoSetup.cxx.

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

Referenced by LoadSetupToFairRunSim(), and LoadSetupToGeoManager().

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

◆ CheckTagOnServer() [2/2]

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

References GEO_SERVER_HOST.

◆ CloseDB() [1/2]

void GeoSetup::CloseDB ( )
private

Definition at line 441 of file GeoSetup.cxx.

References m_db, m_modules_revision_table, and m_modules_table.

Referenced by GetLastApprovedSetupTag(), and installLocalDB().

Here is the caller graph for this function:

◆ CloseDB() [2/2]

void GeoSetup::CloseDB ( )
private

◆ ConstructRootGeometry() [1/2]

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

Definition at line 1321 of file GeoSetup.cxx.

References TList::At(), TGeoManager::cd(), f, TGeoManager::GetNode(), TGeoVolume::GetNode(), and n.

Referenced by IsEqlMatrix().

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

◆ ConstructRootGeometry() [2/2]

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

◆ exists_file() [1/2]

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

Definition at line 31 of file GeoSetup.cxx.

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

Here is the caller graph for this function:

◆ exists_file() [2/2]

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

◆ ExpandDbFilePath() [1/2]

string GeoSetup::ExpandDbFilePath ( )
private

Definition at line 1027 of file GeoSetup.cxx.

Referenced by GetLocalDbPath(), GetRootPath(), and installLocalDB().

Here is the caller graph for this function:

◆ ExpandDbFilePath() [2/2]

string GeoSetup::ExpandDbFilePath ( )
private

◆ GetLastApprovedSetupTag() [1/2]

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.

Definition at line 122 of file GeoSetup.cxx.

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

Referenced by BmnTrackingQaOffline::BmnTrackingQaOffline(), BmnLambdaEmbeddingQa::DoDrawEventsWithEmbeddedSignals(), eventdisplay(), BmnGlobalAlignment::Init(), BmnQaOffline::Init(), BmnTwoParticleDecay::Init(), LoadGeometry(), LoadGeoSetup(), PairCreation(), run8_reco_bmn(), run_reco_bmn(), run_reco_bmn(), run_reco_bmn(), 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:

◆ GetLastApprovedSetupTag() [2/2]

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.

◆ GetLocalDbPath() [1/2]

string GeoSetup::GetLocalDbPath ( )
private

Definition at line 1064 of file GeoSetup.cxx.

References ExpandDbFilePath().

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

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

◆ GetLocalDbPath() [2/2]

string GeoSetup::GetLocalDbPath ( )
private

◆ GetLocalRevision() [1/2]

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

Definition at line 248 of file GeoSetup.cxx.

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

Here is the call graph for this function:

◆ GetLocalRevision() [2/2]

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

◆ GetMagneticField() [1/2]

FairField * GeoSetup::GetMagneticField ( double scale = -1)
Parameters
scalethe scale of the field. Default value is -1 (any negative value), which means that the default scale of the field from the Geometry Database is used. Zero value turns the magnetic field off.
Returns
Instance of the magnetic field class inherited from FairField. nullptr if no field

Definition at line 877 of file GeoSetup.cxx.

References FieldToDouble(), TSQLRow::GetField(), TSQLResult::GetRowCount(), m_db, m_fid, m_field, TSQLResult::Next(), BmnFieldMap::SetFileName(), and BmnFieldMap::SetScale().

Referenced by run_reco_bmn(), run_reco_bmn(), run_reco_bmn(), and run_sim_bmn().

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

◆ GetMagneticField() [2/2]

FairField * GeoSetup::GetMagneticField ( double scale = -1)
Parameters
scalethe scale of the field. Default value is -1 (any negative value), which means that the default scale of the field from the Geometry Database is used. Zero value turns the magnetic field off.
Returns
Instance of the magnetic field class inherited from FairField. nullptr if no field

◆ GetMaterialFile() [1/2]

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 985 of file GeoSetup.cxx.

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

Here is the call graph for this function:

◆ GetMaterialFile() [2/2]

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

◆ GetModuleId() [1/2]

int GeoSetup::GetModuleId ( int dbModuleRev)
private

Definition at line 1214 of file GeoSetup.cxx.

References m_modules_revision_table.

Referenced by GetModuleType(), and LoadModuleToFairRunSim().

Here is the caller graph for this function:

◆ GetModuleId() [2/2]

int GeoSetup::GetModuleId ( int dbModuleRev)
private

◆ GetModuleIndex() [1/2]

int GeoSetup::GetModuleIndex ( TString & name)
private

Definition at line 1192 of file GeoSetup.cxx.

References m_modules_table.

Referenced by GetParameterFile().

Here is the caller graph for this function:

◆ GetModuleIndex() [2/2]

int GeoSetup::GetModuleIndex ( TString & name)
private

◆ GetModuleName() [1/2]

TString GeoSetup::GetModuleName ( int dbModuleUndex)
private

Definition at line 1180 of file GeoSetup.cxx.

References m_modules_table.

Referenced by GetModuleType(), and LoadModuleToFairRunSim().

Here is the caller graph for this function:

◆ GetModuleName() [2/2]

TString GeoSetup::GetModuleName ( int dbModuleUndex)
private

◆ GetModuleRevision() [1/2]

module_r_ptr GeoSetup::GetModuleRevision ( int dbModuleRev)
private

Definition at line 1203 of file GeoSetup.cxx.

References m_modules_revision_table.

Referenced by AddModuleToFairRunSim().

Here is the caller graph for this function:

◆ GetModuleRevision() [2/2]

module_r_ptr GeoSetup::GetModuleRevision ( int dbModuleRev)
private

◆ GetModuleType() [1/2]

TString GeoSetup::GetModuleType ( int dbModuleRev)
private

Definition at line 1224 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:

◆ GetModuleType() [2/2]

TString GeoSetup::GetModuleType ( int dbModuleRev)
private

◆ GetParameterFile() [1/2]

string GeoSetup::GetParameterFile ( string_view detector_name)
Parameters
detector_namethe name of the detector, for which the parameter file is needed.
Returns
Path to parameter file. "" if file did not set.

Definition at line 933 of file GeoSetup.cxx.

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

Here is the call graph for this function:

◆ GetParameterFile() [2/2]

string GeoSetup::GetParameterFile ( string_view detector_name)
Parameters
detector_namethe name of the detector, for which the parameter file is needed.
Returns
Path to parameter file. "" if file did not set.

◆ GetRootPath() [1/2]

string GeoSetup::GetRootPath ( )
private

Definition at line 1046 of file GeoSetup.cxx.

References TString::Data(), and ExpandDbFilePath().

Referenced by LoadModuleToFairRunSim(), and LoadSetupToGeoManager().

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

◆ GetRootPath() [2/2]

string GeoSetup::GetRootPath ( )
private

◆ GetRootVolume() [1/2]

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

Definition at line 1230 of file GeoSetup.cxx.

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

Referenced by LoadModuleToFairRunSim().

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

◆ GetRootVolume() [2/2]

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

References f.

◆ GetServerRevision() [1/2]

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

Definition at line 102 of file GeoSetup.cxx.

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

Here is the call graph for this function:

◆ GetServerRevision() [2/2]

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

References GEO_SERVER_HOST.

◆ GetSetupTag() [1/2]

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

Definition at line 104 of file GeoSetup.h.

References m_setupTag.

◆ GetSetupTag() [2/2]

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

Definition at line 104 of file GeoSetup.h.

References m_setupTag.

◆ GetTagName4PatternLocal() [1/2]

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

Definition at line 224 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:

◆ GetTagName4PatternLocal() [2/2]

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

◆ GetTagName4PatternServer() [1/2]

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

Definition at line 137 of file GeoSetup.cxx.

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

Referenced by GetLastApprovedSetupTag().

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

◆ GetTagName4PatternServer() [2/2]

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

References GEO_SERVER_HOST.

◆ GetTmpFileName() [1/2]

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

Definition at line 97 of file GeoSetup.cxx.

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

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

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

◆ GetTmpFileName() [2/2]

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

◆ GetTmpPath() [1/2]

TString & GeoSetup::GetTmpPath ( )
private

Definition at line 1081 of file GeoSetup.cxx.

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

Referenced by GetTmpFileName(), LoadModuleToFairRunSim(), and PrepareWritableDbDir().

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

◆ GetTmpPath() [2/2]

TString & GeoSetup::GetTmpPath ( )
private

◆ installLocalDB() [1/2]

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

Definition at line 331 of file GeoSetup.cxx.

References CloseDB(), TString::Data(), exists_file(), ExpandDbFilePath(), FileStat_t::fMode, TString::Format(), FileStat_t::fSize, GetLocalDbPath(), GetTmpFileName(), gWritableDbDir, gWritableDbPid, IsSafeTag(), IsWritableDir(), 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:

◆ installLocalDB() [2/2]

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

References GEO_SERVER_HOST.

◆ IsEqlMatrix() [1/2]

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

Definition at line 1370 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:

◆ IsEqlMatrix() [2/2]

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

◆ IsWritableDir() [1/2]

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

Definition at line 276 of file GeoSetup.cxx.

Referenced by installLocalDB(), and PrepareWritableDbDir().

Here is the caller graph for this function:

◆ IsWritableDir() [2/2]

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

◆ LoadLocalSettings() [1/2]

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

Definition at line 1095 of file GeoSetup.cxx.

References TString::Atof(), TString::CompareTo(), TXMLEngine::DocGetRootElement(), SETUPMODULE::enable, SETUPMODULE::file_path, TXMLEngine::FreeDoc(), TXMLEngine::GetAttrName(), TXMLEngine::GetAttrValue(), TXMLEngine::GetChild(), TXMLEngine::GetFirstAttr(), TXMLEngine::GetNext(), TXMLEngine::GetNextAttr(), TXMLEngine::GetNodeName(), m_moduleAdd, m_moduleEdit, TXMLEngine::ParseFile(), TString::ToUpper(), SETUPMODULE::type, SETUPMODULE::xMove, SETUPMODULE::yMove, and SETUPMODULE::zMove.

Referenced by LoadSetupToFairRunSim().

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

◆ LoadLocalSettings() [2/2]

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

◆ LoadModuleToFairRunSim() [1/2]

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

Definition at line 1404 of file GeoSetup.cxx.

References AddModuleToFairRunSim(), TObject::ClassName(), TString::Data(), TString::EndsWith(), TGeoVolume::Export(), f, FieldToDouble(), FieldToInt(), TString::Format(), TSQLRow::GetField(), GetModuleId(), GetModuleName(), GetModuleType(), TGeoVolume::GetNode(), GetRootPath(), GetRootVolume(), TSQLResult::GetRowCount(), GetTmpPath(), IsEqlMatrix(), LoadModuleToFairRunSim(), m_db, m_loadedModule, m_moduleEdit, TSQLResult::Next(), TString::ToUpper(), and v.

Referenced by LoadModuleToFairRunSim(), and LoadSetupToFairRunSim().

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

◆ LoadModuleToFairRunSim() [2/2]

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

◆ LoadSetupToFairRunSim() [1/2]

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.
Returns
0, if the setup is loaded. Error code, if the setup is not loaded.

Definition at line 643 of file GeoSetup.cxx.

References AddModuleToFairRunSim(), CheckTagOnServer(), TString::Data(), FieldToInt(), FieldToUInt64(), GEO_SERVER_HOST, TSQLRow::GetField(), TSQLResult::GetRowCount(), installLocalDB(), LoadLocalSettings(), LoadModuleToFairRunSim(), m_db, m_fid, m_materialFile, m_moduleAdd, 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:

◆ LoadSetupToFairRunSim() [2/2]

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.
Returns
0, if the setup is loaded. Error code, if the setup is not loaded.

◆ LoadSetupToGeoManager() [1/2]

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 512 of file GeoSetup.cxx.

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

Referenced by BmnTrackingQaOffline::BmnTrackingQaOffline(), BmnLambdaEmbeddingQa::DoDrawEventsWithEmbeddedSignals(), eventdisplay(), BmnGlobalAlignment::Init(), BmnQaOffline::Init(), BmnTwoParticleDecay::Init(), LoadGeometry(), LoadGeoSetup(), PairCreation(), run8_reco_bmn(), run_reco_bmn(), run_reco_bmn(), run_reco_bmn(), run_reco_bmn(), run_reco_bmn(), 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:

◆ LoadSetupToGeoManager() [2/2]

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.

◆ OpenLocalGeoDatabase() [1/2]

bool GeoSetup::OpenLocalGeoDatabase ( )
private

Definition at line 459 of file GeoSetup.cxx.

References 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:

◆ OpenLocalGeoDatabase() [2/2]

bool GeoSetup::OpenLocalGeoDatabase ( )
private

◆ PrepareWritableDbDir() [1/2]

TString GeoSetup::PrepareWritableDbDir ( )
private

Definition at line 300 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:

◆ PrepareWritableDbDir() [2/2]

TString GeoSetup::PrepareWritableDbDir ( )
private

◆ PutModuleRevisions() [1/2]

int GeoSetup::PutModuleRevisions ( )
private

Definition at line 1581 of file GeoSetup.cxx.

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

Referenced by OpenLocalGeoDatabase().

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

◆ PutModuleRevisions() [2/2]

int GeoSetup::PutModuleRevisions ( )
private

◆ PutModules() [1/2]

int GeoSetup::PutModules ( )
private

Definition at line 1554 of file GeoSetup.cxx.

References FieldToInt(), TSQLRow::GetField(), TSQLResult::GetRowCount(), m_db, 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:

◆ PutModules() [2/2]

int GeoSetup::PutModules ( )
private

Member Data Documentation

◆ m_db

◆ m_fid

int GeoSetup::m_fid
private

◆ m_field

FairField * GeoSetup::m_field
private

Definition at line 116 of file GeoSetup.h.

Referenced by GeoSetup(), and GetMagneticField().

◆ m_loadedModule

map< int, TString > GeoSetup::m_loadedModule
private

Definition at line 109 of file GeoSetup.h.

Referenced by LoadModuleToFairRunSim().

◆ m_materialFile

string GeoSetup::m_materialFile = ""
private

Definition at line 126 of file GeoSetup.h.

Referenced by GetMaterialFile(), and LoadSetupToFairRunSim().

◆ m_moduleAdd

vector< module_r_ptr > GeoSetup::m_moduleAdd
private

Definition at line 111 of file GeoSetup.h.

Referenced by LoadLocalSettings(), and LoadSetupToFairRunSim().

◆ m_moduleEdit

map< TString, setup_module_ptr > GeoSetup::m_moduleEdit
private

Definition at line 110 of file GeoSetup.h.

Referenced by LoadLocalSettings(), and LoadModuleToFairRunSim().

◆ m_modules_revision_table

map< int, module_r_ptr > GeoSetup::m_modules_revision_table
private

Definition at line 108 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 107 of file GeoSetup.h.

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

◆ m_setupTag

string GeoSetup::m_setupTag = ""
private

Definition at line 124 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 122 of file GeoSetup.h.

Referenced by GeoSetup(), and GetTmpPath().


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