Logo ROOT   6.10/09
Reference Guide
HistRef.cxx
Go to the documentation of this file.
1 // @(#)root/roostats:$Id$
2 // Author: L. Moneta
3 /*************************************************************************
4  * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
5  * All rights reserved. *
6  * *
7  * For the licensing terms see $ROOTSYS/LICENSE. *
8  * For the list of contributors see $ROOTSYS/README/CREDITS. *
9  *************************************************************************/
10 
11 
12 #include "TH1.h"
14 
15 namespace RooStats{
16 namespace HistFactory {
17 
19  // implementation of method copying the contained pointer
20  // (just use Clone)
21  if (!h) return 0;
22  return (TH1*) h->Clone();
23  }
24 
26  if (h) delete h;
27  }
28 
29 }
30 }
31 
32 
TH1 * h
Definition: legend2.C:5
Namespace for the RooStats classes.
Definition: Asimov.h:20
static TH1 * CopyObject(TH1 *h)
Definition: HistRef.cxx:18
The TH1 histogram class.
Definition: TH1.h:56
TObject * Clone(const char *newname=0) const
Make a complete copy of the underlying object.
Definition: TH1.cxx:2544
static void DeleteObject(TH1 *h)
Definition: HistRef.cxx:25