9#include "DbgIOManager.h"
12#include "InputDataInfo.h"
17#include <TObjString.h>
23 IOManager::IOManager(TString name, Int_t entries) :
24 Hal::IOManager(new
Hal::InputDataInfo(name)),
26 fOutTreeName(
"HalTree"),
32 Bool_t IOManager::InitInternal() {
34 fInFile =
new TFile(fInFileName,
"recreate");
35 fOutFile =
new TFile(fOutFileName,
"recreate");
36 fOutTree =
new TTree(fOutTreeName, fOutTreeName);
41 Int_t IOManager::GetEntries()
const {
return fEntries; }
43 IOManager::~IOManager() {
44 if (fInFile)
delete fInFile;
45 if (fOutFile)
delete fOutFile;
46 gSystem->Exec(Form(
"rm %s", fInFileName.Data()));
49 TFile* IOManager::GetInFile() {
return fInFile; }
51 void IOManager::RegisterInternal(
const char* name,
const char* , TNamed* obj, Bool_t toFile) {
52 if (toFile) { fOutTree->Branch(name, obj); }
55 void IOManager::RegisterInternal(
const char* name,
const char* , TCollection* obj, Bool_t toFile) {
56 if (toFile) { fOutTree->Branch(name, obj); }
59 void IOManager::SetInChain(TChain* , Int_t ) {}
61 Int_t IOManager::GetEntry(Int_t i, Int_t ) {
62 if (i < fEntries)
return 1;
66 void IOManager::FillTree() { fOutTree->Fill(); }
68 void IOManager::CloseManager() {
static void PrintInfo(TString text, Hal::EInfo status)