ROOT
Version v6.34
master
v6.32
v6.30
v6.28
v6.26
v6.24
v6.22
v6.20
v6.18
v6.16
v6.14
v6.12
v6.10
v6.08
v6.06
Reference Guide
▼
ROOT
ROOT Reference Documentation
Tutorials
►
Functional Parts
►
Namespaces
►
All Classes
▼
Files
▼
File List
►
bindings
►
core
►
documentation
►
geom
►
graf2d
►
graf3d
►
gui
►
hist
►
html
►
io
►
main
►
math
►
montecarlo
►
net
►
proof
▼
roofit
►
batchcompute
►
doc
▼
histfactory
doc
►
inc
▼
src
Asimov.cxx
Channel.cxx
ConfigParser.cxx
Data.cxx
FlexibleInterpVar.cxx
►
hist2workspace.cxx
►
HistFactoryImpl.cxx
►
HistFactoryModelUtils.cxx
HistFactoryNavigation.cxx
►
HistoToWorkspaceFactoryFast.cxx
HistRef.cxx
LinInterpVar.cxx
►
MakeModelAndMeasurementsFast.cxx
Measurement.cxx
ParamHistFunc.cxx
PiecewiseInterpolation.cxx
PreprocessFunction.cxx
RooBarlowBeestonLL.cxx
Sample.cxx
Systematics.cxx
►
hs3
►
jsoninterface
►
multiprocess
►
roofit
►
roofitcore
►
roofitmore
►
roofitZMQ
►
roostats
►
xroofit
►
sql
►
tmva
►
tree
►
tutorials
►
v6-34-00-patches
►
File Members
Release Notes
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
Data.cxx
Go to the documentation of this file.
1
// @(#)root/roostats:$Id$
2
// Author: Kyle Cranmer, George Lewis
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
/** \class RooStats::HistFactory::Data
13
* \ingroup HistFactory
14
*/
15
16
17
#include "
RooStats/HistFactory/Data.h
"
18
19
20
RooStats::HistFactory::Data::Data
( std::string
HistoName
, std::string
InputFile
,
21
std::string
HistoPath
) :
22
fInputFile(
InputFile
), fHistoName(
HistoName
), fHistoPath(
HistoPath
) {;}
23
24
TH1
*
RooStats::HistFactory::Data::GetHisto
() {
25
return
(
TH1
*) fhData.GetObject();
26
}
27
28
const
TH1
*
RooStats::HistFactory::Data::GetHisto
()
const
{
29
return
(
TH1
*) fhData.GetObject();
30
}
31
32
33
void
RooStats::HistFactory::Data::Print
( std::ostream& stream ) {
34
35
36
stream <<
"\t \t InputFile: "
<< fInputFile
37
<<
"\t HistoName: "
<< fHistoName
38
<<
"\t HistoPath: "
<< fHistoPath
39
<<
"\t HistoAddress: "
<< GetHisto()
40
<< std::endl;
41
42
}
43
44
void
RooStats::HistFactory::Data::writeToFile
( std::string
OutputFileName
, std::string DirName ) {
45
46
TH1
*
histData
= GetHisto();
47
48
if
(
histData
!=
nullptr
) {
49
50
histData
->Write();
51
52
// Set the location of the data
53
// in the output measurement
54
55
fInputFile =
OutputFileName
;
56
fHistoName =
histData
->GetName();
57
fHistoPath = DirName;
58
59
}
60
61
}
62
63
64
void
RooStats::HistFactory::Data::PrintXML
( std::ostream&
xml
)
const
{
65
66
xml
<<
" <Data HistoName=\""
<< GetHistoName() <<
"\" "
67
<<
"InputFile=\""
<< GetInputFile() <<
"\" "
68
<<
"HistoPath=\""
<< GetHistoPath() <<
"\" "
;
69
if
(!GetName().empty()) {
70
xml
<<
"Name=\""
<< GetName() <<
"\" "
;
71
}
72
xml
<<
" /> "
<< std::endl << std::endl;
73
74
}
Data.h
TRangeDynCast
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Definition
TCollection.h:358
ROOT::Detail::TRangeCast
Definition
TCollection.h:311
RooStats::HistFactory::Data::GetHisto
TH1 * GetHisto()
Definition
Data.cxx:24
RooStats::HistFactory::Data::Print
void Print(std::ostream &=std::cout)
Definition
Data.cxx:33
RooStats::HistFactory::Data::PrintXML
void PrintXML(std::ostream &) const
Definition
Data.cxx:64
RooStats::HistFactory::Data::Data
Data()
Definition
Data.h:29
RooStats::HistFactory::Data::writeToFile
void writeToFile(std::string FileName, std::string DirName)
Definition
Data.cxx:44
TH1
TH1 is the base class of all histogram classes in ROOT.
Definition
TH1.h:59
roofit
histfactory
src
Data.cxx
ROOT tags/6-34-04 - Reference Guide Generated on Thu Mar 20 2025 15:06:49 (GVA Time) using Doxygen 1.10.0