]>
Commit | Line | Data |
---|---|---|
27eb9bff | 1 | /* |
2 | ||
3 | Macro to initialize: | |
4 | - the OCDB (run number required as input argument) | |
5 | - the geometry (expected to be in the current directory) | |
6 | to run the Calibration train. | |
7 | ||
8 | Example: | |
9 | .L $ALICE_ROOT/ANALYSIS/CalibMacros/MergeCalibration/ConfigCalibTrain.C | |
10 | ConfigCalibTrain(129160,"raw://"); | |
11 | ||
12 | */ | |
13 | ||
14 | void ConfigCalibTrain(Int_t run, const char *ocdb="raw://"){ | |
15 | ||
16 | // OCDB | |
17 | printf("setting run to %d\n",run); | |
18 | AliCDBManager::Instance()->SetDefaultStorage(ocdb); | |
19 | AliCDBManager::Instance()->SetRun(run); | |
20 | if (gSystem->AccessPathName("OCDB.root", kFileExists)==0) { | |
21 | AliCDBManager::Instance()->InitFromSnapshot("OCDB.root"); | |
22 | } | |
23 | // magnetic field | |
24 | if ( !TGeoGlobalMagField::Instance()->GetField() ) { | |
25 | printf("Loading field map...\n"); | |
26 | AliGRPManager grpMan; | |
27 | if( !grpMan.ReadGRPEntry() ) { | |
28 | printf("Cannot get GRP entry\n"); | |
29 | } | |
30 | if( !grpMan.SetMagField() ) { | |
31 | printf("Problem with magnetic field setup\n"); | |
32 | } | |
33 | } | |
34 | ||
35 | // geometry | |
36 | printf("Loading geometry...\n"); | |
37 | AliGeomManager::LoadGeometry(); | |
4dac1092 | 38 | if( !AliGeomManager::ApplyAlignObjsFromCDB("GRP ITS TPC TRD TOF HMPID") ) { |
27eb9bff | 39 | printf("Problem with align objects\n"); |
40 | } | |
41 | ||
42 | } |