{ #include "iostream.h" cout << endl << " One can download the file \"atlas.root\" from Web as follows" << endl << "\t \"http://www.star.bnl.gov/~fine/Detectors/ATLAS/atlas.root\"" << endl << endl; TStopwatch watch; gSystem->Load("libStar"); printf("\n The share library has been loaded: "); watch.Print(); watch->Start(); printf("\n"); TFile *f = TFile::Open("atlas.root"); ATLS->ls(); printf(" The geometry file has been picked: "); watch.Print(); watch->Start(); printf("\n"); // We will no beoynd the 6-th level of the source structure const Int_t maxDepth = 5; //6 TDataSetIter nextVolume((TDataSet *)ATLS,maxDepth); TVolume *volume = 0; Int_t viCounter = 0; Int_t nonCounter = 0; Int_t dep = -1; Int_t skipLevel = 1; EDataSetPass mode = 0; // kContinue; while (volume = (TVolume *)nextVolume() ) { dep = nextVolume.GetDepth(); if (dep => skipLevel ) { volume->Mark(); if (!strcmp(volume->GetName(),"MUC1")) volume->SetVisibility(11); else volume->SetVisibility(0); viCounter++; if (!(viCounter%20000)) printf(" vis: vol. # %d / level %d \n", viCounter, dep); } else { volume->UnMark(); nonCounter++; volume->SetVisibility(2); } } printf(" visiable = %d, unvisible = %d ", viCounter, nonCounter); watch.Print(); watch->Start(); printf("\n"); const Int_t level2Convert = 4; TVolumeView view(*ATLS,level2Convert); watch.Print(); watch->Start(); TCanvas *atCanv = new TCanvas("atlas1st","1-st layer Atlas view",600,600); atCanv->Divide(2,2); Int_t padCnt = 0; atCanv->cd(++padCnt); view.Draw("1,1"); gPad->Update(); printf(" first layer: "); watch.Print(); watch->Start(); printf("\n"); atCanv->cd(++padCnt); view.Draw("2:2"); gPad->GetView()->Top(); printf(" second layer: "); watch.Print(); watch->Start(); atCanv->cd(++padCnt); view.Draw("3,3"); gPad->Update(); printf(" Third layer: "); watch.Print(); watch->Start(); printf("\n"); watch.Print(); watch->Start(); atCanv->cd(++padCnt); view.Draw("1-2"); gPad->Update(); printf(" First + Second layers: "); watch.Print(); watch->Start(); printf("\n"); printf(" Adding rulers and changing backgrounds\n"); for (Int_t ii=1;ii<=4;ii++){ atCanv->cd(ii); gPad->SetFillColor(kBlack); TAxis3D::ToggleRulers(gPad); gPad->Modified(); gPad->Update(); } watch.Print(); watch->Start(); printf("\n"); }