]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FMD/scripts/TestSurveyToAlignObjs.C
Finalised the survey to alignment conversion. Closing corresponding task
[u/mrichter/AliRoot.git] / FMD / scripts / TestSurveyToAlignObjs.C
1 void
2 TestSurveyToAlignObjs(Int_t det=1, Bool_t cdbStore=false)
3 {
4   if (det < 1 || det > 2) { 
5     Error("TestSurveyToAlignObjs", "Invalid detector %d (must be 1,2, or 3)", 
6           det);
7     return;
8   }
9
10   const char* files[] = { 
11     "$ALICE_ROOT/FMD/Survey_943928_FMD.txt", 
12     "$ALICE_ROOT/FMD/Survey_976326_FMD.txt", 
13     0 
14   };
15   
16   
17   AliGeomManager::LoadGeometry("geometry.root");
18
19   AliFMDSurveyToAlignObjs convert;
20   if (!convert.LoadSurveyFromLocalFile(files[det-1])) { 
21     Error("TestSurveyToAlignObjs", "Failed to load %s", files[det-1]);
22     return;
23   }
24   convert.Run();
25   convert.CreateAlignObjs();
26   convert.GetAlignObjArray()->Print();
27
28   if (!cdbStore) 
29     convert.StoreAlignObjToFile("FMD_Survey.root", "FMD");
30   else 
31     convert.StoreAlignObjToCDB("FMD/Align/Data", "FMD");
32 }
33