BAT  0.9.4
The Bayesian analysis toolkit
 All Classes Namespaces Functions Variables Enumerations
BCModelOutput.h
1 #ifndef __BCMODELOUTPUT__H
2 #define __BCMODELOUTPUT__H
3 
16 /*
17  * Copyright (C) 2007-2014, the BAT core developer team
18  * All rights reserved.
19  *
20  * For the licensing terms see doc/COPYING.
21  * For documentation see http://mpp.mpg.de/bat
22  */
23 
24 // ---------------------------------------------------------
25 
26 #include <vector>
27 
28 // BAT classes
29 class BCModel;
30 
31 // ROOT classes
32 class TTree;
33 class TFile;
34 class TObject;
35 
36 // ---------------------------------------------------------
37 
39 {
40  public:
41 
47  BCModelOutput();
48 
53  BCModelOutput(BCModel * model, const char * filenname);
54 
57  BCModelOutput(const BCModelOutput & modeloutput);
58 
61  virtual ~BCModelOutput();
62 
70  BCModelOutput & operator = (const BCModelOutput & modeloutput);
71 
80  TTree * GetAnalysisTree()
81  { return fAnalysisTree; };
82 
86  TFile * GetFile()
87  { return fOutputFile; };
88 
97  void SetModel(BCModel * model);
98 
99 
103  void SetFile(const char * filename);
104 
113  void WriteMarkovChain(bool flag = true);
114 
117  void FillAnalysisTree();
118 
122 
125  void Write(TObject * o);
126 
129  void Close();
130 
133  private:
134 
137  void Init();
138 
141  void Copy(BCModelOutput & modeloutput) const;
142 
145  void InitializeAnalysisTree();
146 
149  void InitializeSATree();
150 
153  TTree * fAnalysisTree;
154 
158  std::vector<TTree *> fMarkovChainTrees;
159 
162  TTree * fTreeSA;
163 
166  char * fFileName;
167 
170  TFile * fOutputFile;
171 
174  BCModel * fModel;
175 
178  int fIndex;
179  unsigned int fNParameters;
180  double fProbability_apriori;
181  double fProbability_aposteriori;
182  std::vector<double> fMode_global;
183  std::vector<double> fMode_marginalized;
184  std::vector<double> fMean_marginalized;
185  std::vector<double> fMedian_marginalized;
186  std::vector<double> fQuantile_05;
187  std::vector<double> fQuantile_10;
188  std::vector<double> fQuantile_16;
189  std::vector<double> fQuantile_84;
190  std::vector<double> fQuantile_90;
191  std::vector<double> fQuantile_95;
192 
193 };
194 
195 // ---------------------------------------------------------
196 
197 #endif
void SetFile(const char *filename)
TTree * GetAnalysisTree()
Definition: BCModelOutput.h:80
The base class for all user-defined models.
Definition: BCModel.h:50
void WriteMarginalizedDistributions()
void WriteMarkovChain(bool flag=true)
virtual ~BCModelOutput()
A class for creating an (ROOT) output file.
Definition: BCModelOutput.h:38
BCModelOutput & operator=(const BCModelOutput &modeloutput)
void SetModel(BCModel *model)
void Write(TObject *o)
void FillAnalysisTree()
TFile * GetFile()
Definition: BCModelOutput.h:86