StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
GeomBrowse.C
1 class StGeomBrowser;
2 StGeomBrowser *geoBrowser=0;
3 //_________________________________________________________________________________________________________________
4 void GeomDrawUsage() {
5  printf("\n");
6  printf("Usage: root4star \'GeomBrowse.C(const char *geomDescriptor\"complete\")\' \n");
7  printf("----- where \"geomDescriptor\" can be either \n");
8  printf(" 1. STAR geometry version like \"year2003\" (see: http://www.star.bnl.gov/STAR/comp/prod/MCGeometry.html) \n");
9  printf(" example: root4star \'GeomDraw.C(\"year2003\")\'\n");
10  printf("\n");
11  printf(" 2. ROOT macros that instantiates the geometry object\n");
12  printf(" example: root4star \'GeomDraw.C(\"$STAR/StarDb/VmcGeometry/Geometry.year2000.C\")\'\n");
13  printf("\n");
14  printf(" 3. ROOT file that contains the geometry object\n");
15  printf(" example: root4star \'GeomDraw.C(\"Geometry.root\")\'\n");
16  printf("\n");
17  printf(" 4. the proper ZEBRA fz file, for example \n");
18  printf(" example: root4star \'GeomDraw.C(\"/star/u/potekhin/gstardata/y2003x_complete.fz \")\'\n\n");
19  printf("---------------\n");
20  printf("One always can select the geometry from the \"file menu\" of the GUI interface later on too\n");
21  printf("\n");
22  printf("---------------\n");
23  printf("\n$Id: GeomBrowse.C,v 1.17 2021/03/20 02:38:13 genevb Exp $\n");
24 }
25 //_____________________________________________________________________________________________________________
26 StGeomBrowser *GeomBrowse(const char *fzFile="y2009")
27 {
28  GeomDrawUsage();
29  // gSystem->Load("libGeomBrowser");
30 
31  gSystem->Load("St_base");
32  gSystem->Load("StChain");
33  gSystem->Load("St_Tables");
34  gSystem->Load("St_g2t.so");
35  gSystem->Load("StarMagField");
36  gSystem->Load("St_geant_Maker");
37  gSystem->Load("StUtilities");
38  gSystem->Load("StarClassLibrary");
39  gSystem->Load("StEvent");
40  gSystem->Load("StEventUtilities");
41  gSystem->Load("St_geom_Maker");
42  StGeomBrowser *a = new StGeomBrowser;
43  a->SetFile(fzFile);
44  a->SetSize(360,600);
45  a->Show();
46  geoBrowser = a;
47 
48  return geoBrowser;
49 }