|
BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
|
#include <GeoSetup.h>
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 = "" |
It is used for loading necessary setup geometries from the Geometry Database.
Definition at line 39 of file GeoSetup.h.
|
inline |
Definition at line 43 of file GeoSetup.h.
References m_db, m_fid, m_field, m_sid, and m_tmpFolder.
| GeoSetup::~GeoSetup | ( | ) |
Definition at line 453 of file GeoSetup.cxx.
|
inline |
Definition at line 43 of file GeoSetup.h.
References m_db, m_fid, m_field, m_sid, and m_tmpFolder.
| GeoSetup::~GeoSetup | ( | ) |
|
private |
Definition at line 1261 of file GeoSetup.cxx.
References MODULEREVISION::active, MODULEREVISION::args, MODULEREVISION::class_name, GetModuleRevision(), GetModuleType(), and TString::Length().
|
private |
|
private |
Definition at line 1300 of file GeoSetup.cxx.
References MODULEREVISION::active, and MODULEREVISION::file_path.
Referenced by LoadModuleToFairRunSim(), and LoadSetupToFairRunSim().
|
private |
|
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().
|
private |
References GEO_SERVER_HOST.
|
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().
|
private |
|
private |
Definition at line 1321 of file GeoSetup.cxx.
References TList::At(), TGeoManager::cd(), f, TGeoManager::GetNode(), TGeoVolume::GetNode(), and n.
Referenced by IsEqlMatrix().
|
private |
|
staticprivate |
Definition at line 31 of file GeoSetup.cxx.
Referenced by GetLocalRevision(), GetTagName4PatternLocal(), installLocalDB(), OpenLocalGeoDatabase(), and PrepareWritableDbDir().
|
staticprivate |
|
private |
Definition at line 1027 of file GeoSetup.cxx.
Referenced by GetLocalDbPath(), GetRootPath(), and installLocalDB().
|
private |
| string GeoSetup::GetLastApprovedSetupTag | ( | string_view | tag_prefix | ) |
| tag_prefix | The prefix string to match against approved setup tags. |
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().
| string GeoSetup::GetLastApprovedSetupTag | ( | string_view | tag_prefix | ) |
| tag_prefix | The prefix string to match against approved setup tags. |
|
private |
Definition at line 1064 of file GeoSetup.cxx.
References ExpandDbFilePath().
Referenced by GetLastApprovedSetupTag(), installLocalDB(), LoadSetupToGeoManager(), and OpenLocalGeoDatabase().
|
private |
|
private |
Definition at line 248 of file GeoSetup.cxx.
References exists_file(), TSQLRow::GetField(), TSQLServer::IsConnected(), TSQLResult::Next(), and TSQLiteServer::Query().
|
private |
| FairField * GeoSetup::GetMagneticField | ( | double | scale = -1 | ) |
| scale | the 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. |
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().
| FairField * GeoSetup::GetMagneticField | ( | double | scale = -1 | ) |
| scale | the 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. |
| string GeoSetup::GetMaterialFile | ( | ) |
Definition at line 985 of file GeoSetup.cxx.
References TSQLRow::GetField(), m_db, m_materialFile, m_sid, and TSQLResult::Next().
| string GeoSetup::GetMaterialFile | ( | ) |
|
private |
Definition at line 1214 of file GeoSetup.cxx.
References m_modules_revision_table.
Referenced by GetModuleType(), and LoadModuleToFairRunSim().
|
private |
|
private |
Definition at line 1192 of file GeoSetup.cxx.
References m_modules_table.
Referenced by GetParameterFile().
|
private |
|
private |
Definition at line 1180 of file GeoSetup.cxx.
References m_modules_table.
Referenced by GetModuleType(), and LoadModuleToFairRunSim().
|
private |
|
private |
Definition at line 1203 of file GeoSetup.cxx.
References m_modules_revision_table.
Referenced by AddModuleToFairRunSim().
|
private |
|
private |
Definition at line 1224 of file GeoSetup.cxx.
References GetModuleId(), and GetModuleName().
Referenced by AddModuleToFairRunSim(), and LoadModuleToFairRunSim().
|
private |
| string GeoSetup::GetParameterFile | ( | string_view | detector_name | ) |
| detector_name | the name of the detector, for which the parameter file is needed. |
Definition at line 933 of file GeoSetup.cxx.
References TSQLRow::GetField(), GetModuleIndex(), m_db, m_sid, and TSQLResult::Next().
| string GeoSetup::GetParameterFile | ( | string_view | detector_name | ) |
| detector_name | the name of the detector, for which the parameter file is needed. |
|
private |
Definition at line 1046 of file GeoSetup.cxx.
References TString::Data(), and ExpandDbFilePath().
Referenced by LoadModuleToFairRunSim(), and LoadSetupToGeoManager().
|
private |
|
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().
|
private |
References f.
|
private |
Definition at line 102 of file GeoSetup.cxx.
References TString::Data(), TString::Format(), and GetTmpFileName().
|
private |
References GEO_SERVER_HOST.
|
inline |
|
inline |
|
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().
|
private |
|
private |
Definition at line 137 of file GeoSetup.cxx.
References TString::Data(), f, TString::Format(), GetTmpFileName(), and IsSafeTag().
Referenced by GetLastApprovedSetupTag().
|
private |
References GEO_SERVER_HOST.
|
private |
Definition at line 97 of file GeoSetup.cxx.
References TString::Format(), and GetTmpPath().
Referenced by CheckTagOnServer(), GetServerRevision(), GetTagName4PatternServer(), and installLocalDB().
|
private |
|
private |
Definition at line 1081 of file GeoSetup.cxx.
References TString::Data(), UserGroup_t::fUser, and m_tmpFolder.
Referenced by GetTmpFileName(), LoadModuleToFairRunSim(), and PrepareWritableDbDir().
|
private |
|
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().
|
private |
References GEO_SERVER_HOST.
|
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().
|
private |
|
staticprivate |
Definition at line 276 of file GeoSetup.cxx.
Referenced by installLocalDB(), and PrepareWritableDbDir().
|
staticprivate |
|
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().
|
private |
|
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().
|
private |
| int GeoSetup::LoadSetupToFairRunSim | ( | string_view | setupTag, |
| const char * | localSettings = nullptr ) |
Use for Simulation
| setupTag | the name of the setup tag. |
| localSettings | path to local setting file that can disable or move some detector in selected geometry. |
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().
| int GeoSetup::LoadSetupToFairRunSim | ( | string_view | setupTag, |
| const char * | localSettings = nullptr ) |
Use for Simulation
| setupTag | the name of the setup tag. |
| localSettings | path to local setting file that can disable or move some detector in selected geometry. |
| int GeoSetup::LoadSetupToGeoManager | ( | string_view | setup_tag | ) |
Use for Reconstruction and Analysis
| setup_tag | the name of the setup tag. |
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().
| int GeoSetup::LoadSetupToGeoManager | ( | string_view | setup_tag | ) |
Use for Reconstruction and Analysis
| setup_tag | the name of the setup tag. |
|
private |
Definition at line 459 of file GeoSetup.cxx.
References exists_file(), GetLocalDbPath(), m_db, PutModuleRevisions(), and PutModules().
Referenced by installLocalDB(), LoadSetupToFairRunSim(), and LoadSetupToGeoManager().
|
private |
|
private |
Definition at line 300 of file GeoSetup.cxx.
References TString::Data(), exists_file(), TString::Format(), GetTmpPath(), and IsWritableDir().
Referenced by installLocalDB().
|
private |
|
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().
|
private |
|
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().
|
private |
|
private |
Definition at line 114 of file GeoSetup.h.
Referenced by GeoSetup(), CloseDB(), GetMagneticField(), GetMaterialFile(), GetParameterFile(), LoadModuleToFairRunSim(), LoadSetupToFairRunSim(), LoadSetupToGeoManager(), OpenLocalGeoDatabase(), PutModuleRevisions(), and PutModules().
|
private |
Definition at line 118 of file GeoSetup.h.
Referenced by GeoSetup(), GetMagneticField(), LoadSetupToFairRunSim(), and LoadSetupToGeoManager().
|
private |
Definition at line 116 of file GeoSetup.h.
Referenced by GeoSetup(), and GetMagneticField().
|
private |
Definition at line 109 of file GeoSetup.h.
Referenced by LoadModuleToFairRunSim().
|
private |
Definition at line 126 of file GeoSetup.h.
Referenced by GetMaterialFile(), and LoadSetupToFairRunSim().
|
private |
Definition at line 111 of file GeoSetup.h.
Referenced by LoadLocalSettings(), and LoadSetupToFairRunSim().
|
private |
Definition at line 110 of file GeoSetup.h.
Referenced by LoadLocalSettings(), and LoadModuleToFairRunSim().
|
private |
Definition at line 108 of file GeoSetup.h.
Referenced by CloseDB(), GetModuleId(), GetModuleRevision(), and PutModuleRevisions().
|
private |
Definition at line 107 of file GeoSetup.h.
Referenced by CloseDB(), GetModuleIndex(), GetModuleName(), and PutModules().
|
private |
Definition at line 124 of file GeoSetup.h.
Referenced by GetSetupTag(), LoadSetupToFairRunSim(), and LoadSetupToGeoManager().
|
private |
Definition at line 120 of file GeoSetup.h.
Referenced by GeoSetup(), GetMaterialFile(), GetParameterFile(), LoadSetupToFairRunSim(), and LoadSetupToGeoManager().
|
private |
Definition at line 122 of file GeoSetup.h.
Referenced by GeoSetup(), and GetTmpPath().