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

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

version 1.4, 2004/07/08 20:07:00 version 1.5, 2004/07/09 20:44:11
Line 15 
Line 15 
  *  *
  * Revision History:  * Revision History:
  *   $Log$  *   $Log$
    *   Revision 1.5  2004/07/09 20:44:11  saw
    *   Can now put a test on a tree block
    *
    *
    *   Revision 1.1.16.2  2004/07/09 20:41:50  saw
    *   Can now put a test on a tree block
    *
    *   Revision 1.1.16.1  2004/07/09 14:12:11  saw
    *   Add ability for CTP to make ROOT Trees
    *
  *   Revision 1.4  2004/07/08 20:07:00  saw  *   Revision 1.4  2004/07/08 20:07:00  saw
  *   Supply dummy routines when ROOTSYS not defined  *   Supply dummy routines when ROOTSYS not defined
  *  *
Line 190 
Line 200 
             }             }
           }           }
         }         }
           if(p = strcasestr(lines,"test=")) {
             /* RHS must be a variable */
             char *varname=0; char *s; int len, testindex;
             daVarStruct *testp;
             p += 5;
             s = p;
             while(*s && !isspace(*s) && *s !='\n') s++;
             len = (s-p);
             varname = (char *) malloc(len+1);
             strncpy(varname,p,len);
             varname[len] = '\0';
             if(thVarResolve(varname,&testp,&testindex,1,0) != S_SUCCESS) {
               return(S_FAILURE); /* Test flag not registered */
         /* ASAP we must change this to register variables as they are needed */
         /* If the variable exists, then we also must check to make sure that
            the requested index does not exceed the size of the array.
            a new thVarResolve should also increase the size of the array if
            it was created by CTP */
             }
             treedef->test = testp;
             treedef->testindex = testindex;
           } else {
             treedef->test = 0; /* No test, always true */
           }
       }       }
  
       if(fname) {       if(fname) {
Line 430 
Line 464 
   /* printf("Executing Tree %s\n",var->name);*/   /* printf("Executing Tree %s\n",var->name);*/
   treedef = ((thTreeOpaque *)(var->opaque));   treedef = ((thTreeOpaque *)(var->opaque));
   thisbranch = treedef->branchlistP;   thisbranch = treedef->branchlistP;
     if(! (treedef->test ? *((DAINT *) treedef->test->varptr
                             + treedef->testindex) : 1)) {
       return(S_SUCCESS);  /* Test was false */
     }
   while(thisbranch) {   while(thisbranch) {
     structp = thisbranch->evstruct;     structp = thisbranch->evstruct;
     /*    printf("Filling branch %s at %x\n",thisbranch->branchname,structp);*/     /*    printf("Filling branch %s at %x\n",thisbranch->branchname,structp);*/


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

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