//_HADES_CLASS_DESCRIPTION ///////////////////////////////////////////////////////////// // HEmcParRootFileIo // // Class for EMC parameter input/output from/into ROOT file // // It is derived from the base class HDetParRootFileIo and // inherits from it basic functions e.g. write(...) // ///////////////////////////////////////////////////////////// using namespace std; #include "hemcparrootfileio.h" #include "hades.h" #include "hspectrometer.h" #include "hemcdetector.h" #include "hemcgeompar.h" #include #include ClassImp(HEmcParRootFileIo) HEmcParRootFileIo::HEmcParRootFileIo(HParRootFile* f) : HDetParRootFileIo(f) { // constructor sets the name of the detector I/O "HEmcParIo" fName="HEmcParIo"; HDetector* det=gHades->getSetup()->getDetector("Emc"); Int_t n = det->getMaxSectors(); initModules=new TArrayI(n); } HEmcParRootFileIo::~HEmcParRootFileIo(void) { // destructor if (initModules) { delete initModules; initModules=0; } } Bool_t HEmcParRootFileIo::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("Emc"); const Text_t* name=pPar->GetName(); if (pFile) { if (strcmp(name,"EmcGeomPar")==0) return HDetParRootFileIo::read((HEmcGeomPar*)pPar,set); } Error("init(HParSet*,Int_t*)","Initialization of %s not possible from ASCII file",name); return kFALSE; }