ROOT logo
//*-- AUTHOR : Ilse Koenig
//*-- Modified : 02/11/98
//*-- Modified : 10/08/2001 by J. Otwinowski 
//*-- Modified : 30/08/2001 by T. Wojcik
//*-- Modified : 28/02/2002 by J. Otwinowski 

//_HADES_CLASS_DESCRIPTION 
/////////////////////////////////////////////////////////////
//HShowerParRootFileIo
//
//  Class for Shower parameter input/output from/into ROOT file
//
//  It is derived from the base class HDetParFileIo and
//  inherits from it basic functions e.g. write(...)
//
/////////////////////////////////////////////////////////////

using namespace std;
#include "hshowerparrootfileio.h"
#include "hshowergeompar.h"
#include "hshowerhist.h"

#include <iostream> 
#include <iomanip>

ClassImp(HShowerParRootFileIo)

HShowerParRootFileIo::HShowerParRootFileIo(HParRootFile* f) : HDetParRootFileIo(f) {
  // constructor sets the name of the detector I/O "HShowerParIo"
  fName="HShowerParIo";
  initModules=new TArrayI(18);
}


HShowerParRootFileIo::~HShowerParRootFileIo() {
  // destructor
  if (modulesFound) {
    delete modulesFound;
    modulesFound=0;
  }
  if (initModules) {
    delete initModules;
    initModules=0;
  }
}


Bool_t HShowerParRootFileIo::init(HParSet* pPar,Int_t* set) {
  // initializes a container called by name, but only the modules
  // defined in the array 'set'
  // calls the special read function for this container
  // If it is called the first time it reads the setup found in the file

  if (!isActiv) readModules("Shower");
  const Text_t* name = ((TNamed*)pPar)->GetName();
  if (strcmp(name,"ShowerHist")==0) {
    ((HShowerHist*)pPar)->defaultInit(); //nothing to read
    return kTRUE;  
  }
  if (pFile) {
    if (strcmp(name,"ShowerGeomPar")==0)     return read((HShowerGeomPar*)pPar,set);
    if (strcmp(name,"ShowerCalPar")==0)      return read(pPar);
  }
  Error("init(HParSet*,Int_t*)","initialization of %s not possible from ROOT file!",name);
  return kFALSE;
}
 hshowerparrootfileio.cc:1
 hshowerparrootfileio.cc:2
 hshowerparrootfileio.cc:3
 hshowerparrootfileio.cc:4
 hshowerparrootfileio.cc:5
 hshowerparrootfileio.cc:6
 hshowerparrootfileio.cc:7
 hshowerparrootfileio.cc:8
 hshowerparrootfileio.cc:9
 hshowerparrootfileio.cc:10
 hshowerparrootfileio.cc:11
 hshowerparrootfileio.cc:12
 hshowerparrootfileio.cc:13
 hshowerparrootfileio.cc:14
 hshowerparrootfileio.cc:15
 hshowerparrootfileio.cc:16
 hshowerparrootfileio.cc:17
 hshowerparrootfileio.cc:18
 hshowerparrootfileio.cc:19
 hshowerparrootfileio.cc:20
 hshowerparrootfileio.cc:21
 hshowerparrootfileio.cc:22
 hshowerparrootfileio.cc:23
 hshowerparrootfileio.cc:24
 hshowerparrootfileio.cc:25
 hshowerparrootfileio.cc:26
 hshowerparrootfileio.cc:27
 hshowerparrootfileio.cc:28
 hshowerparrootfileio.cc:29
 hshowerparrootfileio.cc:30
 hshowerparrootfileio.cc:31
 hshowerparrootfileio.cc:32
 hshowerparrootfileio.cc:33
 hshowerparrootfileio.cc:34
 hshowerparrootfileio.cc:35
 hshowerparrootfileio.cc:36
 hshowerparrootfileio.cc:37
 hshowerparrootfileio.cc:38
 hshowerparrootfileio.cc:39
 hshowerparrootfileio.cc:40
 hshowerparrootfileio.cc:41
 hshowerparrootfileio.cc:42
 hshowerparrootfileio.cc:43
 hshowerparrootfileio.cc:44
 hshowerparrootfileio.cc:45
 hshowerparrootfileio.cc:46
 hshowerparrootfileio.cc:47
 hshowerparrootfileio.cc:48
 hshowerparrootfileio.cc:49
 hshowerparrootfileio.cc:50
 hshowerparrootfileio.cc:51
 hshowerparrootfileio.cc:52
 hshowerparrootfileio.cc:53
 hshowerparrootfileio.cc:54
 hshowerparrootfileio.cc:55
 hshowerparrootfileio.cc:56
 hshowerparrootfileio.cc:57
 hshowerparrootfileio.cc:58
 hshowerparrootfileio.cc:59
 hshowerparrootfileio.cc:60
 hshowerparrootfileio.cc:61
 hshowerparrootfileio.cc:62
 hshowerparrootfileio.cc:63
 hshowerparrootfileio.cc:64
 hshowerparrootfileio.cc:65
 hshowerparrootfileio.cc:66