AliRoot Core  3dc7879 (3dc7879)
PrintAlignment.C
Go to the documentation of this file.
1 //____________________________________________________________________
2 //
3 // $Id$
4 //
5 // Read in the geometry, and get alignment data from CDB, and apply
6 // that to the geometry.
7 //
11 #include <iomanip>
12 void
14 {
16  cdb->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
17  AliCDBEntry* align = cdb->Get("FMD/Align/Data");
18  if (!align) {
19  Error("PrintAlignment","didn't alignment data from CDB");
20  return;
21  }
22 
23  TClonesArray* array = dynamic_cast<TClonesArray*>(align->GetObject());
24  if (!array) {
25  Warning("PrintAlignement", "Invalid align data from CDB");
26  return;
27  }
28  Int_t nAlign = array->GetEntries();
29  for (Int_t i = 0; i < nAlign; i++) {
30  AliAlignObjParams* a = static_cast<AliAlignObjParams*>(array->At(i));
31  Double_t ang[3];
32  Double_t trans[3];
33  a->GetAngles(ang);
34  a->GetTranslation(trans);
35  std::cout << a->GetVolPath() << "\n"
36  << " translation: "
37  << "(" << std::setw(12) << trans[0]
38  << "," << std::setw(12) << trans[1]
39  << "," << std::setw(12) << trans[2] << ")\n"
40  << " rotation: "
41  << "(" << std::setw(12) << ang[0]
42  << "," << std::setw(12) << ang[1]
43  << "," << std::setw(12) << ang[2] << ")" << std::endl;
44  // a->Print();
45  }
46 }
47 //____________________________________________________________________
48 //
49 // EOF
50 //
AliTPCcalibAlign align
Definition: CalibAlign.C:43
void PrintAlignment()
TObjArray * array
Definition: AnalyzeLaser.C:12
AliCDBEntry * Get(const AliCDBId &query, Bool_t forceCaching=kFALSE)
bool trans(const AliFMDIndex &x, const AliFMDIndex &y, const AliFMDIndex &z)
Definition: TestIndex.C:94
TObject * GetObject()
Definition: AliCDBEntry.h:56
Definition: AliCDBEntry.h:18
void SetDefaultStorage(const char *dbString)
static AliCDBManager * Instance(TMap *entryCache=NULL, Int_t run=-1)
virtual Bool_t GetAngles(Double_t *angles) const
virtual void GetTranslation(Double_t *tr) const