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

Diff for /Analyzer/CTP/thHandlers.c between version 1.1 and 1.2

version 1.1, 1998/12/07 22:11:12 version 1.2, 1999/11/04 20:34:06
Line 16 
Line 16 
  *  *
  * Revision History:  * Revision History:
  *   $Log$  *   $Log$
  *   Revision 1.1  1998/12/07 22:11:12  saw   *   Revision 1.2  1999/11/04 20:34:06  saw
  *   Initial setup   *   Alpha compatibility.
    *   New RPC call needed for root event display.
    *   Start of code to write ROOT trees (ntuples) from new "tree" block
    *
    *   Revision 1.7  1999/08/25 13:16:06  saw
    *   *** empty log message ***
    *
    *   Revision 1.6  1999/07/07 13:43:58  saw
    *   Move thTestRHandler() into thTestParse.c
  *  *
  *        Revision 1.5  1996/08/01  01:31:56  saw  *        Revision 1.5  1996/08/01  01:31:56  saw
  *        Have thRHandler return a status  *        Have thRHandler return a status
Line 96 
Line 104 
   return(status);   return(status);
 } }
  
 void thTestRHandler(char *name, daVarStruct *varclass, any *retval)  
 /* The default Read handler */  
 {  
   daVarStruct *varp;  
   char *attribute;  
   daVarStatus status;  
   int index;  
   
   status = daVarAttributeFind(name, varclass, &varp, &attribute, &index);  
   status = daVarRegRatr(varp, attribute, index, retval);  
   if(status == S_SUCCESS) {  
     if(strcasecmp(attribute,DAVAR_RATR) == 0){  
       retval->any_u.s = realloc(retval->any_u.s,strlen(retval->any_u.s)  
                                 +strlen(TH_SCALER) + 2);  
       strcat(retval->any_u.s,TH_SCALER);  
       strcat(retval->any_u.s,"\n");  
     }  
   } else {  
     if(strcasecmp(attribute,TH_SCALER) == 0){  
       int i;  
       if(varp->opaque){  
         retval->valtype = DAVARINT_RPC;  
         if(index == DAVAR_NOINDEX) {  
           retval->any_u.i.i_len = varp->size;  
           retval->any_u.i.i_val = (int *) malloc(varp->size*sizeof(int));  
           for(i=0;i<varp->size;i++) {  
             retval->any_u.i.i_val[i] = ((DAINT *)varp->opaque)[i];  
           }  
         } else {  
           retval->any_u.i.i_len = 1;  
           retval->any_u.i.i_val = (int *) malloc(sizeof(int));  
           retval->any_u.i.i_val[0] = ((DAINT *)varp->opaque)[index];  
         }  
       } else {  
         retval->valtype = DAVARERROR_RPC;  
         retval->any_u.error = S_SUCCESS;  
       }  
     }  
   }  
   /* A special handler would check more attributes if status != SUCCESS */  
   return;  
 }  
   
 #ifndef NOHBOOK #ifndef NOHBOOK
 void thHistZeroLastId() void thHistZeroLastId()
 { {
Line 146 
Line 111 
   return;   return;
 } }
 void thHistRHandler(char *name, daVarStruct *varclass, any *retval) void thHistRHandler(char *name, daVarStruct *varclass, any *retval)
 /* The default Read handler */       /* Read Handler for Histograms */
 { {
   daVarStruct *varp;   daVarStruct *varp;
   char *attribute;   char *attribute;
Line 231 
Line 196 
   return;   return;
 } }
 #endif #endif
   #ifdef ROOTTREE
   void thTreeRHandler(char *name, daVarStruct *varclass, any *retval)
   /* The default Read handler */
   {
     return(thRHandler(name, varclass, retval));
   }
   #endif


Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

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