ROOT
master
Reference Guide
Loading...
Searching...
No Matches
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
/** \class RooStats::HistFactory::HistRef
12
* \ingroup HistFactory
13
* Internal class wrapping an histogram and managing its content.
14
* convenient for dealing with histogram pointers in the
15
* HistFactory class
16
*/
17
18
#include "
RooStats/HistFactory/HistRef.h
"
19
20
#include "
TH1.h
"
21
#include "
TDirectory.h
"
22
23
namespace
RooStats
{
24
namespace
HistFactory
{
25
26
TH1
*
HistRef::CopyObject
(
const
TH1
*
h
) {
27
// implementation of method copying the contained pointer
28
// (just use Clone)
29
if
(!
h
)
return
nullptr
;
30
31
TDirectory::TContext
ctx{
nullptr
};
// Don't associate histogram with currently open file
32
return
static_cast<
TH1
*
>
(
h
->Clone());
33
}
34
}
35
}
36
37
HistRef.h
h
#define h(i)
Definition
RSha256.hxx:106
TDirectory.h
TH1.h
RooStats::HistFactory::HistRef::CopyObject
static TH1 * CopyObject(const TH1 *h)
Definition
HistRef.cxx:26
TDirectory::TContext
TDirectory::TContext keeps track and restore the current directory.
Definition
TDirectory.h:89
TH1
TH1 is the base class of all histogram classes in ROOT.
Definition
TH1.h:108
RooFit::HistFactory
@ HistFactory
Definition
RooGlobalFunc.h:66
RooStats
Namespace for the RooStats classes.
Definition
CodegenImpl.h:59
roofit
histfactory
src
HistRef.cxx
ROOT master - Reference Guide Generated on Sat Jun 14 2025 04:33:08 (GVA Time) using Doxygen 1.10.0