BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
loadSetup.C File Reference
#include <cstring>
#include <fcntl.h>
#include <fstream>
#include <iostream>
#include <map>
#include <sstream>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <sys/sendfile.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <time.h>
#include <unistd.h>
#include "TXMLEngine.h"
Include dependency graph for loadSetup.C:

Go to the source code of this file.

Classes

struct  SETUPMODULE
struct  MODULEREVISION

Typedefs

typedef std::pair< int, TString > moduleP

Functions

std::string getRootPath ()
bool exists_file (const char *name)
TString getModuleName (int dbNoduleUndex)
int getModuleIndex (TString &name)
MODULEREVISION getModuleRevision (int dbModuleRev)
int getModuleId (int dbModuleRev)
TString getModuleType (int dbModuleRev)
bool loadFairModule (FairRunSim *fRun, int dbModuleRev, const char *path, double psdx, double psdz, int iVerbose=0)
int putMudulesRevision4SQLite (TSQLiteServer &db)
int putMudules4SQLite (TSQLiteServer &db)
TGeoVolume * constructRootGeometry (TFile *f)
void copyFile (TString &in, TString &out)
bool hasEnding (std::string const &fullString, std::string const &ending)
int downloadModule (std::map< int, TString > *loadedModule, TString &rootDir, TSQLiteServer &db, int idsm, FairRunSim *fRun, std::map< int, SETUPMODULE > &moduleMove, int iVerbose=0)
int loadSetup (const char *setupTag, int subSetup, const char *fileName=NULL, int iVerbose=0)
int loadSetup (const char *setupTag, const char *url)
int loadSetup (const char *tag)

Variables

struct SETUPMODULE setup_module
struct SETUPMODULE * setup_module_ptr
struct MODULEREVISION module_r
struct MODULEREVISION * module_r_ptr
std::map< int, TString > m_modules_table
std::map< int, MODULEREVISION > m_modules_revision_table

Typedef Documentation

◆ moduleP

typedef std::pair<int, TString> moduleP

Definition at line 16 of file loadSetup.C.

Function Documentation

◆ constructRootGeometry()

TGeoVolume * constructRootGeometry ( TFile * f)

Definition at line 268 of file loadSetup.C.

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

Referenced by downloadModule().

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

◆ copyFile()

void copyFile ( TString & in,
TString & out )

Definition at line 315 of file loadSetup.C.

References TString::Data().

Here is the call graph for this function:

◆ downloadModule()

int downloadModule ( std::map< int, TString > * loadedModule,
TString & rootDir,
TSQLiteServer & db,
int idsm,
FairRunSim * fRun,
std::map< int, SETUPMODULE > & moduleMove,
int iVerbose = 0 )

Definition at line 336 of file loadSetup.C.

References TObject::ClassName(), constructRootGeometry(), TString::Data(), TObject::Delete(), downloadModule(), TGeoVolume::Export(), f, TString::Format(), TSQLRow::GetField(), getModuleId(), getModuleName(), getModuleType(), TGeoVolume::GetNode(), getRootPath(), TSQLResult::GetRowCount(), hasEnding(), loadFairModule(), TSQLResult::Next(), TSQLiteServer::Query(), TString::ToUpper(), and v.

Referenced by downloadModule(), and loadSetup().

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

◆ exists_file()

bool exists_file ( const char * name)

Definition at line 69 of file loadSetup.C.

◆ getModuleId()

int getModuleId ( int dbModuleRev)

Definition at line 105 of file loadSetup.C.

References m_modules_revision_table.

Referenced by downloadModule(), and getModuleType().

Here is the caller graph for this function:

◆ getModuleIndex()

int getModuleIndex ( TString & name)

Definition at line 85 of file loadSetup.C.

References m_modules_table.

Referenced by loadSetup().

Here is the caller graph for this function:

◆ getModuleName()

TString getModuleName ( int dbNoduleUndex)

Definition at line 74 of file loadSetup.C.

References m_modules_table.

Referenced by downloadModule(), and getModuleType().

Here is the caller graph for this function:

◆ getModuleRevision()

MODULEREVISION getModuleRevision ( int dbModuleRev)

Definition at line 95 of file loadSetup.C.

References m_modules_revision_table.

Referenced by loadFairModule().

Here is the caller graph for this function:

◆ getModuleType()

TString getModuleType ( int dbModuleRev)

Definition at line 114 of file loadSetup.C.

References getModuleId(), and getModuleName().

Referenced by downloadModule(), and loadFairModule().

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

◆ getRootPath()

std::string getRootPath ( )

Definition at line 42 of file loadSetup.C.

Referenced by downloadModule(), loadSetup(), and loadSetup().

Here is the caller graph for this function:

◆ hasEnding()

bool hasEnding ( std::string const & fullString,
std::string const & ending )

Definition at line 328 of file loadSetup.C.

Referenced by downloadModule().

Here is the caller graph for this function:

◆ loadFairModule()

bool loadFairModule ( FairRunSim * fRun,
int dbModuleRev,
const char * path,
double psdx,
double psdz,
int iVerbose = 0 )

Definition at line 119 of file loadSetup.C.

References MODULEREVISION::active, MODULEREVISION::args, MODULEREVISION::class_name, TClass::GetClass(), getModuleRevision(), getModuleType(), MODULEREVISION::idm, TString::Length(), TClass::New(), and TString::ToUpper().

Referenced by downloadModule().

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

◆ loadSetup() [1/3]

int loadSetup ( const char * setupTag,
const char * url )

Definition at line 658 of file loadSetup.C.

References getRootPath(), and loadSetup().

Here is the call graph for this function:

◆ loadSetup() [2/3]

int loadSetup ( const char * setupTag,
int subSetup,
const char * fileName = NULL,
int iVerbose = 0 )

◆ loadSetup() [3/3]

int loadSetup ( const char * tag)

Definition at line 698 of file loadSetup.C.

References loadSetup().

Here is the call graph for this function:

◆ putMudules4SQLite()

int putMudules4SQLite ( TSQLiteServer & db)

Definition at line 202 of file loadSetup.C.

References TSQLRow::GetField(), TSQLResult::GetRowCount(), m_modules_table, TSQLResult::Next(), and TSQLiteServer::Query().

Referenced by loadSetup().

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

◆ putMudulesRevision4SQLite()

int putMudulesRevision4SQLite ( TSQLiteServer & db)

Definition at line 161 of file loadSetup.C.

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

Referenced by loadSetup().

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

Variable Documentation

◆ m_modules_revision_table

std::map<int, MODULEREVISION> m_modules_revision_table

Definition at line 40 of file loadSetup.C.

◆ m_modules_table

std::map<int, TString> m_modules_table

Definition at line 39 of file loadSetup.C.

◆ module_r

◆ module_r_ptr

◆ setup_module

◆ setup_module_ptr