]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Hardwired "ideal" coordinates replaced with those from the DCDB.
authorkowal2 <kowal2@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 22 Oct 2007 14:20:25 +0000 (14:20 +0000)
committerkowal2 <kowal2@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 22 Oct 2007 14:20:25 +0000 (14:20 +0000)
Corrected bug in SetDebug method

TPC/AliTPCAlign.cxx
TPC/AliTPCAlign.h

index bc66e09705c307239d71eef8f2fbe7b6be3daa5c..5482f333e4898732b270ea10a254a7ad36c0e740 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.2  2007/10/03 09:27:50  marian
+Extra semicolon removed (Marian)
+
 Revision 1.1  2007/10/01 14:12:45  kowal2
 Class creating the aligmnent object fro the surveyor measurements.
 
@@ -155,37 +158,29 @@ Bool_t AliTPCAlign::LoadSurveyData(){
  //
  Float_t idealPoints[8][3];
  //
- idealPoints[0][0]=0.7973;
- idealPoints[0][1]=-2.5278;
- idealPoints[0][2]=3.0165;
- //
- idealPoints[1][0]=2.5873;
- idealPoints[1][1]=-0.5738;
- idealPoints[1][2]=3.0166;
- //
- idealPoints[2][0]=1.7898;
- idealPoints[2][1]=1.9540;
- idealPoints[2][2]=3.0164;
- //
- idealPoints[3][0]=-0.2237;
- idealPoints[3][1]=0.7055;
- idealPoints[3][2]=3.0161;
- //
- idealPoints[4][0]=-0.7230;
- idealPoints[4][1]=0.1598;
- idealPoints[4][2]=3.0162;
-//
- idealPoints[5][0]=0.2225;
- idealPoints[5][1]=-0.7058;
- idealPoints[5][2]=3.0166;
+ AliSurveyObj * s2 = new AliSurveyObj();
+ s2->FillFromLocalFile(fFileLoc);
  //
- idealPoints[6][0]=0.7224;
- idealPoints[6][1]=-0.1608;
- idealPoints[6][2]=3.0164;
+ TString pointNamesL[8] ={"R04","R05","R06","R07","R08","R10","R11","R12"};
  //
- idealPoints[7][0]=0.4999;
- idealPoints[7][1]=0.5452;
- idealPoints[7][2]=3.0164;
+  AliSurveyPoint *currPointL;
+  //
+ for(Int_t i=0;i<numberPoints;i++){
+   currPointL=0;
+   currPointL = (AliSurveyPoint *) s2->GetData()->FindObject(pointNamesL[i]);
+   if(currPointL){
+     idealPoints[i][0]=currPointL->GetY();
+     idealPoints[i][1]=currPointL->GetZ();
+     idealPoints[i][2]=currPointL->GetX();
+          if(fDebug)
+     Printf(Form("INFO: Point \"%s\" coordinates read.", pointNamesL[i].Data()));
+   }
+   else{
+     if(fDebug){
+    Printf(Form("ERROR: Essential point missing: \"%s\"", pointNamesL[i].Data()));
+    return 1; }
+   }
+ }
  //
  // Create and fill matrices a & y
  //
index 0c824041c1d598182776286cdbf6af1d440b1b08..0f93e509ff0ce6fc6f055fcf7190e5830719be46 100644 (file)
@@ -25,7 +25,7 @@ class AliTPCAlign : public TObject {
   Double_t ComputeTransform();
   void CreateAlignObj();
   void Run();
-  void SetDebug(Int_t debug){debug=fDebug;}
+  void SetDebug(Int_t debug){fDebug=debug;}
   void StoreAlignObj();
   virtual   ~AliTPCAlign();
   //