StRoot
1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
macros
test
DbSaveSim.C
1
void
DbSaveSim(cons
char
* simTag){
2
/*
3
* possible tags
4
*
5
* static const char *aliases[]={
6
* "sd97", "sd98", "year_1a","year_1b","year_1c",
7
* "es99", "er99", "dc99" ,"year_1d","year_1e",
8
* "year_1h","year_2a", "year_2b", 0};
9
*
10
*/
11
12
// Baseline shared libraries
13
gSystem->Load(
"St_base"
);
14
gSystem->Load(
"StChain"
);
15
gSystem->Load(
"St_Tables"
);
16
17
// DB-specific libs
18
19
gSystem->Load(
"StUtilities"
);
20
gSystem->Load(
"StDbLib"
);
21
gSystem->Load(
"StDbBroker"
);
22
gSystem->Load(
"St_db_Maker"
);
23
24
// create makers connecting to databases RunParams & Geometry
25
26
St_db_Maker
*dbMk =
new
St_db_Maker
(
"StarDb"
,
"MySQL:StarDb"
);
27
dbMk->Init();
28
29
// choose timestamp from simulation tag.
30
dbMk->SetDateTime(simTag);
31
32
// Make requests for data per database Type
33
p0 = dbMk->GetDataBase(
"Calibrations"
);
34
p1 = dbMk->GetDataBase(
"Geometry"
);
35
p2 = dbMk->GetDataBase(
"Conditions"
);
36
p3 = dbMk->GetDataBase(
"RunLog"
);
37
38
// save data a local copy in files per database type
39
dbMk->Save(
"Calibrations"
);
40
dbMk->Save(
"Geometry"
);
41
dbMk->Save(
"Conditions"
);
42
dbMk->Save(
"RunLog"
);
43
}
44
45
46
47
48
49
50
St_db_Maker
Definition:
St_db_Maker.h:141
Generated by
1.8.5