Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HepMCG4AsciiReader Class Reference

#include <HepMCG4AsciiReader.hh>

Inheritance diagram for HepMCG4AsciiReader:
Collaboration diagram for HepMCG4AsciiReader:

Public Member Functions

 HepMCG4AsciiReader ()
 
 ~HepMCG4AsciiReader ()
 
void SetFileName (G4String name)
 
G4String GetFileName () const
 
void SetVerboseLevel (G4int i)
 
G4int GetVerboseLevel () const
 
void Initialize ()
 
 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)
 
 HepMCG4Interface ()
 
virtual ~HepMCG4Interface ()
 
HepMC::GenEvent * GetHepMCGenEvent () const
 
virtual void GeneratePrimaryVertex (G4Event *anEvent)
 
- Public Member Functions inherited from G4VPrimaryGenerator
 G4VPrimaryGenerator ()
 
virtual ~G4VPrimaryGenerator ()
 
G4ThreeVector GetParticlePosition ()
 
G4double GetParticleTime ()
 
void SetParticlePosition (G4ThreeVector aPosition)
 
void SetParticleTime (G4double aTime)
 

Protected Member Functions

virtual HepMC::GenEvent * GenerateHepMCEvent ()
 
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)
 
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
 
- Protected Attributes inherited from G4VPrimaryGenerator
G4ThreeVector particle_position
 
G4double particle_time
 

Additional Inherited Members

- Static Public Member Functions inherited from G4VPrimaryGenerator
static G4bool CheckVertexInsideWorld (const G4ThreeVector &pos)
 

Detailed Description

Definition at line 40 of file HepMCG4AsciiReader.hh.

Constructor & Destructor Documentation

HepMCG4AsciiReader::HepMCG4AsciiReader ( )

Definition at line 39 of file HepMCG4AsciiReader.cc.

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

Definition at line 48 of file HepMCG4AsciiReader.cc.

49 {
50  delete asciiInput;
51  delete messenger;
52 }
HepMCG4AsciiReaderMessenger * messenger
HepMC::IO_GenEvent * asciiInput
HepMCG4AsciiReader::HepMCG4AsciiReader ( )
HepMCG4AsciiReader::~HepMCG4AsciiReader ( )

Member Function Documentation

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

Reimplemented from HepMCG4Interface.

Definition at line 63 of file HepMCG4AsciiReader.cc.

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

Here is the call graph for this function:

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

Reimplemented from HepMCG4Interface.

G4String HepMCG4AsciiReader::GetFileName ( ) const
G4String HepMCG4AsciiReader::GetFileName ( ) const
inline

Definition at line 74 of file HepMCG4AsciiReader.hh.

75 {
76  return filename;
77 }
G4int HepMCG4AsciiReader::GetVerboseLevel ( ) const
inline

Definition at line 84 of file HepMCG4AsciiReader.hh.

85 {
86  return verbose;
87 }
G4int HepMCG4AsciiReader::GetVerboseLevel ( ) const
void HepMCG4AsciiReader::Initialize ( )
void HepMCG4AsciiReader::Initialize ( )

Definition at line 55 of file HepMCG4AsciiReader.cc.

56 {
57  delete asciiInput;
58 
59  asciiInput= new HepMC::IO_GenEvent(filename.c_str(), std::ios::in);
60 }
HepMC::IO_GenEvent * asciiInput
void HepMCG4AsciiReader::SetFileName ( G4String  name)
void HepMCG4AsciiReader::SetFileName ( G4String  name)
inline

Definition at line 69 of file HepMCG4AsciiReader.hh.

70 {
71  filename= name;
72 }
const XML_Char * name
Definition: expat.h:151
void HepMCG4AsciiReader::SetVerboseLevel ( G4int  i)
void HepMCG4AsciiReader::SetVerboseLevel ( G4int  i)
inline

Definition at line 79 of file HepMCG4AsciiReader.hh.

80 {
81  verbose= i;
82 }

Member Data Documentation

HepMC::IO_GenEvent * HepMCG4AsciiReader::asciiInput
protected

Definition at line 43 of file HepMCG4AsciiReader.hh.

G4String HepMCG4AsciiReader::filename
protected

Definition at line 42 of file HepMCG4AsciiReader.hh.

HepMCG4AsciiReaderMessenger * HepMCG4AsciiReader::messenger
protected

Definition at line 46 of file HepMCG4AsciiReader.hh.

G4int HepMCG4AsciiReader::verbose
protected

Definition at line 45 of file HepMCG4AsciiReader.hh.


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