/[PAMELA software]/chewbacca/extractcalibs.sh
ViewVC logotype

Diff of /chewbacca/extractcalibs.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by mocchiut, Tue Nov 4 09:44:26 2008 UTC revision 1.3 by mocchiut, Mon Dec 22 16:50:09 2008 UTC
# Line 61  echo "TTree *tcb = (TTree*)_file0->Get(\ Line 61  echo "TTree *tcb = (TTree*)_file0->Get(\
61  echo "TTree *tc1 = (TTree*)_file0->Get(\"CalibTrk1\")" >> ${TEMPL};  echo "TTree *tc1 = (TTree*)_file0->Get(\"CalibTrk1\")" >> ${TEMPL};
62  echo "TTree *tc2 = (TTree*)_file0->Get(\"CalibTrk2\")" >> ${TEMPL};  echo "TTree *tc2 = (TTree*)_file0->Get(\"CalibTrk2\")" >> ${TEMPL};
63  echo "TTree *s4c = (TTree*)_file0->Get(\"CalibS4\")" >> ${TEMPL};  echo "TTree *s4c = (TTree*)_file0->Get(\"CalibS4\")" >> ${TEMPL};
64    echo "TTree *mcmd = (TTree*)_file0->Get(\"Mcmd\")" >> ${TEMPL};
65  echo "TTree *ccp = 0;" >> ${TEMPL};  echo "TTree *ccp = 0;" >> ${TEMPL};
66  echo "TTree *ccp1 = 0;" >> ${TEMPL};  echo "TTree *ccp1 = 0;" >> ${TEMPL};
67  echo "TTree *ccp2 = 0;" >> ${TEMPL};  echo "TTree *ccp2 = 0;" >> ${TEMPL};
# Line 68  echo "TTree *ctcb = 0;" >> ${TEMPL}; Line 69  echo "TTree *ctcb = 0;" >> ${TEMPL};
69  echo "TTree *ctc1 = 0;" >> ${TEMPL};  echo "TTree *ctc1 = 0;" >> ${TEMPL};
70  echo "TTree *ctc2 = 0;" >> ${TEMPL};  echo "TTree *ctc2 = 0;" >> ${TEMPL};
71  echo "TTree *cs4c = 0;" >> ${TEMPL};  echo "TTree *cs4c = 0;" >> ${TEMPL};
72    echo "TTree *cmcmd = 0;" >> ${TEMPL};
73  echo "TFile *calib = new TFile(\"${OUTDIR}/${FNAME}/nome\",\"RECREATE\");" >> ${TEMPL};  echo "TFile *calib = new TFile(\"${OUTDIR}/${FNAME}/nome\",\"RECREATE\");" >> ${TEMPL};
74  echo "calib->SetCompressionLevel(9);" >> ${TEMPL};  echo "calib->SetCompressionLevel(9);" >> ${TEMPL};
75  echo "calib->cd();" >> ${TEMPL};  echo "calib->cd();" >> ${TEMPL};
# Line 78  echo "ctcb=tcb->CloneTree(-1,\"fast\");" Line 80  echo "ctcb=tcb->CloneTree(-1,\"fast\");"
80  echo "ctc1=tc1->CloneTree(-1,\"fast\");" >> ${TEMPL};  echo "ctc1=tc1->CloneTree(-1,\"fast\");" >> ${TEMPL};
81  echo "ctc2=tc2->CloneTree(-1,\"fast\");" >> ${TEMPL};  echo "ctc2=tc2->CloneTree(-1,\"fast\");" >> ${TEMPL};
82  echo "cs4c=s4c->CloneTree(-1,\"fast\");" >> ${TEMPL};  echo "cs4c=s4c->CloneTree(-1,\"fast\");" >> ${TEMPL};
83    echo "cmcmd=mcmd->CloneTree(-1,\"fast\");" >> ${TEMPL};
84  echo "calib->Write();" >> ${TEMPL};  echo "calib->Write();" >> ${TEMPL};
85  echo "calib->Close();" >> ${TEMPL};  echo "calib->Close();" >> ${TEMPL};
86  echo ".q" >> ${TEMPL};  echo ".q" >> ${TEMPL};
# Line 90  for file in `ls ${INDIR}`; do Line 93  for file in `ls ${INDIR}`; do
93      echo ${FN} >> ${LOG};      echo ${FN} >> ${LOG};
94      CH=`echo $FN |grep .root`;      CH=`echo $FN |grep .root`;
95      if [ "$CH" != "" ]; then      if [ "$CH" != "" ]; then
96            echo " Processing file $FN";
97          cat ${TEMPL} | sed s/nome/${FN}/ > ${GO};          cat ${TEMPL} | sed s/nome/${FN}/ > ${GO};
98          root -b -l < ${GO} &> ${LOG};          root -b -l < ${GO} &> ${LOG};
99      fi;      fi;
100  done  done
101    rm -f ${LOG};
102  rm -f ${GO};  rm -f ${GO};
103  rm -f ${TEMPL};  rm -f ${TEMPL};
104  cd ${OUTDIR} && tar zcvf ${OUTDIR}/${FNAME}.tar.gz ${FNAME} ;  cd ${OUTDIR} && tar zcvf ${OUTDIR}/${FNAME}.tar.gz ${FNAME} ;

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

  ViewVC Help
Powered by ViewVC 1.1.23