BmnRoot 26.10.0-233-gb9bbe585
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
GeoSetup.cxx File Reference
#include "GeoSetup.h"
#include "BmnNewFieldMap.h"
#include "FairModule.h"
#include "FairRunAna.h"
#include "TClass.h"
#include "TGeoBBox.h"
#include "TGeoBoolNode.h"
#include "TGeoCompositeShape.h"
#include "TGeoCone.h"
#include "TGeoManager.h"
#include "TGeoMatrix.h"
#include "TGeoTrd2.h"
#include "TGeoTube.h"
#include "TInterpreter.h"
#include "TKey.h"
#include "TObjArray.h"
#include "TObjString.h"
#include "TSQLResult.h"
#include "TSQLRow.h"
#include "TSQLiteServer.h"
#include "TSystem.h"
#include "TXMLEngine.h"
#include <cctype>
#include <cstdlib>
#include <cstring>
#include <filesystem>
#include <iostream>
#include <sys/stat.h>
#include <time.h>
#include <unistd.h>
Include dependency graph for GeoSetup.cxx:

Go to the source code of this file.

Functions

static bool ichar_equals (char a, char b)
static int FieldToInt (const char *field, int defaultValue=0)
static uint64_t FieldToUInt64 (const char *field, uint64_t defaultValue=0)
static double FieldToDouble (const char *field, double defaultValue=0.)
static bool IsSafeTag (const string &tag)
static string SqlEscape (string_view value)
static bool AttrToBool (const TString &name, TString value, bool &result)
static bool AttrToDouble (const TString &name, TString value, double &result)
static void PutModuleEdit (map< TString, setup_module_ptr > &edits, const TString &key, setup_module_ptr sNode)
static void RemoveTmpGeometryFiles ()
static void RemoveWritableDbDir ()
static void RemoveAssemblyShapes (TGeoManager *geoManager)

Variables

static vector< string > gTmpGeometryFiles
static pid_t gTmpGeometryPid = 0
static const char *const kWgetOptions = "--tries=1 --dns-timeout=10 --connect-timeout=10"
static string gWritableDbDir
static pid_t gWritableDbPid = 0

Function Documentation

◆ AttrToBool()

bool AttrToBool ( const TString & name,
TString value,
bool & result )
static

Definition at line 101 of file GeoSetup.cxx.

References TString::kBoth, TString::Strip(), and TString::ToLower().

Referenced by GeoSetup::ParseAddSetupModule(), and GeoSetup::ParseEditSetupModule().

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

◆ AttrToDouble()

bool AttrToDouble ( const TString & name,
TString value,
double & result )
static

Definition at line 121 of file GeoSetup.cxx.

References TString::Data(), TString::IsNull(), TString::kBoth, and TString::Strip().

Referenced by GeoSetup::ParseAddSetupModule(), and GeoSetup::ParseEditSetupModule().

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

◆ FieldToDouble()

double FieldToDouble ( const char * field,
double defaultValue = 0. )
static

Definition at line 64 of file GeoSetup.cxx.

Referenced by GeoSetup::GetMagneticField(), GeoSetup::IsEqlMatrix(), and GeoSetup::LoadModuleToFairRunSim().

Here is the caller graph for this function:

◆ FieldToInt()

int FieldToInt ( const char * field,
int defaultValue = 0 )
static

Definition at line 46 of file GeoSetup.cxx.

Referenced by GeoSetup::CheckTagOnServer(), GeoSetup::LoadModuleToFairRunSim(), GeoSetup::LoadSetupToFairRunSim(), GeoSetup::LoadSetupToGeoManager(), GeoSetup::PutModuleRevisions(), and GeoSetup::PutModules().

Here is the caller graph for this function:

◆ FieldToUInt64()

uint64_t FieldToUInt64 ( const char * field,
uint64_t defaultValue = 0 )
static

Definition at line 55 of file GeoSetup.cxx.

Referenced by GeoSetup::CheckTagOnServer(), GeoSetup::LoadSetupToFairRunSim(), and GeoSetup::LoadSetupToGeoManager().

Here is the caller graph for this function:

◆ ichar_equals()

bool ichar_equals ( char a,
char b )
static

Definition at line 39 of file GeoSetup.cxx.

Referenced by GeoSetup::CheckTagOnServer().

Here is the caller graph for this function:

◆ IsSafeTag()

bool IsSafeTag ( const string & tag)
static

Definition at line 74 of file GeoSetup.cxx.

Referenced by GeoSetup::CreateModule(), GeoSetup::GetTagName4PatternServer(), GeoSetup::installLocalDB(), and GeoSetup::ParseAddSetupModule().

Here is the caller graph for this function:

◆ PutModuleEdit()

void PutModuleEdit ( map< TString, setup_module_ptr > & edits,
const TString & key,
setup_module_ptr sNode )
static

Definition at line 136 of file GeoSetup.cxx.

Referenced by GeoSetup::ParseEditSetupModule().

Here is the caller graph for this function:

◆ RemoveAssemblyShapes()

void RemoveAssemblyShapes ( TGeoManager * geoManager)
static

Definition at line 572 of file GeoSetup.cxx.

References TObjArray::Compress(), TGeoManager::GetListOfShapes(), TGeoManager::GetListOfVolumes(), and TObjArray::Remove().

Referenced by GeoSetup::LoadSetupToGeoManager().

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

◆ RemoveTmpGeometryFiles()

void RemoveTmpGeometryFiles ( )
static

Definition at line 155 of file GeoSetup.cxx.

References gTmpGeometryFiles, and gTmpGeometryPid.

Referenced by GeoSetup::ExportModuleGeometry().

Here is the caller graph for this function:

◆ RemoveWritableDbDir()

void RemoveWritableDbDir ( )
static

Definition at line 363 of file GeoSetup.cxx.

References gWritableDbDir, and gWritableDbPid.

Referenced by GeoSetup::installLocalDB().

Here is the caller graph for this function:

◆ SqlEscape()

string SqlEscape ( string_view value)
static

Definition at line 86 of file GeoSetup.cxx.

Referenced by GeoSetup::GetTagName4PatternLocal(), GeoSetup::LoadSetupToFairRunSim(), and GeoSetup::LoadSetupToGeoManager().

Here is the caller graph for this function:

Variable Documentation

◆ gTmpGeometryFiles

vector<string> gTmpGeometryFiles
static

Definition at line 151 of file GeoSetup.cxx.

Referenced by GeoSetup::ExportModuleGeometry(), and RemoveTmpGeometryFiles().

◆ gTmpGeometryPid

pid_t gTmpGeometryPid = 0
static

Definition at line 152 of file GeoSetup.cxx.

Referenced by GeoSetup::ExportModuleGeometry(), and RemoveTmpGeometryFiles().

◆ gWritableDbDir

string gWritableDbDir
static

Definition at line 359 of file GeoSetup.cxx.

Referenced by GeoSetup::installLocalDB(), and RemoveWritableDbDir().

◆ gWritableDbPid

pid_t gWritableDbPid = 0
static

Definition at line 360 of file GeoSetup.cxx.

Referenced by GeoSetup::installLocalDB(), and RemoveWritableDbDir().

◆ kWgetOptions

const char* const kWgetOptions = "--tries=1 --dns-timeout=10 --connect-timeout=10"
static