//*-- AUTHOR Bjoern Spruck //*-- created : 19.04.06 //_HADES_CLASS_DESCRIPTION ///////////////////////////////////////////////////////////// // // HHodoRefHitPar // // Container class for HODO RefHit parameters // RefHit (because it was supposed to contain position // of Reference Hit, which it is NOT doing. But as this // misleading name was fixed we didnt want to change it.) // NOW the parameter contains two time cuts // The first one is done by the unpacker BEFORE data is // copied to the raw category // The second is supposed to be used on the cal data by // the hitfinder before starting to find a hit. // ///////////////////////////////////////////////////////////// using namespace std; #include "hhodorefhitpar.h" #include "hades.h" #include "hruntimedb.h" #include "hspectrometer.h" #include "hhododetector.h" #include "hpario.h" #include "hdetpario.h" #include #include ClassImp(HHodoRefHitPar) ClassImp(HHodoRefHitParMod) HHodoRefHitPar::HHodoRefHitPar(const Char_t* name,const Char_t* title, const Char_t* context) : HParSet(name,title,context) { // constructor creates an array of pointers of type HHodoRefHitParMod strcpy(detName,"Hodo"); HHodoDetector* det = (HHodoDetector*)gHades->getSetup()->getDetector("Hodo"); Int_t nMod=det->getMaxModInSetup(); array = new TObjArray(nMod); for (Int_t i = 0; i < nMod; i++) { array->AddAt( new HHodoRefHitParMod,i); } } HHodoRefHitPar::~HHodoRefHitPar() { // destructor array->Delete(); delete array; } Bool_t HHodoRefHitPar::init(HParIo* inp,Int_t* set) { // intitializes the container from an input HDetParIo* input=inp->getDetParIo("HHodoParIo"); if (input) return (input->init(this,set)); return kFALSE; } Int_t HHodoRefHitPar::write(HParIo* output) { // writes the container to an output HDetParIo* out=output->getDetParIo("HHodoParIo"); if (out) return out->write(this); return -1; } void HHodoRefHitPar::clear() { // clears the container for(Int_t i=0;i