//*-- AUTHOR : Ilse Koenig //*-- Modified : 02/11/98 ///////////////////////////////////////////////////////////// //HParSet // // Base class for all parameter containers // ///////////////////////////////////////////////////////////// #include "hparset.h" #include "hades.h" #include "hruntimedb.h" #include "hspectrometer.h" #include "hdetector.h" #include ClassImp(HParSet) HParSet::HParSet() { // constructor sets default values of data elements for(Int_t i=0;i<3;i++) {versions[i]=-1;} status=kFALSE; changed=kFALSE; } Bool_t HParSet::init(HParIo* io) { // intitializes the container from an input in run time // database. If this is not successful it is initialized from // the second input. If this failes too, it returns an error. // (calls internally the init function in the derived class) HRuntimeDb* rtdb=gHades->getRuntimeDb(); HDetector* det=gHades->getSetup()->getDetector(detName); if (det) { Int_t len=det->getMaxModules()*6; Int_t* s=det->getModules(); Int_t* set=new Int_t[len]; for(Int_t i=0;igetFirstInput(); if (io) allFound=init(io,set); if (!allFound) { io=rtdb->getSecondInput(); if (io) allFound=init(io,set); } } delete[] set; if (allFound) { changed=kTRUE; return kTRUE; } } cerr<<"******** "<getRuntimeDb()->getOutput(); if (output) return write(output); cerr<