Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes
HepMCG4AsciiReader Class Reference

#include <HepMCG4AsciiReader.hh>

Inheritance diagram for HepMCG4AsciiReader:
HepMCG4Interface HepMCG4Interface G4VPrimaryGenerator G4VPrimaryGenerator G4VPrimaryGenerator G4VPrimaryGenerator

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 HepMCEx01/include/HepMCG4AsciiReader.hh.

Constructor & Destructor Documentation

HepMCG4AsciiReader::HepMCG4AsciiReader ( )

Definition at line 39 of file HepMCEx01/src/HepMCG4AsciiReader.cc.

References asciiInput, filename, and messenger.

HepMCG4AsciiReader::~HepMCG4AsciiReader ( )

Definition at line 48 of file HepMCEx01/src/HepMCG4AsciiReader.cc.

References asciiInput, and messenger.

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

Member Function Documentation

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

Reimplemented from HepMCG4Interface.

Definition at line 63 of file HepMCEx01/src/HepMCG4AsciiReader.cc.

References asciiInput, print(), and verbose.

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(const std::vector< T > &data)
Definition: DicomRun.hh:111
virtual HepMC::GenEvent* HepMCG4AsciiReader::GenerateHepMCEvent ( )
protectedvirtual

Reimplemented from HepMCG4Interface.

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

Definition at line 74 of file HepMCEx01/include/HepMCG4AsciiReader.hh.

References filename.

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

Definition at line 84 of file HepMCEx01/include/HepMCG4AsciiReader.hh.

References verbose.

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

Definition at line 55 of file HepMCEx01/src/HepMCG4AsciiReader.cc.

References asciiInput, and filename.

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

Definition at line 69 of file HepMCEx01/include/HepMCG4AsciiReader.hh.

References filename.

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

Definition at line 79 of file HepMCEx01/include/HepMCG4AsciiReader.hh.

References verbose.

Field Documentation

HepMC::IO_GenEvent * HepMCG4AsciiReader::asciiInput
protected
G4String HepMCG4AsciiReader::filename
protected
HepMCG4AsciiReaderMessenger * HepMCG4AsciiReader::messenger
protected
G4int HepMCG4AsciiReader::verbose
protected

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