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 
21 namespace RooStats{
22 namespace HistFactory {
23 
24 class Data {
25 
26 public:
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() 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 GetInputFile() const { return fInputFile; }
38 
39  void SetHistoName(const std::string& HistoName) { fHistoName = HistoName; }
40  std::string GetHistoName() const { return fHistoName; }
41 
42  void SetHistoPath(const std::string& HistoPath) { fHistoPath = HistoPath; }
43  std::string GetHistoPath() const { 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  const TH1* GetHisto() const;
51  void SetHisto(TH1* Hist) { fhData = Hist; fHistoName=Hist->GetName(); }
52 
53 protected:
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
RooStats::HistFactory::Data::SetHistoName
void SetHistoName(const std::string &HistoName)
Definition: Data.h:39
RooStats::HistFactory::Data::GetInputFile
std::string GetInputFile() const
Definition: Data.h:37
RooStats::HistFactory::Data::PrintXML
void PrintXML(std::ostream &)
Definition: Data.cxx:68
RooStats::HistFactory::Data::GetName
std::string GetName() const
Definition: Data.h:33
RooStats::HistFactory::Data::writeToFile
void writeToFile(std::string FileName, std::string DirName)
Definition: Data.cxx:48
RooFit::HistFactory
@ HistFactory
Definition: RooGlobalFunc.h:62
RooStats::HistFactory::HistRef
Internal class wrapping an histogram and managing its content.
Definition: HistRef.h:25
RooStats::HistFactory::Data::Print
void Print(std::ostream &=std::cout)
Definition: Data.cxx:37
RooStats::HistFactory::Data::SetName
void SetName(const std::string &name)
Definition: Data.h:34
RooStats::HistFactory::Data::fHistoPath
std::string fHistoPath
Definition: Data.h:59
RooStats::HistFactory::Data::fhData
HistRef fhData
Definition: Data.h:63
RooStats::HistFactory::Data::fHistoName
std::string fHistoName
Definition: Data.h:58
RooStats::HistFactory::Data::fName
std::string fName
Definition: Data.h:55
RooStats::HistFactory::Data::SetHisto
void SetHisto(TH1 *Hist)
Definition: Data.h:51
RooStats::HistFactory::Data::GetHistoName
std::string GetHistoName() const
Definition: Data.h:40
RooStats::HistFactory::Data::SetInputFile
void SetInputFile(const std::string &InputFile)
Definition: Data.h:36
RooStats::HistFactory::Data::GetHisto
TH1 * GetHisto()
Definition: Data.cxx:28
RooStats::HistFactory::Data::Data
Data()
Definition: Data.cxx:20
RooStats
Namespace for the RooStats classes.
Definition: Asimov.h:19
RooStats::HistFactory::Data::GetHistoPath
std::string GetHistoPath() const
Definition: Data.h:43
TH1
TH1 is the base class of all histogram classes in ROOT.
Definition: TH1.h:58
name
char name[80]
Definition: TGX11.cxx:110
RooStats::HistFactory::Data::SetHistoPath
void SetHistoPath(const std::string &HistoPath)
Definition: Data.h:42
RooStats::HistFactory::Data::fInputFile
std::string fInputFile
Definition: Data.h:57
TNamed::GetName
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:47
RooStats::HistFactory::Data
Definition: Data.h:24
Sample.h