BayesianAnalysisToolkit  0.9.3
BCModelOutput.h
Go to the documentation of this file.
1 #ifndef __BCMODELOUTPUT__H
2 #define __BCMODELOUTPUT__H
3 
16 /*
17  * Copyright (C) 2007-2013, 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 const int MAXNPARAMETERS = 20;
37 
38 // ---------------------------------------------------------
39 
41 {
42  public:
43 
49  BCModelOutput();
50 
55  BCModelOutput(BCModel * model, const char * filenname);
56 
59  BCModelOutput(const BCModelOutput & modeloutput);
60 
63  virtual ~BCModelOutput();
64 
72  BCModelOutput & operator = (const BCModelOutput & modeloutput);
73 
82  TTree * GetAnalysisTree()
83  { return fAnalysisTree; };
84 
88  TFile * GetFile()
89  { return fOutputFile; };
90 
99  void SetModel(BCModel * model);
100 
101 
105  void SetFile(const char * filename);
106 
115  void WriteMarkovChain(bool flag = true);
116 
119  void FillAnalysisTree();
120 
124 
127  void Write(TObject * o);
128 
131  void Close();
132 
135  private:
136 
139  void Init();
140 
143  void Copy(BCModelOutput & modeloutput) const;
144 
147  void InitializeAnalysisTree();
148 
151  void InitializeSATree();
152 
155  TTree * fAnalysisTree;
156 
160  std::vector<TTree *> fMarkovChainTrees;
161 
164  TTree * fTreeSA;
165 
168  char * fFileName;
169 
172  TFile * fOutputFile;
173 
177 
180  int fIndex;
181  unsigned int fNParameters;
194 
195 };
196 
197 // ---------------------------------------------------------
198 
199 #endif