1 void AliITSPrintGeom(TString hfn="galice.root",Int_t mod=-1){
2 // Macro to print out the information kept in the AliITSgeom class, for
3 //all or a specific module
5 // Dynamically link some shared libs
6 if (gClassTable->GetID("AliRun") < 0) {
7 gROOT->LoadMacro("loadlibs.C");
12 delete gAlice->GetRunLoader();
18 AliRunLoader* rl = AliRunLoader::Open(hfn.Data());
20 cerr<<"AliITSPrintGeom.C : Can not open session RL=NULL"<< endl;
24 Int_t retval = rl->LoadgAlice();
27 cerr<<"AliITSHits2SDigits.C : LoadgAlice returned error"
31 // gAlice=rl->GetAliRun();
33 cerr<<"AliITSPrintGeom.C. AliRun object not found\n";
37 AliITS *ITS = (AliITS*)gAlice->GetDetector("ITS");
39 cout << "Error: no ITS found. Aborting"<<endl;
43 AliITSgeom *gm = ITS->GetITSgeom();
45 Int_t mod2 = gm->GetIndexMax();
50 AliITSgeomMatrix *gmm = gm->GetGeomMatrix(0);
52 cout<<endl<<endl<<"====================================\n";
53 gmm->PrintComment(&cout); cout << endl;
54 cout<<endl<<endl<<"====================================\n";
55 for(m=mod1;m<mod2;m++){
56 gmm = gm->GetGeomMatrix(m);
57 gmm->Print(&cout); cout << endl;