Logo ROOT  
Reference Guide
rf507_debugtools.C File Reference

Detailed Description

View in nbviewer Open in SWAN

Organization and simultaneous fits: RooFit memory tracing debug tool

RooFit v3.60 -- Developed by Wouter Verkerke and David Kirkby
Copyright (C) 2000-2013 NIKHEF, University of California & Stanford University
All rights reserved, please read http://roofit.sourceforge.net/license.txt
List of RooFit objects allocated while trace active:
Grand total memory = 0.00 Mb
#include "RooRealVar.h"
#include "RooDataSet.h"
#include "RooGaussian.h"
#include "RooConstVar.h"
#include "RooPolynomial.h"
#include "RooAddPdf.h"
#include "TCanvas.h"
#include "TAxis.h"
#include "RooPlot.h"
#include "RooTrace.h"
using namespace RooFit;
{
// Activate RooFit memory tracing
// Construct gauss(x,m,s)
RooRealVar x("x", "x", -10, 10);
RooRealVar m("m", "m", 0, -10, 10);
RooRealVar s("s", "s", 1, -10, 10);
RooGaussian gauss("g", "g", x, m, s);
// Show dump of all RooFit object in memory
// Activate verbose mode
// Construct poly(x,p0)
RooRealVar p0("p0", "p0", 0.01, 0., 1.);
RooPolynomial poly("p", "p", x, p0);
// Put marker in trace list for future reference
// Construct model = f*gauss(x) + (1-f)*poly(x)
RooRealVar f("f", "f", 0.5, 0., 1.);
RooAddPdf model("model", "model", RooArgSet(gauss, poly), f);
// Show object added to memory since marker
// Since verbose mode is still on, you will see messages
// pertaining to destructor calls of all RooFit objects
// made in this macro
//
// A call to RooTrace::dump() at the end of this macro
// should show that there a no RooFit object left in memory
}
Date
07/2008
Author
Wouter Verkerke

Definition in file rf507_debugtools.C.

m
auto * m
Definition: textangle.C:8
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
RooAddPdf
Definition: RooAddPdf.h:32
f
#define f(i)
Definition: RSha256.hxx:122
RooGaussian.h
TGeant4Unit::s
static constexpr double s
Definition: TGeant4SystemOfUnits.h:168
x
Double_t x[n]
Definition: legend1.C:17
RooGaussian
Definition: RooGaussian.h:25
RooTrace::active
static void active(Bool_t flag)
If flag is true, memory tracing is activated.
Definition: RooTrace.cxx:133
RooAddPdf.h
TCanvas.h
RooTrace::mark
static void mark()
Put marker in object list, that allows to dump contents of list relative to this marker.
Definition: RooTrace.cxx:206
RooDataSet.h
RooPolynomial.h
RooTrace.h
TGeant4Unit::gauss
static constexpr double gauss
Definition: TGeant4SystemOfUnits.h:269
RooFit
Definition: RooCFunction1Binding.h:29
RooPolynomial
Definition: RooPolynomial.h:28
RooPlot.h
rf507_debugtools
Definition: rf507_debugtools.py:1
RooRealVar.h
RooConstVar.h
RooTrace::printObjectCounts
static void printObjectCounts()
Definition: RooTrace.cxx:264
TAxis.h
RooTrace::verbose
static void verbose(Bool_t flag)
If flag is true, a message will be printed at each object creation or deletion.
Definition: RooTrace.cxx:143
make_cnn_model.model
model
Definition: make_cnn_model.py:6
RooRealVar
Definition: RooRealVar.h:35
RooTrace::dump
static void dump()
Dump contents of object registry to stdout.
Definition: RooTrace.cxx:227
RooArgSet
Definition: RooArgSet.h:28