Macro to read the alignment database
authorbasanta <basanta@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 7 Jun 2010 15:34:45 +0000 (15:34 +0000)
committerbasanta <basanta@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 7 Jun 2010 15:34:45 +0000 (15:34 +0000)
PMD/ReadAlignmentData.C [new file with mode: 0644]

diff --git a/PMD/ReadAlignmentData.C b/PMD/ReadAlignmentData.C
new file mode 100644 (file)
index 0000000..512f971
--- /dev/null
@@ -0,0 +1,41 @@
+void ReadAlignmentData()
+{
+  TFile * f = TFile::Open("$ALICE_ROOT/OCDB/PMD/Align/Data/Run0_999999999_v0_s0.root");
+
+  f->ls();
+
+  AliAlignObjMatrix * aam;
+
+  TGeoHMatrix hh;
+  Double_t tr[3];
+  if (!AliCDBEntry)
+    {
+      printf("Something is wrong ************ \n");
+    }
+  else if(AliCDBEntry)
+    {
+      AliCDBEntry->PrintId(); 
+      AliCDBEntry->PrintMetaData();
+
+      TClonesArray * ncut = 0;
+      ncut = (TClonesArray*)AliCDBEntry->GetObject();
+      ncut->Print(); 
+
+      Int_t nen = ncut->GetLast();
+      cout << nen << endl;
+
+      for (int i=0; i<4; i++)
+       {
+         aam = (AliAlignObjMatrix*)ncut->UncheckedAt(i);
+
+         aam->GetMatrix(hh);
+         //hh.Print();
+
+         aam->GetTranslation(tr);
+
+         cout << tr[0] << " " << tr[1] << " " << tr[2] << endl;
+
+       }
+
+    }
+}