(file) Return to thTree.c CVS log (file) (dir) Up to [HallC] / Analyzer / CTP

Diff for /Analyzer/CTP/thTree.c between version 1.5 and 1.7

version 1.5, 2004/07/09 20:44:11 version 1.7, 2008/09/25 00:01:29
Line 15 
Line 15 
  *  *
  * Revision History:  * Revision History:
  *   $Log$  *   $Log$
    *   Revision 1.7  2008/09/25 00:01:29  jones
    *   Updated to run with gfortran compiler
    *
    *   Revision 1.6.6.1  2007/09/10 21:32:47  pcarter
    *   Implemented changes to allow compilation on RHEL 3,4,5 and MacOSX
    *
    *   Revision 1.6  2005/02/22 16:54:46  saw
    *   Clean up some diagnostic printfs
    *
  *   Revision 1.5  2004/07/09 20:44:11  saw  *   Revision 1.5  2004/07/09 20:44:11  saw
  *   Can now put a test on a tree block  *   Can now put a test on a tree block
  *  *
Line 179 
Line 188 
             strncpy(varname,p,len);             strncpy(varname,p,len);
             varname[len] = '\0';             varname[len] = '\0';
             if(thVarResolve(varname,&varp,&index,1,0)==S_SUCCESS) {             if(thVarResolve(varname,&varp,&index,1,0)==S_SUCCESS) {
               printf("%s,type=%d, size=%d\n",varp->name,varp->type,varp->size);                /*printf("%s,type=%d, size=%d\n",varp->name,varp->type,varp->size);*/
               printf("%s\n",(char *) varp->varptr);  
               if(varp->type == DAVARSTRING) {               if(varp->type == DAVARSTRING) {
                 fname = malloc(strlen((char *)varp->varptr)+1);                 fname = malloc(strlen((char *)varp->varptr)+1);
                 strcpy(fname,(char *)varp->varptr);                 strcpy(fname,(char *)varp->varptr);
Line 192 
Line 200 
                 while(*p && !isspace(*p)) p++;                 while(*p && !isspace(*p)) p++;
                 *p = '\0';      /* Null terminate at first blank */                 *p = '\0';      /* Null terminate at first blank */
               }               }
                 /*printf("|%s|\n", fname);*/
             }             }
             if(!fname) {             if(!fname) {
               fname = malloc(len+1);               fname = malloc(len+1);
Line 227 
Line 236 
       }       }
  
       if(fname) {       if(fname) {
         /*printf("Opening Root file %s\n",fname);*/          printf("Opening Root file %s\n",fname);
         treedef->file = (void *) thRoot_TFile(fname);         treedef->file = (void *) thRoot_TFile(fname);
         free(fname);         free(fname);
       } else {       } else {
Line 474 
Line 483 
     thisleaf = thisbranch->leaflistp;     thisleaf = thisbranch->leaflistp;
     while(thisleaf) {     while(thisleaf) {
       if(thisleaf->varp->type == DAVARINT) {       if(thisleaf->varp->type == DAVARINT) {
         *((DAINT *)(structp))++ = *((DAINT *)thisleaf->varp->varptr          *(DAINT *)(structp) = *((DAINT *)thisleaf->varp->varptr + thisleaf->index);/*phil*/
                                     + thisleaf->index);          structp = (void *) (DAINT *) ((DAINT *)structp + 1);
         /*      printf("   %s=%d\n",thisleaf->name,*((DAINT *)thisleaf->varp->varptr         /*      printf("   %s=%d\n",thisleaf->name,*((DAINT *)thisleaf->varp->varptr
                 + thisleaf->index));*/                 + thisleaf->index));*/
       } else if(thisleaf->varp->type == DAVARFLOAT) {       } else if(thisleaf->varp->type == DAVARFLOAT) {
         *((DAFLOAT *)(structp))++ = *((DAFLOAT *)thisleaf->varp->varptr          *(DAFLOAT *)(structp) = *((DAFLOAT *)thisleaf->varp->varptr + thisleaf->index);/*phil*/
                                     + thisleaf->index);          structp = (void *) (DAFLOAT *) ((DAFLOAT *)structp + 1);
         /*      printf("   %s=%f\n",thisleaf->name,*((DAFLOAT *)thisleaf->varp->varptr         /*      printf("   %s=%f\n",thisleaf->name,*((DAFLOAT *)thisleaf->varp->varptr
                 + thisleaf->index));*/                 + thisleaf->index));*/
       } else if(thisleaf->varp->type == DAVARDOUBLE) {       } else if(thisleaf->varp->type == DAVARDOUBLE) {
         *((DADOUBLE *)(structp))++ = *((DADOUBLE *)thisleaf->varp->varptr          *(DADOUBLE *)(structp) = *((DADOUBLE *)thisleaf->varp->varptr + thisleaf->index);/*phil*/
                                     + thisleaf->index);          structp = (void *) (DADOUBLE *) ((DADOUBLE *)structp + 1);
         /*      printf("   %s=%lf\n",thisleaf->name,*((DADOUBLE *)thisleaf->varp->varptr         /*      printf("   %s=%lf\n",thisleaf->name,*((DADOUBLE *)thisleaf->varp->varptr
                 + thisleaf->index));*/                 + thisleaf->index));*/
       }       }


Legend:
Removed from v.1.5  
changed lines
  Added in v.1.7

Analyzer/Replay: Mark Jones, Documents: Stephen Wood
Powered by
ViewCVS 0.9.2-cvsgraph-1.4.0