GGS(GenericGEANT4Simulation)Software  2.6.0
 All Data Structures Namespaces Files Functions Variables Typedefs Macros
Public Member Functions
GGSTRandomStatusReader Class Reference

Class for reading output of GGSRandomStatusAction. More...

#include <GGSTRandomStatusReader.h>

Inheritance diagram for GGSTRandomStatusReader:
Inheritance graph
[legend]
Collaboration diagram for GGSTRandomStatusReader:
Collaboration graph
[legend]

Public Member Functions

 GGSTRandomStatusReader ()
 Constructor.
 
 ~GGSTRandomStatusReader ()
 Destructor.
 
bool SetChain (TChain *randomStatusChain)
 Sets the chain. More...
 
void GetEntry (Long64_t entry)
 
long GetSeed (unsigned int nSeed)
 Gets the specified seed. More...
 
- Public Member Functions inherited from GGSTChainReader
virtual ~GGSTChainReader ()
 Destructor.
 

Detailed Description

Class for reading output of GGSRandomStatusAction.

Definition at line 18 of file GGSTRandomStatusReader.h.

Member Function Documentation

void GGSTRandomStatusReader::GetEntry ( Long64_t  entry)
virtual

@ brief Reads the specified entry from the random status branch.

Parameters
entryThe desired entry.

Implements GGSTChainReader.

Definition at line 40 of file GGSTRandomStatusReader.cpp.

40  {
41  if (entry != _randomStatusChain->GetEntries()) {
42  _randomStatusChain->GetEntry(entry);
43  }
44 }
long GGSTRandomStatusReader::GetSeed ( unsigned int  nSeed)
inline

Gets the specified seed.

Parameters
nSeedThe index of the desired seed (possible values: 0 or 1).
Returns
The requested seed (-1 if nSeed is invalid).

Definition at line 47 of file GGSTRandomStatusReader.h.

47  {
48  if (nSeed < 2)
49  return _randomStatusInfo->seeds[nSeed];
50  else
51  return -1;
52  }
Long_t seeds[2]
Seeds defining the status of the engine.
bool GGSTRandomStatusReader::SetChain ( TChain *  randomStatusChain)
virtual

Sets the chain.

This method sets the random status chain, from which the informations will be read.

Parameters
mcTruthChainThe chain containing the random status.

Implements GGSTChainReader.

Definition at line 27 of file GGSTRandomStatusReader.cpp.

27  {
28 
29  _randomStatusChain = randomStatusChain;
30  if (_randomStatusChain->SetBranchAddress("randomStatus", &_randomStatusInfo) != 0) {
31  return true;
32  }
33  else
34  return false;
35 
36 }

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