ROOT logo
// $Id: ZHistoManager.cxx 2088 2008-11-23 20:26:46Z matevz $

// Copyright (C) 1999-2008, Matevz Tadel. All rights reserved.
// This file is part of GLED, released under GNU General Public License version 2.
// For the licensing terms see $GLEDSYS/LICENSE or http://www.gnu.org/.

#include "ZHistoManager.h"
#include <Gled/GledNS.h>
#include <Glasses/ZGlass.h>

ClassImp(ZHistoManager);

ZHistoManager::ZHistoManager(const char* fname, Option_t* option,
			     const char* ftitle, Int_t compress) :
  TFile(fname, option, ftitle, compress)
{}

ZHistoManager::~ZHistoManager() {}

void ZHistoManager::RegisterGroup(ZHisto* n, const Text_t* group)
{
  mHisto2ZHistoDir_i i = mHisto2HistoDir.find(n);
  ZHistoDir* d = (i != mHisto2HistoDir.end()) ? i->second : 0;
  const Text_t* name = n->GetGlass()->GetName();
  GledNS::PushFD(); cd();
  if(!d) {
    ISmess(GForm("ZHistoManager::Register creating ZHistoDir for %s", name));
    d = mHisto2HistoDir[n] = new ZHistoDir(n, name, GForm("ZHistoDir for %s", name));
  }
  d->AddGroup(group, GForm("ZHistoGroup for %s", name));
  GledNS::PopFD();
}

/**************************************************************************/

ZHistoDir* ZHistoManager::GetDir(ZHisto* n)
{
  return mHisto2HistoDir[n];
}

ZHistoGroup* ZHistoManager::GetGroup(ZHisto* n, const Text_t* group)
{
  ZHistoDir *d = mHisto2HistoDir[n];
  return (d ? d->GetGroup(group) : 0);
}
 ZHistoManager.cxx:1
 ZHistoManager.cxx:2
 ZHistoManager.cxx:3
 ZHistoManager.cxx:4
 ZHistoManager.cxx:5
 ZHistoManager.cxx:6
 ZHistoManager.cxx:7
 ZHistoManager.cxx:8
 ZHistoManager.cxx:9
 ZHistoManager.cxx:10
 ZHistoManager.cxx:11
 ZHistoManager.cxx:12
 ZHistoManager.cxx:13
 ZHistoManager.cxx:14
 ZHistoManager.cxx:15
 ZHistoManager.cxx:16
 ZHistoManager.cxx:17
 ZHistoManager.cxx:18
 ZHistoManager.cxx:19
 ZHistoManager.cxx:20
 ZHistoManager.cxx:21
 ZHistoManager.cxx:22
 ZHistoManager.cxx:23
 ZHistoManager.cxx:24
 ZHistoManager.cxx:25
 ZHistoManager.cxx:26
 ZHistoManager.cxx:27
 ZHistoManager.cxx:28
 ZHistoManager.cxx:29
 ZHistoManager.cxx:30
 ZHistoManager.cxx:31
 ZHistoManager.cxx:32
 ZHistoManager.cxx:33
 ZHistoManager.cxx:34
 ZHistoManager.cxx:35
 ZHistoManager.cxx:36
 ZHistoManager.cxx:37
 ZHistoManager.cxx:38
 ZHistoManager.cxx:39
 ZHistoManager.cxx:40
 ZHistoManager.cxx:41
 ZHistoManager.cxx:42
 ZHistoManager.cxx:43
 ZHistoManager.cxx:44
 ZHistoManager.cxx:45