Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
HepMCG4AsciiReader Class Reference

#include <Doxymodules_eventgenerator.h>

Inheritance diagram for HepMCG4AsciiReader:
HepMCG4Interface G4VPrimaryGenerator

Public Member Functions

 HepMCG4AsciiReader ()
 
 ~HepMCG4AsciiReader ()
 
void SetFileName (G4String name)
 
G4String GetFileName () const
 
void SetVerboseLevel (G4int i)
 
G4int GetVerboseLevel () const
 
void Initialize ()
 
- Public Member Functions inherited from HepMCG4Interface
 HepMCG4Interface ()
 
virtual ~HepMCG4Interface ()
 
HepMC::GenEvent * GetHepMCGenEvent () const
 
virtual void GeneratePrimaryVertex (G4Event *anEvent)
 

Protected Member Functions

virtual HepMC::GenEvent * GenerateHepMCEvent ()
 
- Protected Member Functions inherited from HepMCG4Interface
virtual G4bool CheckVertexInsideWorld (const G4ThreeVector &pos) const
 
void HepMC2G4 (const HepMC::GenEvent *hepmcevt, G4Event *g4event)
 

Protected Attributes

G4String filename
 
HepMC::IO_GenEvent * asciiInput
 
G4int verbose
 
HepMCG4AsciiReaderMessengermessenger
 
- Protected Attributes inherited from HepMCG4Interface
HepMC::GenEvent * hepmcEvent
 

Detailed Description

Definition at line 56 of file Doxymodules_eventgenerator.h.

Constructor & Destructor Documentation

◆ HepMCG4AsciiReader()

HepMCG4AsciiReader::HepMCG4AsciiReader ( )

Definition at line 38 of file HepMCG4AsciiReader.cc.

39 : filename("xxx.dat"), verbose(0)
40{
41 asciiInput= new HepMC::IO_GenEvent(filename.c_str(), std::ios::in);
42
44}
HepMC::IO_GenEvent * asciiInput
HepMCG4AsciiReaderMessenger * messenger

◆ ~HepMCG4AsciiReader()

HepMCG4AsciiReader::~HepMCG4AsciiReader ( )

Definition at line 47 of file HepMCG4AsciiReader.cc.

48{
49 delete asciiInput;
50 delete messenger;
51}

Member Function Documentation

◆ GenerateHepMCEvent()

HepMC::GenEvent * HepMCG4AsciiReader::GenerateHepMCEvent ( )
protectedvirtual

Reimplemented from HepMCG4Interface.

Definition at line 62 of file HepMCG4AsciiReader.cc.

63{
64 HepMC::GenEvent* evt= asciiInput-> read_next_event();
65 if(!evt) return 0; // no more event
66
67 if(verbose>0) evt-> print();
68
69 return evt;
70}

◆ SetFileName()

void HepMCG4AsciiReader::SetFileName ( G4String  name)
inline

Definition at line 68 of file HepMCG4AsciiReader.hh.

69{
70 filename= name;
71}

◆ GetFileName()

G4String HepMCG4AsciiReader::GetFileName ( ) const
inline

Definition at line 73 of file HepMCG4AsciiReader.hh.

74{
75 return filename;
76}

◆ SetVerboseLevel()

void HepMCG4AsciiReader::SetVerboseLevel ( G4int  i)
inline

Definition at line 78 of file HepMCG4AsciiReader.hh.

79{
80 verbose= i;
81}

◆ GetVerboseLevel()

G4int HepMCG4AsciiReader::GetVerboseLevel ( ) const
inline

Definition at line 83 of file HepMCG4AsciiReader.hh.

84{
85 return verbose;
86}

◆ Initialize()

void HepMCG4AsciiReader::Initialize ( )

Definition at line 54 of file HepMCG4AsciiReader.cc.

55{
56 delete asciiInput;
57
58 asciiInput= new HepMC::IO_GenEvent(filename.c_str(), std::ios::in);
59}

Member Data Documentation

◆ filename

G4String HepMCG4AsciiReader::filename
protected

Definition at line 41 of file HepMCG4AsciiReader.hh.

◆ asciiInput

HepMC::IO_GenEvent* HepMCG4AsciiReader::asciiInput
protected

Definition at line 42 of file HepMCG4AsciiReader.hh.

◆ verbose

G4int HepMCG4AsciiReader::verbose
protected

Definition at line 44 of file HepMCG4AsciiReader.hh.

◆ messenger

HepMCG4AsciiReaderMessenger* HepMCG4AsciiReader::messenger
protected

Definition at line 45 of file HepMCG4AsciiReader.hh.


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

Applications | User Support | Publications | Collaboration