// RooSentinel is a special purposes singleton class that terminates
// all other RooFit singleton services when the process exists. 
//
// All function RooFit singleton services are created on the heap with
// a static wrapper function to avoid the 'static initialization order fiasco'
// but are not automatically destroyed at the end of the session. This class
// installs an atexit() function that takes care of this
// END_HTML
#include "RooFit.h"
#include "RooSentinel.h"
#include "RooSentinel.h"
#include "RooMinuit.h"
#include "RooMsgService.h"
#include "RooNumIntConfig.h"
#include "RooNumIntFactory.h"
#include "RooNameReg.h"
#include "RooArgSet.h"
#include "RooRealConstant.h"
#include "RooResolutionModel.h"
#include "RooMath.h"
Bool_t RooSentinel::_active = kFALSE ;
static void CleanUpRooFitAtExit()
{
  
  RooMinuit::cleanup() ;
  RooMsgService::cleanup() ;
  RooNumIntConfig::cleanup() ;
  RooNumIntFactory::cleanup() ;
  RooNameReg::cleanup() ;
  RooArgSet::cleanup() ;
  RooRealConstant::cleanup() ;
  RooResolutionModel::cleanup() ;
  RooMath::cleanup() ;
}
void RooSentinel::activate()
{
  
  
  if (!_active) {
    _active = kTRUE ;
    atexit(CleanUpRooFitAtExit) ;
  }
}
 
Last change: Wed Jun 25 08:34:10 2008
Last generated: 2008-06-25 08:34
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.