00001
00002
00003
00004
00005
00006
00007
00008
00010 #include <cassert>
00011
00012 #include "GeoGeometry/GeoVolume.h"
00013 #include "MessageService/MsgService.h"
00014
00015 ClassImp(GeoVolume)
00016
00017 CVSID("$Id: GeoVolume.cxx,v 1.2 2009/02/28 21:46:13 gmieg Exp $");
00018
00019
00020 GeoVolume::GeoVolume(GeoGeometry* geo, const char* volname,
00021 const TGeoMedium* med) :
00022 TGeoVolume(volname,0,med),fGeoGeometry(geo),fShpName("") {
00023
00024
00025
00026 UpdateGlobalManager();
00027
00028 }
00029
00030
00031 TGeoShape* GeoVolume::GetExistingShape() const {
00032
00033
00034 UpdateGlobalManager();
00035
00036 TGeoShape* shape = 0;
00037 if ( gGeoManager ) {
00038 shape = dynamic_cast<TGeoShape*>(gGeoManager-> GetListOfShapes()
00039 -> FindObject(fShpName.c_str()));
00040 }
00041 else {
00042 MSG("Geo",Msg::kFatal) << "No global manager!" << endl;
00043 abort();
00044 }
00045
00046 return shape;
00047
00048 }