/home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/io/include/RAT/OutROOTProc.hh Source File

Ratpac-two: /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/io/include/RAT/OutROOTProc.hh Source File
Ratpac-two
OutROOTProc.hh
1 #ifndef __RATOutROOTProc___
2 #define __RATOutROOTProc___
3 
4 #include <RAT/DS/Run.hh>
5 #include <RAT/Processor.hh>
6 
7 class TFile;
8 class TTree;
9 
10 namespace RAT {
11 
12 class OutROOTProc : public Processor {
13  public:
14  static int run_num;
15  OutROOTProc();
16  virtual ~OutROOTProc();
17 
18  // file - string, name of file to open for output, file will be erased
19  // updatefile - string, name of file to append to
20  // (do not use both file and update file)
21  virtual void SetS(std::string param, std::string value);
22 
23  // autosave - integer, update root file every N kilobytes
24  // savetree 0 - Do not save the event tree. Must set *before* file or
25  // updatefile.
26  virtual void SetI(std::string param, int value);
27 
28  virtual Processor::Result DSEvent(DS::Root *ds);
29 
30  virtual bool OpenFile(std::string theFilename, bool update = false);
31  virtual std::string GetFilename() { return filename; };
32 
33  protected:
34  std::string default_filename;
35  std::string filename;
36  TFile *f;
37  TTree *tree;
38  TTree *runTree;
39  DS::Root *branchDS;
40  DS::Run *branchRun;
41  int autosave;
42  bool savetree;
43 };
44 
45 } // namespace RAT
46 
47 #endif
Definition: Root.hh:39
Definition: Run.hh:22
Definition: OutROOTProc.hh:12
virtual void SetI(std::string param, int value)
Definition: OutROOTProc.cc:116
virtual void SetS(std::string param, std::string value)
Definition: OutROOTProc.cc:101
virtual Processor::Result DSEvent(DS::Root *ds)
Definition: OutROOTProc.cc:179
Definition: Processor.hh:36
Result
Definition: Processor.hh:59
Definition: CCCrossSecMessenger.hh:29