travex
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RootFile.h
Go to the documentation of this file.
1 #ifndef RootFile_h
2 #define RootFile_h
3 
4 #include <map>
5 #include <string>
6 
7 #include "TFile.h"
8 
10 #include "travex/HistContainer.h"
11 
12 
13 namespace tvx {
14 
15 typedef std::map<std::string, HistContainer*> HistContainers;
16 
17 
25 class RootFile : public TFile
26 {
27 public:
28 
29  RootFile(ProgramOptions& prgOpts, Option_t* option="", const char* ftitle="", Int_t compress=1);
30 
31  void FillDerivedHists();
33 
34  virtual void Close(Option_t *option="");
35  void SaveAllAs(std::string prefix="./");
36 
37 protected:
38 
40  HistContainers fDirs;
41 
44 };
45 
46 }
47 
48 #endif
RootFile(ProgramOptions &prgOpts, Option_t *option="", const char *ftitle="", Int_t compress=1)
Definition: RootFile.cxx:16
Definition: Event.h:12
Processes and controls user options provided in the command line.
A basic extention of the ROOT's TFile class to manage a set of user defined histogram containers (or ...
Definition: RootFile.h:25
const ProgramOptions & GetPrgOptions()
Definition: RootFile.h:32
std::map< std::string, HistContainer * > HistContainers
Definition: RootFile.h:15
void SaveAllAs(std::string prefix="./")
Definition: RootFile.cxx:61
HistContainers fDirs
A string-to-HistContainer map for convenient access to enclosed directories.
Definition: RootFile.h:40
void FillDerivedHists()
For each histogram container calls the method of the same name in order to produce new histograms fro...
Definition: RootFile.cxx:33
ProgramOptions & fPrgOptions
Command line arguments and options requested by the user.
Definition: RootFile.h:43
virtual void Close(Option_t *option="")
Definition: RootFile.cxx:51