Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

AnalysisHandler Class Reference

#include <AnalysisHandler.hh>

Collaboration diagram for AnalysisHandler:

Collaboration graph
[legend]
List of all members.

Detailed Description

A class which handles a number of analysis objects to be applied to generated events. An Analysis' AnalysisHandler is also responsible for handling the final writing-out of histograms.

Definition at line 20 of file AnalysisHandler.hh.


Public Member Functions

AnalysisHandleraddAnalysis (const string &analysisname)
template<typename A>
AnalysisHandleraddAnalysis (const A &analysis)
void init (int i=0, int N=0)
void analyze (const GenEvent &event)
void finalize ()
AIDA::IAnalysisFactoryanalysisFactory ()
 The AIDA analysis factory.
AIDA::ITreetree ()
 The AIDA tree object.
AIDA::IHistogramFactoryhistogramFactory ()
 The AIDA histogram factory.
AIDA::IDataPointSetFactory & datapointsetFactory ()
 The AIDA histogram factory.
Standard constructors and destructors. */
 AnalysisHandler (AIDA::IAnalysisFactory &afac, string basefilename="Rivet", HistoFormat storetype=AIDAML)
 AnalysisHandler (string basefilename="Rivet", HistoFormat storetype=AIDAML)
 Make a Rivet handler with a set base filename and store type.
 ~AnalysisHandler ()
 The destructor is not virtual as this class should not be inherited from.

Constructor & Destructor Documentation

AnalysisHandler AIDA::IAnalysisFactory afac,
string  basefilename = "Rivet",
HistoFormat  storetype = AIDAML
 

The standard constructor.

Parameters:
filename the name of the file (no extension) where histograms are to be stored.
storetype a string indicating to the AIDA analysis factory how to store the histograms. Which strings are allowed depends on actual AIDA implementation used. To output in standard AIDA XML the string is typically "xml".
afac an AIDA analysis factory object. The caller must make sure that the lifetime of the factory object exceeds the AnalysisHandler object.

Definition at line 81 of file AnalysisHandler.cc.

AnalysisHandler string  basefilename = "Rivet",
HistoFormat  storetype = AIDAML
 

Make a Rivet handler with a set base filename and store type.

Definition at line 74 of file AnalysisHandler.cc.

References AIDA_createAnalysisFactory().

~AnalysisHandler  ) 
 

The destructor is not virtual as this class should not be inherited from.

Definition at line 87 of file AnalysisHandler.cc.


Member Function Documentation

AnalysisHandler& addAnalysis const A &  analysis  )  [inline]
 

Add an analysis to the run list by supplying a "template" analysis.

Todo:
Is there a good reason to not allow "direct" submission?

Definition at line 68 of file AnalysisHandler.hh.

AnalysisHandler & addAnalysis const string &  analysisname  ) 
 

Add an analysis to the run list using its name. The actual Analysis to be used will be obtained via AnalysisHandler::getAnalysis(string). If no matching analysis is found, no analysis is added (i.e. the null pointer is checked and discarded.

Definition at line 19 of file AnalysisHandler.cc.

References Analysis::_theHandler.

Referenced by main().

AIDA::IAnalysisFactory& analysisFactory  )  [inline]
 

The AIDA analysis factory.

Definition at line 96 of file AnalysisHandler.hh.

Referenced by Analysis::analysisFactory().

void analyze const GenEvent event  ) 
 

Analyze the given event. This function will call the AnalysisBase::analyze() function of all included analysis objects.

Definition at line 104 of file AnalysisHandler.cc.

Referenced by main().

AIDA::IDataPointSetFactory& datapointsetFactory  )  [inline]
 

The AIDA histogram factory.

Definition at line 114 of file AnalysisHandler.hh.

Referenced by Analysis::datapointsetFactory().

void finalize  ) 
 

Finalize a run. This function first calls the AnalysisBase::finalize() functions of all included analysis objects and then writes out all histograms to a file.

Definition at line 112 of file AnalysisHandler.cc.

References ITree::commit(), and AnalysisHandler::tree().

Referenced by main().

AIDA::IHistogramFactory& histogramFactory  )  [inline]
 

The AIDA histogram factory.

Definition at line 108 of file AnalysisHandler.hh.

Referenced by Analysis::histogramFactory().

void init int  i = 0,
int  N = 0
 

Initialize a run. If this run is to be joined together with other runs, N should be set to the total number of runs to be combined, and i should be the index of this run. This function will initialize the histogram factory and then call the AnalysisBase::init() function of all included analysis objects.

Definition at line 94 of file AnalysisHandler.cc.

Referenced by main().

AIDA::ITree& tree  )  [inline]
 

The AIDA tree object.

Definition at line 102 of file AnalysisHandler.hh.

Referenced by AnalysisHandler::finalize(), and Analysis::tree().


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