CbmRoot
CbmShieldGenerator Class Reference

#include <CbmShieldGenerator.h>

Inheritance diagram for CbmShieldGenerator:
[legend]
Collaboration diagram for CbmShieldGenerator:
[legend]

Public Member Functions

 CbmShieldGenerator ()
 
 CbmShieldGenerator (const char *fileName)
 
virtual ~CbmShieldGenerator ()
 
virtual Bool_t ReadEvent (FairPrimaryGenerator *primGen)
 
void SetPartType (int partType)
 

Private Member Functions

void CloseInput ()
 
Int_t RegisterIons ()
 
 CbmShieldGenerator (const CbmShieldGenerator &)
 
CbmShieldGeneratoroperator= (const CbmShieldGenerator &)
 
 ClassDef (CbmShieldGenerator, 2)
 

Private Attributes

std::ifstream * fInputFile
 
const Char_t * fFileName
 Input file stream. More...
 
TDatabasePDG * fPDG
 Input file Name. More...
 
int fpartType
 PDG database. More...
 
std::map< TString, FairIon * > fIonMap
 

Detailed Description

Definition at line 38 of file CbmShieldGenerator.h.

Constructor & Destructor Documentation

◆ CbmShieldGenerator() [1/3]

CbmShieldGenerator::CbmShieldGenerator ( )

Default constructor without arguments should not be used.

Definition at line 24 of file CbmShieldGenerator.cxx.

◆ CbmShieldGenerator() [2/3]

CbmShieldGenerator::CbmShieldGenerator ( const char *  fileName)

Standard constructor.

Parameters
fileNameThe input file name

Definition at line 35 of file CbmShieldGenerator.cxx.

References CloseInput(), fFileName, fInputFile, and RegisterIons().

◆ ~CbmShieldGenerator()

CbmShieldGenerator::~CbmShieldGenerator ( )
virtual

Destructor.

Definition at line 57 of file CbmShieldGenerator.cxx.

References CloseInput().

◆ CbmShieldGenerator() [3/3]

CbmShieldGenerator::CbmShieldGenerator ( const CbmShieldGenerator )
private

Member Function Documentation

◆ ClassDef()

CbmShieldGenerator::ClassDef ( CbmShieldGenerator  ,
 
)
private

◆ CloseInput()

void CbmShieldGenerator::CloseInput ( )
private

Private method CloseInput. Just for convenience. Closes the input file properly. Called from destructor and from ReadEvent.

Definition at line 163 of file CbmShieldGenerator.cxx.

References fFileName, and fInputFile.

Referenced by CbmShieldGenerator(), ReadEvent(), and ~CbmShieldGenerator().

◆ operator=()

CbmShieldGenerator& CbmShieldGenerator::operator= ( const CbmShieldGenerator )
private

◆ ReadEvent()

Bool_t CbmShieldGenerator::ReadEvent ( FairPrimaryGenerator *  primGen)
virtual

Reads on event from the input file and pushes the tracks onto the stack. Abstract method in base class.

Parameters
primGenpointer to the FairPrimaryGenerator

Definition at line 62 of file CbmShieldGenerator.cxx.

References CloseInput(), fInputFile, and fpartType.

◆ RegisterIons()

Int_t CbmShieldGenerator::RegisterIons ( )
private

Private method RegisterIons. Goes through the input file and registers any ion needed.

Definition at line 178 of file CbmShieldGenerator.cxx.

References buffer, fInputFile, and fIonMap.

Referenced by CbmShieldGenerator().

◆ SetPartType()

void CbmShieldGenerator::SetPartType ( int  partType)
inline

Definition at line 62 of file CbmShieldGenerator.h.

References fpartType.

Member Data Documentation

◆ fFileName

const Char_t* CbmShieldGenerator::fFileName
private

Input file stream.

Definition at line 66 of file CbmShieldGenerator.h.

Referenced by CbmShieldGenerator(), and CloseInput().

◆ fInputFile

std::ifstream* CbmShieldGenerator::fInputFile
private

Definition at line 65 of file CbmShieldGenerator.h.

Referenced by CbmShieldGenerator(), CloseInput(), ReadEvent(), and RegisterIons().

◆ fIonMap

std::map<TString, FairIon*> CbmShieldGenerator::fIonMap
private

STL map from ion name to FairIon

Definition at line 82 of file CbmShieldGenerator.h.

Referenced by RegisterIons().

◆ fpartType

int CbmShieldGenerator::fpartType
private

PDG database.

Definition at line 69 of file CbmShieldGenerator.h.

Referenced by ReadEvent(), and SetPartType().

◆ fPDG

TDatabasePDG* CbmShieldGenerator::fPDG
private

Input file Name.

Definition at line 67 of file CbmShieldGenerator.h.


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