FluxHistoAction Class Reference

An action that fills a flux histogram. More...

#include <FluxHistoAction.h>

Inheritance diagram for FluxHistoAction:

CollectionAction

List of all members.

Public Member Functions

 FluxHistoAction (const char *actionName, TString outFileBase, TString rigBinsFile)
 Constructor.
 ~FluxHistoAction ()
 Destructor.
void OnGood (PamLevel2 *event)
 Fills histogram with the selected event.
void Finalize ()
 Writes the histogram to the output files (ASCII and ROOT).


Detailed Description

An action that fills a flux histogram.

This action reads a rigidity binning from a file and fills a flux histogram (text and ROOT format). Currently, it fills an event-count histogram: in future implementations, it could also read live time, efficiency and geometrical factor from external files and fill a true flux histogram.


Constructor & Destructor Documentation

FluxHistoAction::FluxHistoAction ( const char *  actionName,
TString  outFileBase,
TString  rigBinsFile 
)

Constructor.

outFileBase is the base name for output file: Finalize will add .txt for ASCII output and .root for ROOT output. outFileBase has to contain the path (otherwise, files will be saved in the current directory). The file containing the rigidity bins must be a text file. It must contain both the lower and upper limits of the rigidity axis, so that if it contains N values it defines a set of N-1 bins.

Parameters:
actionName The action's name.
outFileBase The output file base name.
rigBinsFile The file containing the rigidity bins


Member Function Documentation

void FluxHistoAction::Finalize (  )  [virtual]

Writes the histogram to the output files (ASCII and ROOT).

The output consists of a text file and of a ROOT file where the 1-dimensional rigidity histogram (TH1F) is saved. The format of the text output is: (lower bin limit) (upper bin limit) (# of events).

Reimplemented from CollectionAction.

void FluxHistoAction::OnGood ( PamLevel2 *  event  )  [virtual]

Fills histogram with the selected event.

Parameters:
event The selected event.

Reimplemented from CollectionAction.


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

Generated on Fri Jun 5 15:09:02 2009 for PamCut by  doxygen 1.5.9