GGS(GenericGEANT4Simulation)Software  2.7.0
 All Data Structures Namespaces Files Functions Variables Typedefs Macros
Public Member Functions
GGSTChainReader Class Referenceabstract

Abstract class defining the interface for tree readers. More...

#include <GGSTChainReader.h>

Inheritance diagram for GGSTChainReader:
Inheritance graph
[legend]

Public Member Functions

virtual ~GGSTChainReader ()
 Destructor.
 
virtual bool SetChain (TChain *chain)=0
 Sets the chain. More...
 
virtual void GetEntry (Long64_t entry)=0
 

Detailed Description

Abstract class defining the interface for tree readers.

A GGS user action that produce output on ROOT file generally create a tree to store data. To read this tree, a reader class is desirable. This class defines an interface for tree-reader classes which can be managed by GGSTRootReader. To be more general and cover also the case of chained trees, this interface refers to TChain objects.

Definition at line 23 of file GGSTChainReader.h.

Member Function Documentation

virtual void GGSTChainReader::GetEntry ( Long64_t  entry)
pure virtual

Reads The specified entry.

This method will be called by GGSTRootReader; concrete implementations have to properly load the event from the branches they manage.

Parameters
entryThe entry to be read.

Implemented in GGSTHitsReader, GGSTHadrIntReader, GGSTPrimaryDisReader, GGSTLostEnergyReader, GGSTMCTruthReader, and GGSTRandomStatusReader.

virtual bool GGSTChainReader::SetChain ( TChain *  chain)
pure virtual

Sets the chain.

Concrete implementations must define the initialization operations to be done on data chain, like SetBranchAddress etc. This method is called automatically by GGSTRootReader when a concrete reader is instantiated. The method returns true if the chain contains the branch(es) to be read by the reader.

Parameters
treeThe data tree.
Returns
true if the required branch(es) exist(s) in the tree.

Implemented in GGSTHitsReader, GGSTHadrIntReader, GGSTPrimaryDisReader, GGSTLostEnergyReader, GGSTMCTruthReader, and GGSTRandomStatusReader.


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