Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
Data.h
Go to the documentation of this file.
1// @(#)root/roostats:$Id$
2// Author: George Lewis, Kyle Cranmer
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#ifndef HISTFACTORY_DATA_H
12#define HISTFACTORY_DATA_H
13
14#include <string>
15#include <fstream>
16#include <iostream>
17
18//#include "RooStats/HistFactory/HistCollector.h"
20
21namespace RooStats{
22namespace HistFactory {
23
24class Data {
25
26public:
27 //friend class Channel;
28
29 Data() {}
30 /// constructor from name, file and path. Name of the histogram should not include the path
31 Data( std::string HistoName, std::string InputFile, std::string HistoPath="" );
32
33 std::string const& GetName() const { return fName; }
34 void SetName(const std::string& name) { fName=name; }
35
36 void SetInputFile(const std::string& InputFile) { fInputFile = InputFile; }
37 std::string const& GetInputFile() const { return fInputFile; }
38
39 void SetHistoName(const std::string& HistoName) { fHistoName = HistoName; }
40 std::string const& GetHistoName() const { return fHistoName; }
41
42 void SetHistoPath(const std::string& HistoPath) { fHistoPath = HistoPath; }
43 std::string const& GetHistoPath() const { return fHistoPath; }
44
45 void Print(std::ostream& = std::cout);
46 void PrintXML( std::ostream& ) const;
47 void writeToFile( std::string FileName, std::string DirName );
48
49 TH1* GetHisto();
50 const TH1* GetHisto() const;
51 void SetHisto(TH1* Hist) { fhData = Hist; fHistoName=Hist->GetName(); }
52
53protected:
54
55 std::string fName;
56
57 std::string fInputFile;
58 std::string fHistoName;
59 std::string fHistoPath;
60
61
62 // The Data Histogram
64
65
66};
67
68}
69}
70
71
72#endif
char name[80]
Definition TGX11.cxx:110
void Print(std::ostream &=std::cout)
Definition Data.cxx:33
std::string fInputFile
Definition Data.h:57
void SetHisto(TH1 *Hist)
Definition Data.h:51
std::string const & GetInputFile() const
Definition Data.h:37
void PrintXML(std::ostream &) const
Definition Data.cxx:64
void SetInputFile(const std::string &InputFile)
Definition Data.h:36
void SetHistoPath(const std::string &HistoPath)
Definition Data.h:42
void writeToFile(std::string FileName, std::string DirName)
Definition Data.cxx:44
void SetName(const std::string &name)
Definition Data.h:34
std::string const & GetHistoName() const
Definition Data.h:40
void SetHistoName(const std::string &HistoName)
Definition Data.h:39
std::string fHistoPath
Definition Data.h:59
std::string const & GetHistoPath() const
Definition Data.h:43
std::string const & GetName() const
Definition Data.h:33
std::string fHistoName
Definition Data.h:58
Internal class wrapping an histogram and managing its content.
Definition HistRef.h:25
TH1 is the base class of all histogram classes in ROOT.
Definition TH1.h:58
const char * GetName() const override
Returns name of object.
Definition TNamed.h:47
Namespace for the RooStats classes.
Definition Asimov.h:19