[ROOT] running precompiled code

From: Riccardo de Sangro (riccardo.desangro@SLAC.stanford.edu)
Date: Fri Oct 18 2002 - 10:38:47 MEST


Hello,
 I have made the following program to be able to pre-compile my analysis 
code and run under root:

//      Original Author:  Rene Brun (bench.cxx)
//
// This little file is a wrapper for a .cc file containing
// a ROOT job.
////////////////////////////////////////////////////////////////////

#include "TROOT.h"
#include "TTree.h"
#include "TRint.h"

#include "inclDstarDstar.hh"
#include "inclDstarDstar.cc"

int main(int argc, char** argv)
{
  TRint *theApp = new TRint("Rint", &argc, argv, 0, 0);

  TTree::SetBranchStyle(1); // use the new Branch style

  inclDstarDstar t(0,1,"signal.list");
  t.BookHistos();
  t.Loop(100000);
  //  t.DrawHistos("eps");

// the following line will give back the root prompt to the user,
// but he/she won't have -AFAIK- available "t" for t->Draw("eps").
  theApp->Run();

  return 0;
}


My analysis code is in inclDstarDstar.cc/.hh.

Everything runs fine (and indeed a good factor faster than the usual 
interpreted version), and at the end of the job
I am left with a root prompt, I believe inside the Run() loop of the 
TRint application.

The question is: how (if ever) can I access my "t" object? I have not 
been able to figure out.

thanks for any help

Riccardo



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:15 MET