20 RooStats::HistFactory::Data::Data() : fName(
"") {
24 RooStats::HistFactory::Data::Data( std::string HistoName, std::string InputFile,
25 std::string HistoPath ) :
26 fInputFile( InputFile ), fHistoName( HistoName ), fHistoPath( HistoPath ) {;}
28 TH1* RooStats::HistFactory::Data::GetHisto() {
29 return (TH1*) fhData.GetObject();
33 void RooStats::HistFactory::Data::Print( std::ostream& stream ) {
36 stream <<
"\t \t InputFile: " << fInputFile
37 <<
"\t HistoName: " << fHistoName
38 <<
"\t HistoPath: " << fHistoPath
39 <<
"\t HistoAddress: " << GetHisto()
44 void RooStats::HistFactory::Data::writeToFile( std::string OutputFileName, std::string DirName ) {
46 TH1* histData = GetHisto();
48 if( histData != NULL) {
55 fInputFile = OutputFileName;
56 fHistoName = histData->GetName();
64 void RooStats::HistFactory::Data::PrintXML( std::ostream& xml ) {
66 xml <<
" <Data HistoName=\"" << GetHistoName() <<
"\" "
67 <<
"InputFile=\"" << GetInputFile() <<
"\" "
68 <<
"HistoPath=\"" << GetHistoPath() <<
"\" "
69 <<
" /> " << std::endl << std::endl;