diff --git a/DataProc/CPass0/checkResTree.C b/DataProc/CPass0/checkResTree.C new file mode 100644 index 00000000..55c24d33 --- /dev/null +++ b/DataProc/CPass0/checkResTree.C @@ -0,0 +1,18 @@ +#if !(defined(__CLING__) || defined(__CINT__)) || defined(__ROOTCLING__) || defined(__ROOTCINT__) +#include +#include +#endif + +void checkResTree(const char* fname = "ResidualTrees.root", const char* tname = "delta") +{ + TFile tf(fname); + TTree* tr = (TTree*)tf.Get(tname); // we want macro to crash if the tree is not there + int nev = tr->GetEntries(); + int rdb = 0; + for (int i=0;iGetEntry(i); + if (rdb<=0 || rdb>10000) { + printf("CORRUPTED Residuals file, ev %d got %d bytes\n",i,rdb); + } + } +}