/[PAMELA software]/trieste/pamVMC/include/PamRootManager.h
ViewVC logotype

Annotation of /trieste/pamVMC/include/PamRootManager.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Wed Mar 4 12:51:11 2009 UTC (15 years, 9 months ago) by pamelats
Branch point for: MAIN, pamVMC
File MIME type: text/plain
Initial revision

1 pamelats 1.1 #ifndef PAM_ROOT_MANAGER_H
2     #define PAM_ROOT_MANAGER_H
3    
4     #include <TObject.h>
5     #include <TTree.h>
6     #include <TFile.h>
7     #include <TDirectoryFile.h>
8    
9     class TParticle;
10    
11     enum FileMode { kRead, kWrite};
12    
13     class PamRootManager : public TObject
14     {
15     public:
16     PamRootManager(const char* projectName, FileMode fileMode);
17     PamRootManager();
18     virtual ~PamRootManager();
19    
20     // static access method
21     static PamRootManager* Instance();
22    
23     // methods
24     void Register(const char* name, const char* className, void* objAddress);
25     void Fill();
26     void WriteAll();
27     void ReadEvent(Int_t i);
28    
29     private:
30     // data members
31     static PamRootManager* fgInstance; //Singleton instance
32    
33     // data members
34     TDirectory * fDirectory; // directory to store root-file
35     TFile* fFile;
36     TTree* fTree;
37    
38     ClassDef(PamRootManager,0) // Root IO manager
39     };
40    
41     #endif //PAM_ROOT_MANAGER_H
42    
43    

  ViewVC Help
Powered by ViewVC 1.1.23