]> git.uio.no Git - u/mrichter/AliRoot.git/blame - macros/MakeAllDETsResMisAlignment.C
Improved version of online detector-algorithm makefile
[u/mrichter/AliRoot.git] / macros / MakeAllDETsResMisAlignment.C
CommitLineData
1895a097 1void MakeAllDETsResMisAlignment(Char_t* CDBstorage = "local://$HOME/Residual"){
2 // Make residual 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
5bd470e1 7 // in charge of producing the residual misalignment objects as
1895a097 8 // $ALICE_ROOT/DET/MakeDETResidualMisAlignment.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
19 // if not already present, create geometry file needed by those detectors
20 // producing their objects in the local RS
21 if(gSystem->AccessPathName("./geometry.root")){
22 gAlice->Init();
23 gGeoManager->Export("geometry.root");
24 }else{
25 TGeoManager::Import("geometry.root");
26 }
27
d3a9c52a 28 TString dets="EMCAL,FMD,HMPID,ITS,MUON,PHOS,PMD,T0,TOF,TPC,TRD,VZERO,ZDC";
1895a097 29 TObjArray *detArray = dets.Tokenize(',');
30 TIter iter(detArray);
31 TObjString *ostr;
32 TString exec_det_macro;
33
34 while((ostr = (TObjString*) iter.Next())){
35 TString str(ostr->String());
36 exec_det_macro="aliroot -b -q $ALICE_ROOT/";
37 exec_det_macro+=str;
38 exec_det_macro+="/Make";
39 exec_det_macro+=str;
40 exec_det_macro+="ResMisAlignment.C";
41
42 gSystem->Exec(exec_det_macro.Data());
43 }
44
45 return;
46}