]> git.uio.no Git - u/mrichter/AliRoot.git/blame - macros/MakeAllDETsFullMisAlignment.C
Macros for residual and full misalignment, collected by 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()){
12 gSystem->Setenv("$TOCDB","kFALSE");
13 }else{
14 gSystem->Setenv("$TOCDB","kTRUE");
15 gSystem->Setenv("$STORAGE",strStorage.Data());
16 gSystem->Setenv("$ARVERSION","v4-04-Release");
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
28 TString dets = "EMCAL,FMD,ITS,MUON,PHOS,PMD,RICH,START,TOF,TPC,TRD,VZERO,ZDC";
29// TString dets = "ABSO,DIPO,FMD,FRAME,HALL,ITS,MAG,MUON,PHOS,PIPE,PMD,RICH,SHIL,START,TOF,TPC,TRD,ZDC,EMCAL,CRT,VZERO";
30 TObjArray *detArray = dets.Tokenize(',');
31 TIter iter(detArray);
32 TObjString *ostr;
33 TString exec_det_macro;
34
35 while((ostr = (TObjString*) iter.Next())){
36 TString str(ostr->String());
37 exec_det_macro="aliroot -b -q $ALICE_ROOT/";
38 exec_det_macro+=str;
39 exec_det_macro+="/Make";
40 exec_det_macro+=str;
41 exec_det_macro+="FullMisAlignment.C";
42
43 gSystem->Exec(exec_det_macro.Data());
44 }
45
46 return;
47}