]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/scripts/OCDBscan/ConfigOCDB.C
composition of the Alluminum alloy that constitutes the ITS-TPC support rings updated...
[u/mrichter/AliRoot.git] / TPC / scripts / OCDBscan / ConfigOCDB.C
CommitLineData
a443d933 1//
277d44fd 2// Macro to Setup OCDB for calibration scan
3// By default - all entries taken from the AliEn OCDB storage
a443d933 4// This is just example macro
5// Responsible: marian.ivanov@cern.ch
a443d933 6
277d44fd 7
a443d933 8
9void ConfigOCDB(Int_t crun=-1){
10 //
11 printf("SETUP OCBD for TPC\n");
12 //
277d44fd 13 AliCDBManager::Instance()->SetDefaultStorage("raw://");
a443d933 14 Int_t run =crun;
15 if (run<0) run =0;
16 AliCDBManager::Instance()->SetRun(run);
277d44fd 17 // magnetic field
18 if ( !TGeoGlobalMagField::Instance()->GetField() ) {
19 printf("Loading field map...\n");
20 AliGRPManager grpMan;
21 if( !grpMan.ReadGRPEntry() ) {
22 printf("Cannot get GRP entry\n");
23 }
24 if( !grpMan.SetMagField() ) {
25 printf("Problem with magnetic field setup\n");
26 }
a443d933 27 }
277d44fd 28 if ( !TGeoGlobalMagField::Instance()->GetField()){
29 AliMagF::BMap_t smag = AliMagF::k5kG;
30 Double_t bzfac = 1;
31 AliMagF* magF= new AliMagF("Maps","Maps", bzfac, 1., smag);
32 TGeoGlobalMagField::Instance()->SetField(magF);
a443d933 33 }
277d44fd 34 AliTPCcalibDB::Instance()->SetRun(run);
a443d933 35}
36
37
277d44fd 38