Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
DbgIOManager.h
1/*
2 * DbgIOManager.h
3 *
4 * Created on: 28 maj 2022
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 */
9#ifndef HAL_EXAMPLES_ONTHEFLY_DBGIOMANAGER_H_
10#define HAL_EXAMPLES_ONTHEFLY_DBGIOMANAGER_H_
11
12#include "IOManager.h"
13#include <vector>
14
15#include <RtypesCore.h>
16#include <TString.h>
17
18class TTree;
19class TBranch;
20namespace HalDbg {
21 class IOManager : public Hal::IOManager {
22 TString fInFileName;
23 TString fOutFileName;
24 TString fOutTreeName;
25 Int_t fEntries;
26 TFile* fInFile;
27 TFile* fOutFile;
28 TTree* fOutTree;
29
30 protected:
31 void RegisterInternal(const char* name, const char* folderName, TNamed* obj, Bool_t toFile);
32 void RegisterInternal(const char* name, const char* Foldername, TCollection* obj, Bool_t toFile);
33 Bool_t InitInternal();
34
35 public:
36 IOManager(TString name = "root_virtual.root", Int_t entries = 1);
37 void SetOutput(TString name) { fOutFileName = name; }
38 void SetOutTreeName(TString name) { fOutTreeName = name; }
39 Int_t GetEntries() const;
40 Int_t GetEntry(Int_t i, Int_t flag);
41 TFile* GetInFile();
42 void AddFriend(TString /*name*/) {};
43 void SetInChain(TChain* tempChain, Int_t ident = -1);
44 void FillTree();
45 virtual void CloseManager();
46 virtual ~IOManager();
47 ClassDef(IOManager, 1)
48 };
49} // namespace HalDbg
50
51#endif /* HAL_EXAMPLES_ONTHEFLY_DBGIOMANAGER_H_ */
virtual void CloseManager()
void RegisterInternal(const char *name, const char *folderName, TNamed *obj, Bool_t toFile)
Int_t GetEntries() const
Int_t GetEntry(Int_t i, Int_t flag)
void SetOutput(TString name)
void SetInChain(TChain *tempChain, Int_t ident=-1)