version 1.1, 2002/07/31 20:07:48
|
version 1.2, 2004/07/02 18:46:29
|
|
|
* | * |
* Revision History: | * Revision History: |
* $Log$ | * $Log$ |
|
* Revision 1.2 2004/07/02 18:46:29 saw |
|
* Update ugly cpp routine for gcc 3.2.3. Need to find a better way to |
|
* reference C++ routines. |
|
* |
* Revision 1.1 2002/07/31 20:07:48 saw | * Revision 1.1 2002/07/31 20:07:48 saw |
* Add files for ROOT Trees | * Add files for ROOT Trees |
* | * |
|
|
| |
if(fname) { | if(fname) { |
/*printf("Opening Root file %s\n",fname);*/ | /*printf("Opening Root file %s\n",fname);*/ |
treedef->file = (void *) thRoot_TFile__FPc(fname); |
treedef->file = (void *) _Z12thRoot_TFilePc(fname); |
free(fname); | free(fname); |
} else { | } else { |
/*printf("Opening Root file %s\n","ctp.tree");*/ | /*printf("Opening Root file %s\n","ctp.tree");*/ |
treedef->file = (void *) thRoot_TFile__FPc("ctp.root"); |
treedef->file = (void *) _Z12thRoot_TFilePc("ctp.root"); |
} | } |
| |
/*printf("Call to TTree(\"%s\",\"title\") goes here\n",blockname);*/ | /*printf("Call to TTree(\"%s\",\"title\") goes here\n",blockname);*/ |
treedef->treeptr = (void *) thRoot_TTree__FPc(blockname); |
treedef->treeptr = (void *) _Z12thRoot_TTreePc(blockname); |
| |
if(strcasestr(lines,BEGINSTR) != 0){ | if(strcasestr(lines,BEGINSTR) != 0){ |
/* printf("Is a begin\n");*/ | /* printf("Is a begin\n");*/ |
|
|
*/ | */ |
| |
/*printf("Branch=%s Leafs=%s\n",Branch->branchname,brancharg);*/ | /*printf("Branch=%s Leafs=%s\n",Branch->branchname,brancharg);*/ |
thRoot_Branch__FP5TTreePcPvT1(treedef->treeptr,Branch->branchname,(Branch->evstruct),brancharg); |
_Z13thRoot_BranchP5TTreePcPvS1_(treedef->treeptr,Branch->branchname,(Branch->evstruct),brancharg); |
| |
free(brancharg); | free(brancharg); |
/*printf("Exiting book a branch\n");*/ | /*printf("Exiting book a branch\n");*/ |
|
|
} | } |
thisbranch = thisbranch->next; | thisbranch = thisbranch->next; |
} | } |
thRoot_Fill__FP5TTree(treedef->treeptr); |
_Z11thRoot_FillP5TTree(treedef->treeptr); |
| |
(*((DAINT *)var->varptr))++; /* Increment block counter */ | (*((DAINT *)var->varptr))++; /* Increment block counter */ |
return(S_SUCCESS); | return(S_SUCCESS); |
|
|
thStatus thWriteTreeV(daVarStruct *var){ | thStatus thWriteTreeV(daVarStruct *var){ |
| |
printf("Writing Tree %s\n",var->name); | printf("Writing Tree %s\n",var->name); |
thRoot_Write__FP14thRootFileList(((thTreeOpaque *)(var->opaque))->file); |
_Z12thRoot_WriteP14thRootFileList(((thTreeOpaque *)(var->opaque))->file); |
| |
(*((DAINT *)var->varptr)) = 0; /* Increment block counter */ | (*((DAINT *)var->varptr)) = 0; /* Increment block counter */ |
return(S_SUCCESS); | return(S_SUCCESS); |
|
|
thStatus thCloseTreeV(daVarStruct *var){ | thStatus thCloseTreeV(daVarStruct *var){ |
| |
printf("Closing Tree %s\n",var->name); | printf("Closing Tree %s\n",var->name); |
thRoot_Close__FP14thRootFileList(((thTreeOpaque *)(var->opaque))->file); |
_Z12thRoot_CloseP14thRootFileList(((thTreeOpaque *)(var->opaque))->file); |
| |
(*((DAINT *)var->varptr)) = 0; /* Increment block counter */ | (*((DAINT *)var->varptr)) = 0; /* Increment block counter */ |
return(S_SUCCESS); | return(S_SUCCESS); |