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  .x start.c // load shared lib for Root classes
> root  gROOT->LoadMacro("mc.cxx"); // load analysis macro
> root  RootTreeAnalysis* m= new RootTreeAnalysis("","","mc-muon-pencil.root"); // create analysis object; give it MC input file
> opening files:
> mc: mc-muon-pencil.root
> root  m->Go(1000); // run 1000 events
> Num Events in File is: 5000
> root  m->histFile->cd(); // change to the histogram file Root directory, to access histogram pointers by name
> root  PARTCOUNTMC->Draw(); // draw a histogram
> <TCanvas::MakeDefCanvas>: created default TCanvas with name c1
> root  m->histFile->WriteHists(); // write out histograms (to default Histograms.root file)
> root  delete m; // example of modifying, rerunning mc.cxx: Delete analysis object first.
> root  .U mc.cxx // unload the macro - then edit it to make any desired changes (new histos etc)
> root  gROOT->LoadMacro("mc.cxx"); // reload the macro after modifying it; carry on as above
> Richard Dubois
> Stanford Linear Accelerator Center
> 650-926-8616 (FAX)