method GetCellXY is added
[u/mrichter/AliRoot.git] / macros / MakeAllDETsZeroMisAlignment.C
CommitLineData
d3a9c52a 1void MakeAllDETsZeroMisAlignment(Char_t* CDBstorage = "local://$HOME/Zero"){
2 // Make zero 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 //
7 TString strStorage(CDBstorage);
8 if(strStorage.IsNull()){
9 gSystem->Setenv("$TOCDB","kFALSE");
10 }else{
11 gSystem->Setenv("$TOCDB","kTRUE");
12 gSystem->Setenv("$STORAGE",strStorage.Data());
13 gSystem->Setenv("$ARVERSION","v4-04-Release");
14 }
15
16 // if not already present, create geometry file needed by those detectors
17 // producing their objects in the local RS
18 if(gSystem->AccessPathName("./geometry.root")){
19 gAlice->Init();
20 gGeoManager->Export("geometry.root");
21 }else{
22 TGeoManager::Import("geometry.root");
23 }
24
25 TString dets="EMCAL,FMD,HMPID,ITS,MUON,PMD,PHOS,T0,TRD,TPC,TOF,VZERO,ZDC";
26 TObjArray *detArray = dets.Tokenize(',');
27 TIter iter(detArray);
28 TObjString *ostr;
29 TString exec_det_macro;
30
31 while((ostr = (TObjString*) iter.Next())){
32 TString str(ostr->String());
33 exec_det_macro="aliroot -b -q $ALICE_ROOT/";
34 exec_det_macro+=str;
35 exec_det_macro+="/Make";
36 exec_det_macro+=str;
37 exec_det_macro+="ZeroMisAlignment.C";
38
39 gSystem->Exec(exec_det_macro.Data());
40 }
41
42 return;
43}