Logo ROOT  
Reference Guide
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 GetName() { return fName; }
34 void SetName(const std::string& name) { fName=name; }
35
36 void SetInputFile(const std::string& InputFile) { fInputFile = InputFile; }
37 std::string GetInputFile() { return fInputFile; }
38
39 void SetHistoName(const std::string& HistoName) { fHistoName = HistoName; }
40 std::string GetHistoName() { return fHistoName; }
41
42 void SetHistoPath(const std::string& HistoPath) { fHistoPath = HistoPath; }
43 std::string GetHistoPath() { return fHistoPath; }
44
45 void Print(std::ostream& = std::cout);
46 void PrintXML( std::ostream& );
47 void writeToFile( std::string FileName, std::string DirName );
48
49 TH1* GetHisto();
50 void SetHisto(TH1* Hist) { fhData = Hist; fHistoName=Hist->GetName(); }
51
52protected:
53
54 std::string fName;
55
56 std::string fInputFile;
57 std::string fHistoName;
58 std::string fHistoPath;
59
60
61 // The Data Histogram
63
64
65};
66
67}
68}
69
70
71#endif
char name[80]
Definition: TGX11.cxx:109
void PrintXML(std::ostream &)
Definition: Data.cxx:64
void Print(std::ostream &=std::cout)
Definition: Data.cxx:33
std::string fInputFile
Definition: Data.h:56
std::string fName
Definition: Data.h:54
void SetHisto(TH1 *Hist)
Definition: Data.h:50
std::string GetName()
Definition: Data.h:33
void SetInputFile(const std::string &InputFile)
Definition: Data.h:36
std::string GetInputFile()
Definition: Data.h:37
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 GetHistoName()
Definition: Data.h:40
void SetHistoName(const std::string &HistoName)
Definition: Data.h:39
std::string fHistoPath
Definition: Data.h:58
std::string GetHistoPath()
Definition: Data.h:43
std::string fHistoName
Definition: Data.h:57
Internal class wrapping an histogram and managing its content.
Definition: HistRef.h:25
The TH1 histogram class.
Definition: TH1.h:56
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:47
@ HistFactory
Definition: RooGlobalFunc.h:69
Namespace for the RooStats classes.
Definition: Asimov.h:19