00001 /***************************************************************************** 00002 * Project: RooFit * 00003 * Package: RooFitCore * 00004 * File: $Id: RooTrace.h,v 1.16 2007/05/11 09:11:30 verkerke Exp $ 00005 * Authors: * 00006 * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu * 00007 * DK, David Kirkby, UC Irvine, dkirkby@uci.edu * 00008 * * 00009 * Copyright (c) 2000-2005, Regents of the University of California * 00010 * and Stanford University. All rights reserved. * 00011 * * 00012 * Redistribution and use in source and binary forms, * 00013 * with or without modification, are permitted according to the terms * 00014 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) * 00015 *****************************************************************************/ 00016 #ifndef ROO_TRACE 00017 #define ROO_TRACE 00018 00019 #include <assert.h> 00020 #include "Riosfwd.h" 00021 #include "RooLinkedList.h" 00022 00023 class RooTrace { 00024 public: 00025 00026 virtual ~RooTrace() {} ; 00027 00028 static void create(const TObject* obj) ; 00029 static void destroy(const TObject* obj) ; 00030 00031 static void active(Bool_t flag) ; 00032 static void verbose(Bool_t flag) ; 00033 00034 static void dump() ; 00035 static void dump(ostream& os, Bool_t sinceMarked=kFALSE) ; 00036 static void mark() ; 00037 00038 protected: 00039 00040 static void create2(const TObject* obj) ; 00041 static void destroy2(const TObject* obj) ; 00042 00043 void addPad(const TObject* ref, Bool_t doPad) ; 00044 Bool_t removePad(const TObject* ref) ; 00045 00046 static Bool_t _active ; 00047 static Bool_t _verbose ; 00048 00049 static RooLinkedList _list ; 00050 static RooLinkedList _markList ; 00051 00052 ClassDef(RooTrace,0) // Memory tracer utility for RooFit objects 00053 }; 00054 00055 00056 #endif