#include #include #include #include #include #include #include "Mcf_Window_prototypes.h" #include "McfEvent.h" #include "TracePickInfo.h" #define MAXNAME 20 void AddNull(char *string); void TraceInfo(long window, cxLattice *heplat, int hepnum); void TraceInfo(long window, cxLattice *heplat, int hepnum){ int i; /* loop variable */ int ichar; static int first = 0; int count; int icount; int ipar; int nhep; int inum; char infostring[400]; char *fstring; int *flen; char temp[30]; float *latdata; cxErrorCode ec; if(first == 0){ mcfioC_Init(); first = 1; return; } printf("hepnum = %d\n",hepnum); /* set pointers to HEP info in the lattice */ cxLatPtrGet(heplat,NULL,(void **)&latdata,NULL,NULL); nhep = (int) * cxLatticeDimensionsArrayGet(heplat,&ec); if(!nhep>0){ printf("TraceInfo: No HEP information!\n"); } if(hepnum == NOTRACK) return; for(icount = 0; icount-10000){ count = sprintf(temp, "Offline Px = %f GeV\n",latdata[icount*HEPLATDATASIZE+OFF_PX]); strcpy(&infostring[ichar],temp); ichar = ichar + count; count = sprintf(temp, "Offline Py = %f GeV\n",latdata[icount*HEPLATDATASIZE+OFF_PY]); strcpy(&infostring[ichar],temp); ichar = ichar + count; count = sprintf(temp, "Offline Pz = %f GeV\n",latdata[icount*HEPLATDATASIZE+OFF_PZ]); strcpy(&infostring[ichar],temp); free (fstring); } WindowMessage(window,infostring); break; } } return; } void AddNull(char* string){ int i; for(i=0; i