]> git.uio.no Git - u/mrichter/AliRoot.git/blame - macros/MakeAllDETsFullMisAlignment.C
Using AliGeomManager in the macros (Raffaele)
[u/mrichter/AliRoot.git] / macros / MakeAllDETsFullMisAlignment.C
CommitLineData
1895a097 1void MakeAllDETsFullMisAlignment(Char_t* CDBstorage = "local://$HOME/Full"){
2 // Make full misalignment objects for all detectors
3 // Pass different "CDBstorage" argument if needed (e.g. to fill
4 // conditions' data base on alien) or set it to null string to have
5 // the objects saved locally on file
6 // This macro defines the default name and place for the detector-macros
7 // in charge of producing the full misalignment objects as
8 // $ALICE_ROOT/DET/MakeDETFullMisAlignment.C
9 //
10 TString strStorage(CDBstorage);
11 if(strStorage.IsNull()){
5bd470e1 12 gSystem->Setenv("TOCDB","kFALSE");
1895a097 13 }else{
5bd470e1 14 gSystem->Setenv("TOCDB","kTRUE");
15 gSystem->Setenv("STORAGE",strStorage.Data());
16 gSystem->Setenv("ARVERSION","v4-05-08");
1895a097 17 }
18
dfe9c69d 19 if(!AliGeomManager::GetGeometry()){
20 if(!(AliCDBManager::Instance())->IsDefaultStorageSet())
21 AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT");
22 AliCDBManager::Instance()->SetRun(0);
23 AliGeomManager::LoadGeometry();
1895a097 24 }
25
ababa197 26 TString dets = "EMCAL,FMD,ITS,MUON,PHOS,PMD,HMPID,T0,TOF,TPC,TRD,VZERO,ZDC";
1895a097 27 TObjArray *detArray = dets.Tokenize(',');
28 TIter iter(detArray);
29 TObjString *ostr;
30 TString exec_det_macro;
31
32 while((ostr = (TObjString*) iter.Next())){
33 TString str(ostr->String());
34 exec_det_macro="aliroot -b -q $ALICE_ROOT/";
35 exec_det_macro+=str;
36 exec_det_macro+="/Make";
37 exec_det_macro+=str;
38 exec_det_macro+="FullMisAlignment.C";
39
40 gSystem->Exec(exec_det_macro.Data());
41 }
42
43 return;
44}