TVirtualMCApplication.cxx

Go to the documentation of this file.
00001 // @(#)root/vmc:$Id: TVirtualMCApplication.cxx 20882 2007-11-19 11:31:26Z rdm $
00002 // Author: Ivana Hrivnacova, 27/03/2002
00003 
00004 /*************************************************************************
00005  * Copyright (C) 2006, Rene Brun and Fons Rademakers.                    *
00006  * Copyright (C) 2002, ALICE Experiment at CERN.                         *
00007  * All rights reserved.                                                  *
00008  *                                                                       *
00009  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00010  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00011  *************************************************************************/
00012 
00013 #include "TVirtualMCApplication.h"
00014 #include "TError.h"
00015 
00016 //______________________________________________________________________________
00017 //
00018 // Interface to a user Monte Carlo application.
00019 //______________________________________________________________________________
00020 
00021 ClassImp(TVirtualMCApplication)
00022 
00023 TVirtualMCApplication* TVirtualMCApplication::fgInstance = 0;
00024 
00025 //_____________________________________________________________________________
00026 TVirtualMCApplication::TVirtualMCApplication(const char *name,
00027                                              const char *title)
00028   : TNamed(name,title)
00029 {
00030 //
00031 // Standard constructor
00032 //
00033 
00034    if (fgInstance) {
00035       Fatal("TVirtualMCApplication",
00036             "Attempt to create two instances of singleton.");
00037    }
00038 
00039    fgInstance = this;
00040 }
00041 
00042 //_____________________________________________________________________________
00043 TVirtualMCApplication::TVirtualMCApplication()
00044   : TNamed()
00045 {
00046    //
00047    // Default constructor
00048    //
00049    fgInstance = this;
00050 }
00051 
00052 //_____________________________________________________________________________
00053 TVirtualMCApplication::~TVirtualMCApplication()
00054 {
00055    //
00056    // Destructor
00057    //
00058 
00059    fgInstance = 0;
00060 }
00061 
00062 //_____________________________________________________________________________
00063 TVirtualMCApplication* TVirtualMCApplication::Instance()
00064 {
00065    //
00066    // Static access method
00067    //
00068 
00069    return fgInstance;
00070 }
00071 

Generated on Tue Jul 5 14:45:27 2011 for ROOT_528-00b_version by  doxygen 1.5.1