Extacting the OCDB in a separate module. The detectors have write permission in the...
[u/mrichter/AliRoot.git] / TPC / macros / ConfigOCDB.C
CommitLineData
e100e17a 1//
c7568bc5 2// Macro to be invoked before Calibration analysis
e100e17a 3// Setup TPC OCDB entries
c7568bc5 4//
5// This is just example macro - some path are hardwired
6// TO BE MODIFIED BY USERS
e100e17a 7
8
78abca19 9
c7568bc5 10void ConfigOCDB(Float_t bfield){
e100e17a 11 //
12 //
13 // import geometry
14 //
78abca19 15
e100e17a 16 printf("SETUP OCBD for PROOF\n");
17 TGeoManager::Import("/u/miranov/proof/geometry.root");
18 AliGeomManager::LoadGeometry("/u/miranov/proof/geometry.root");
19 //
20 //
21 // Setup magnetic field
22 //
f7a1cc68 23 TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, 1., 1., 10., AliMagF::k5kG));
e100e17a 24 //
25 //
26 //
162637e4 27 AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
28 AliCDBManager::Instance()->SetSpecificStorage("TPC/Calib/Parameters","local://$ALICE_ROOT/OCDB");
29 AliCDBManager::Instance()->SetSpecificStorage("TPC/Calib/ClusterParam","local://$ALICE_ROOT/OCDB");
30 // AliCDBManager::Instance()->SetSpecificStorage("TPC/Calib/PadTime0","local://$ALICE_ROOT/OCDB");
c7568bc5 31 AliCDBManager::Instance()->SetSpecificStorage("TPC/Calib/PadTime0","local:///u/miranov/OCDB0");
32
78abca19 33 AliCDBManager::Instance()->SetSpecificStorage("GRP/GRP/Data","local:///lustre_alpha/alice/alien/alice/data/2008/LHC08d/OCDB/");
34 AliCDBManager::Instance()->SetSpecificStorage("TPC/Calib/Temperature","local:///lustre_alpha/alice/alien/alice/data/2008/LHC08d/OCDB/");
35 AliCDBManager::Instance()->SetSpecificStorage("TPC/Calib/Goofie","local:///lustre_alpha/alice/alien/alice/data/2008/LHC08d/OCDB/");
36
c7568bc5 37
78abca19 38 AliCDBManager::Instance()->SetRun(1);
e100e17a 39
78abca19 40 AliTPCClusterParam * paramCl = AliTPCcalibDB::Instance()->GetClusterParam();
41 AliTPCParam * paramTPC = AliTPCcalibDB::Instance()->GetParameters();
c7568bc5 42 paramCl->SetInstance(paramCl);
78abca19 43 //paramTPC->Dump();
c7568bc5 44 printf("\n\nSET EXB FIELD\t%f\n\n", bfield);
45 AliTPCcalibDB::Instance()->SetExBField(bfield);
e100e17a 46 //
47 //
48 //
49 printf("END of SETUP OCBD for PROOF\n");
78abca19 50}
e100e17a 51
52
78abca19 53void ConfigAlien(){
54 //
55 // Setup-activate alien
56 //
57
58 //myvar=342
59 //while [ $myvar -ne 360 ] ; do echo enable alien on lxb$myvar; lsrun -m lxb$myvar /u/miranov/.aliensetup; myvar=$(( $myvar + 1 )) ; echo $myvar ; done
60 gSystem->Exec("/u/miranov/.aliensetup >setup.log");
61 //ifstream in;
62 //in.open("path.txt");
63
64 TString envString;
65
66 gSystem->Setenv("LD_LIBRARY_PATH",envString.Data());
67 gSystem->Setenv("GBBOX_ENVFILE","/tmp/xxxxxxx");
68 printf("LOAD LIBRARIES start\n\n\n");
69 gSystem->Load("libANALYSIS.so");
70 gSystem->Load("libSTAT.so");
71 gSystem->Load("libTPCcalib.so");
72 //
73 gSystem->Load("libXrdClient.so");
74 gSystem->Load("libNetx.so");
75 printf("LOAD LIBRARIES end\n\n\n");
76 TGrid * alien = TGrid::Connect("alien://",0,0,"t");
77 if (alien) {
78 printf("Alien activated\n");
79 }else{
80 printf("Alien not activated\n");
81 }
e100e17a 82}