#ifndef PAMVMCTRK_F77_GPSSPE #define PAMVMCTRK_F77_GPSSPE #include #include #include "PamRootManager.h" #include using std::cout; using std::endl; // structures for C++ <=> COMMON data exchange #define maxstr 1000 struct cGPSSPE { Int_t nstrpx; Int_t nstrpy; Int_t istripx[maxstr]; Int_t istripy[maxstr]; Float_t qstripx[maxstr]; Float_t qstripy[maxstr]; Float_t xstripx[maxstr]; Float_t ystripy[maxstr]; Int_t npstripx[maxstr]; Int_t npstripy[maxstr]; Int_t ntstripx[maxstr]; Int_t ntstripy[maxstr]; } ; extern "C" { extern struct cGPSSPE gpsspe_; } class GPSSPEData: public TObject { public: Int_t fistrip; Float_t fqstrip; Float_t fstripc; Int_t fnpstrip; Int_t fntstrip; GPSSPEData(){fistrip=fnpstrip=fntstrip=0; fqstrip=fstripc=0.;} virtual ~GPSSPEData(){; }; void Clean(){fistrip=fnpstrip=fntstrip=0; fqstrip=fstripc=0.;} void Clear(Option_t * = "") { this->~GPSSPEData(); } void Print(Option_t * ="" ) const { cout<<" ISTRIP: " <Compress(); fGPSSPEDataYColl->Compress(); } GPSSPEData * CreateXHit(Int_t flag){ if(!fGPSSPEDataXColl->At(flag)){ return (GPSSPEData *)fGPSSPEDataXColl->New(flag); } return (GPSSPEData *)fGPSSPEDataXColl->At(flag); } GPSSPEData * CreateYHit(Int_t flag){ if(!fGPSSPEDataYColl->At(flag)){ return (GPSSPEData *)fGPSSPEDataYColl->New(flag); } return (GPSSPEData *)fGPSSPEDataYColl->At(flag); } Int_t GetNXHit(){ return fnstrpx; } Int_t GetNYHit(){ return fnstrpy; } GPSSPEData * GetXHit(Int_t flag){ if(fGPSSPEDataXColl->At(flag)){ GPSSPEData * hit = (GPSSPEData *)fGPSSPEDataXColl->At(flag); return hit; } cout<<"Tracker GPSSPE_X Hit at "<At(flag)){ GPSSPEData * hit = (GPSSPEData *)fGPSSPEDataYColl->At(flag); return hit; } cout<<"Tracker GPSSPE_Y Hit at "<nstrpx; fnstrpy=c->nstrpy; for (Int_t i=0; ifqstrip=c->qstripx[i]; hx->fstripc=c->xstripx[i]; hx->fnpstrip=c->npstripx[i]; hx->fntstrip=c->ntstripx[i]; hx->fistrip=c->istripx[i]; } for (Int_t i=0; ifqstrip=c->qstripy[i]; hy->fstripc=c->ystripy[i]; hy->fnpstrip=c->npstripy[i]; hy->fntstrip=c->ntstripy[i]; hy->fistrip=c->istripy[i]; } } void Print(Option_t * ="" ) const { cout << "pGPSSPEHitData: "<At(i); if(hx) hx->Print(); } for (Int_t i=0; iAt(i); if (hy) hy->Print(); } } ClassDef(pGPSSPEHits,1) }; #endif