00001 class StGeomBrowser;
00002 StGeomBrowser *geoBrowser=0;
00003
00004 void GeomDrawUsage() {
00005 printf("\n");
00006 printf("Usage: root4star \'GeomBrowse.C(const char *geomDescriptor\"complete\")\' \n");
00007 printf("----- where \"geomDescriptor\" can be either \n");
00008 printf(" 1. STAR geometry version like \"year2003\" (see: http://www.star.bnl.gov/STAR/comp/prod/MCGeometry.html) \n");
00009 printf(" example: root4star \'GeomDraw.C(\"year2003\")\'\n");
00010 printf("\n");
00011 printf(" 2. ROOT macros that instantiates the geometry object\n");
00012 printf(" example: root4star \'GeomDraw.C(\"$STAR/StarDb/VmcGeometry/Geometry.year2000.C\")\'\n");
00013 printf("\n");
00014 printf(" 3. ROOT file that contains the geometry object\n");
00015 printf(" example: root4star \'GeomDraw.C(\"Geometry.root\")\'\n");
00016 printf("\n");
00017 printf(" 4. the proper ZEBRA fz file, for example \n");
00018 printf(" example: root4star \'GeomDraw.C(\"/star/u/potekhin/gstardata/y2003x_complete.fz \")\'\n\n");
00019 printf("---------------\n");
00020 printf("One always can select the geometry from the \"file menu\" of the GUI interface later on too\n");
00021 printf("\n");
00022 printf("---------------\n");
00023 printf("\n$Id: GeomBrowse.C,v 1.15 2010/05/27 17:03:56 fine Exp $\n");
00024 }
00025
00026 StGeomBrowser *GeomBrowse(const char *fzFile="y2009")
00027 {
00028 GeomDrawUsage();
00029
00030
00031 gSystem->Load("St_base");
00032 gSystem->Load("StChain");
00033 gSystem->Load("St_Tables");
00034 gSystem->Load("St_g2t.so");
00035 gSystem->Load("StarMagField");
00036 gSystem->Load("St_geant_Maker");
00037 gSystem->Load("StUtilities");
00038 gSystem->Load("StarClassLibrary");
00039 gSystem->Load("StEvent");
00040 gSystem->Load("StEventUtilities");
00041 gSystem->Load("St_geom_Maker");
00042 StGeomBrowser *a = new StGeomBrowser;
00043 a->SetFile(fzFile);
00044 a->SetSize(360,600);
00045 a->Show();
00046 geoBrowser = a;
00047
00048 return geoBrowser;
00049 }