23 void StarFromWeb(
const char *geomFile =
"/afs/rhic.bnl.gov/star/users/fine/WWW/star_year_2a.root")
33 cout <<
" Loading share library" << endl;
35 if (strcmp(gSystem->GetName(),
"WinNT") == 0 ) NT=kTRUE;
36 if (NT) gSystem->Load(
"Table");
37 else gSystem->Load(
"libTable");
38 if (!gGeometry)
new TGeometry;
42 cout <<
" Creating an empty TCanvas object to draw in" << endl;
43 TCanvas &starCanvas = *(
new TCanvas(
"STAR",
"Star",400,600));
47 starCanvas.Divide(PadColumns,PadRows);
50 cout <<
" Open the remote Web file with STAR geometry database in ROOT format" << endl;
54 cout <<
" Reading STAR geometry database (the full size of this database 28K bytes - ROOT-object" << endl;
56 volume.
Cd(
"HALL/CAVE");
58 const Char_t *parts[] = {
"TPCE"
62 const Int_t numParts =
sizeof(parts)/
sizeof(
void *);
63 cout << numParts <<
" different parts of the STAR detector will be built" << endl;
65 for (Int_t i =0; i< numParts; i++) {
66 const Char_t *part = parts[i];
67 cout <<
"Drawing \"" << part <<
"\"" << endl;
71 else printf(
" Volume \"%s\" was not found\n", part);
76 cout <<
" Plot 3D view of the " << ThreeDPart <<
" part: " << parts[ThreeDPart-1] << endl <<
77 " Note: Under Windows NT OpenGL will be used by default instead x3d for UNIX" << endl <<
78 " ================================================================" << endl <<
79 " Select x3d windows and type \"m\" in there to get x3d HELP windows" << endl <<
80 " ================================================================" << endl <<
81 " DON NOT FORGET to type \"q\" letter to terminate x3d widget and" << endl <<
82 " to continue this session" << endl <<
83 " ================================================================" << endl;
84 starCanvas.cd(ThreeDPart);
87 cout <<
"Drawing ROOT TBrowser" << endl;
88 new TBrowser(
"STAR",HALL);
89 cout <<
"Now. Try yourself:" << endl <<
90 " 1. Select any STAR geometry TVolume object with \"double-left-mouse click\" on the TVolumePosition" << endl <<
91 " TVolume object has no \";<n>\" in its name." << endl <<
92 " The objects with trail \";<n>\" are TVolumePosition ones" << endl <<
93 " 2. Pop the context menu up with \"right-mouse click\" on the ROOT browser" << endl <<
94 " 3. Select \"Draw\" position" << endl <<
95 " 4. Click OK" << endl;
96 cout <<
" Get this macro form $(STAR)/StRoot/macro/StarFromWeb.C and customize it for fun" << endl;
virtual TDataSet * Cd(const Char_t *dirname)
virtual void Draw(Option_t *depth="3")