//*-- AUTHOR : Ilse Koenig //*-- Modified : 06/09/99 by Ilse Koenig ///////////////////////////////////////////////////////////// //HMdcMboReadout // // Container class for the readout addresses of all MDC // motherboards // This information is used by the packer raw->hld // ///////////////////////////////////////////////////////////// #include "hmdcmboreadout.h" #include "hmdcrawstruct.h" #include "hades.h" #include "hruntimedb.h" #include "hspectrometer.h" #include "hmdcdetector.h" #include "hpario.h" #include "hdetpario.h" #include "heventfile.h" #include ClassImp(HMdcMboReadoutMoth) ClassImp(HMdcMboReadoutMod) ClassImp(HMdcMboReadoutSec) ClassImp(HMdcMboReadout) HMdcMboReadoutMod::HMdcMboReadoutMod(Int_t n=16) { // constructor creates an array of pointers of type // HMdcMboReadoutMoth array = new TObjArray(n); for(Int_t i=0;iDelete(); delete array; } HMdcMboReadoutSec::HMdcMboReadoutSec(Int_t n=4) { // constructor creates an array of pointers of type // HMdcMboReadoutMod array = new TObjArray(n); for(Int_t i=0;iDelete(); delete array; } HMdcMboReadout::HMdcMboReadout(Int_t n=6) : HParSet() { // constructor creates an array of pointers of type // HMdcMboReadoutSec // sets the name of the container to "MdcMboReadout" fName="MdcMboReadout"; fTitle="Mdc Mbo readout addresses"; strcpy(detName,"Mdc"); array = new TObjArray(n); for(Int_t i=0;igetRuntimeDb()->getContainer("MdcRawStruct"); if (pMdc) { for(Int_t i=0;i<6;i++) { for(Int_t j=0;j<4;j++) { for(Int_t k=0;k<16;k++) (*this)[i][j][k].SetName((char*)((*pMdc)[i][j][k].GetName())); } } } else { cerr<<"MBO names in HMdcMboReadout not initialized"<Delete(); delete array; } Bool_t HMdcMboReadout::init(HParIo* inp,Int_t* set) { // intitializes the container from an input HDetParIo* input=inp->getDetParIo("HMdcParIo"); if (input) return (input->init(this,set)); return kFALSE; } Int_t HMdcMboReadout::write(HParIo* output) { // writes the container to an output HDetParIo* out=output->getDetParIo("HMdcParIo"); if (out) return out->write(this); return -1; } void HMdcMboReadout::clear() { // clears the container for(Int_t i=0;igetSize();i++) { HMdcMboReadoutSec& sec=(*this)[i]; for(Int_t j=0;jgetSetup()->getDetector("Mdc"); if (set) { Text_t buf[155]; for(Int_t i=0;igetSize();i++) { HMdcMboReadoutSec& sec=(*this)[i]; for(Int_t j=0;jgetModule(i,j)) { cout<<"sector: "<