11 #ifndef HISTFACTORY_CHANNEL_H
12 #define HISTFACTORY_CHANNEL_H
24 namespace HistFactory {
30 friend class Measurement;
33 Channel(
const Channel& other);
34 Channel(std::string Name, std::string InputFile=
"");
37 void SetName(
const std::string& Name ) { fName = Name; }
39 std::string GetName() {
return fName; }
41 void SetInputFile(
const std::string& file ) { fInputFile = file; }
43 std::string GetInputFile() {
return fInputFile; }
45 void SetHistoPath(
const std::string& file ) { fHistoPath = file; }
47 std::string GetHistoPath() {
return fHistoPath; }
50 void SetData(
const RooStats::HistFactory::Data& data ) { fData = data; }
51 void SetData( std::string HistoName, std::string InputFile, std::string HistoPath=
"" );
52 void SetData(
double Val );
53 void SetData( TH1* hData );
55 RooStats::HistFactory::Data& GetData() {
return fData; }
58 void AddAdditionalData(
const RooStats::HistFactory::Data& data ) { fAdditionalData.push_back(data); }
60 std::vector<RooStats::HistFactory::Data>& GetAdditionalData() {
return fAdditionalData; }
62 void SetStatErrorConfig(
double RelErrorThreshold, Constraint::Type ConstraintType );
63 void SetStatErrorConfig(
double RelErrorThreshold, std::string ConstraintType );
65 void SetStatErrorConfig( RooStats::HistFactory::StatErrorConfig Config ) { fStatErrorConfig = Config; }
67 HistFactory::StatErrorConfig& GetStatErrorConfig() {
return fStatErrorConfig; }
69 void AddSample( RooStats::HistFactory::Sample sample );
71 std::vector< RooStats::HistFactory::Sample >& GetSamples() {
return fSamples; }
73 void Print(std::ostream& = std::cout);
74 void PrintXML( std::string Directory, std::string Prefix=
"" );
76 void CollectHistograms();
77 bool CheckHistograms();
82 std::string fInputFile;
83 std::string fHistoPath;
85 HistFactory::Data fData;
89 std::vector<RooStats::HistFactory::Data> fAdditionalData;
91 HistFactory::StatErrorConfig fStatErrorConfig;
93 std::vector< RooStats::HistFactory::Sample > fSamples;
96 TH1* GetHistogram( std::string InputFile, std::string HistoPath, std::string HistoName );
101 extern Channel BadChannel;