Here are some instructions and files for making and reading the digi files.

I'm attaching my Root macro in its current state, along with my userAlg and jobOptions files for making the files. This all works with Gleam v2r1 - and I've used them both on Windows and linux.

>

>  So: Root macro is mc.cxx; header is RootTreeAnalysis.h - will handle both MC and Digi files. start.c loads libs

>

>  UserAlg.cxx access CalDigiCol on the TDS and makes an ntuple. You'll need ntupleWriterSvc for it.

>

> I'm also copying in an annotated example of using mc.cxx: this is for MC. The 1st arg to the RootTreeAnalysis constructor is for the digi file.

>

> root [0] .x start.c   // load shared lib for Root classes

> root [1] gROOT->LoadMacro("mc.cxx");          // load analysis macro

> root [2] RootTreeAnalysis* m= new RootTreeAnalysis("","","mc-muon-pencil.root");  // create analysis object; give it MC input file

 

>  opening files:

>         digi:

>         recon:

>         mc:     mc-muon-pencil.root

 

> root [3] m->Go(1000);         // run 1000 events

>

> Num Events in File is: 5000

 

> root [4] m->histFile->cd();   // change to the histogram file Root directory, to access histogram pointers by name

> root [5] PARTCOUNTMC->Draw();  // draw a histogram

> <TCanvas::MakeDefCanvas>: created default TCanvas with name c1

> root [6] m->histFile->WriteHists();   // write out histograms (to default Histograms.root file)

> root [7] delete m;                    // example of modifying, rerunning mc.cxx: Delete analysis object first.

> root [8] .U mc.cxx                    // unload the macro - then edit it to make any desired changes (new histos etc)

> root [9] gROOT->LoadMacro("mc.cxx");  // reload the macro after modifying it; carry on as above

>

>

> Richard

> --

>  Richard Dubois

>  Stanford Linear Accelerator Center

>  650-926-3824

>  650-926-8616 (FAX)

>  richard@slac.stanford.edu

>  http://www.slac.stanford.edu/~richard