Rootfile Class Reference

provides an interface with ROOT capability More...

#include <rootfile.h>

Collaboration diagram for Rootfile:

Collaboration graph

List of all members.

Public Member Functions

int init ()
int standalonerootinit ()
int rootdump (rawevent &)
int adv_plot (rawevent &)
void closeroot ()
int plot (const int &, const double &, const double &, const double &)
string spectrumname (const int &)

Public Attributes

double rtest
int eventcount

Private Attributes

string filename
TFile * outfile
TTree * T
TTree * Tout
TStopwatch * timer

Detailed Description

provides an interface with ROOT capability

Rootfile defines how to handle ROOT objects including files, trees, and histograms to enable the analysis to work within the ROOT framework. This make it it possible to filter the ldf data into a root file for processing.

Member Function Documentation

int Rootfile::init (  ) 

During initialization if the analysis is working with scan then an output file called temp.root is created to hold event data. Data is inserted into a tree called T. If operating in standalone mode then the standalonerootinit() function is called.

int Rootfile::standalonerootinit (  ) 

When the pixie16 analysis is run in ROOT standalone mode both the input and output are ROOT files. In this mode both files have to be created along with any desired spectra.

int Rootfile::rootdump ( rawevent revt  ) 

rootdump is called from the detector_driver after all event processing has completed. The rawevent is then written to a root file and the event counter incremented.

int Rootfile::adv_plot ( rawevent revt  ) 

obsolete function

void Rootfile::closeroot (  ) 

Upon finishing the analysis the detector_driver uses this function to close the root file.

int Rootfile::plot ( const int &  dammid,
const double &  val1,
const double &  val2,
const double &  val3 

Method to plot ROOT histograms if damm is not being used in the analysis. This is an early version of this function and not everything has been tested.

string Rootfile::spectrumname ( const int &  dammid  ) 

When ROOT is filling its own histograms the plot function from detector_driver only sends it the corresponding damm id number. From that number ROOT must retrieve the appropriate histogram name. This is a cumbersome interface but necessary to enable ROOT and damm in the same program.

Member Data Documentation

string Rootfile::filename [private]

name of the output file created, currently unused

TFile* Rootfile::outfile [private]

pointer to the ROOT output file

TTree* Rootfile::T [private]

pointer to a ROOT tree for data storage

TTree* Rootfile::Tout [private]

pointer to an output ROOT tree when running in ROOT standalone mode

TStopwatch* Rootfile::timer [private]

a timer to time the analysis


an event counter incremented when data sent to tree

The documentation for this class was generated from the following files:

Generated on Wed May 14 10:07:06 2008 for pixie16 by  doxygen 1.5.5