HepMC event record
Public Member Functions | Data Fields | Private Attributes
WriterHEPEVT Class Reference

Detailed Description

GenEvent I/O serialization for HEPEVT files.

Definition at line 23 of file build/outputs/include/HepMC/WriterHEPEVT.h.

#include <WriterHEPEVT.h>

+ Inheritance diagram for WriterHEPEVT:
+ Collaboration diagram for WriterHEPEVT:

Public Member Functions

 WriterHEPEVT (const std::string &filename)
 Default constructor. More...
 
virtual void write_hepevt_particle (int index, bool iflong=true)
 Write particle to file. More...
 
virtual void write_hepevt_event_header ()
 Write event header to file. More...
 
void write_event (const GenEvent &evt)
 Write event to file. More...
 
void close ()
 Close file stream. More...
 
bool failed ()
 Get stream error state flag. More...
 
 WriterHEPEVT (const std::string &filename)
 Default constructor. More...
 
virtual void write_hepevt_particle (int index, bool iflong=true)
 Write particle to file. More...
 
virtual void write_hepevt_event_header ()
 Write event header to file. More...
 
void write_event (const GenEvent &evt)
 Write event to file. More...
 
void close ()
 Close file stream. More...
 
bool failed ()
 Get stream error state flag. More...
 
void set_run_info (shared_ptr< GenRunInfo > run)
 Set the global GenRunInfo object. More...
 
void set_run_info (shared_ptr< GenRunInfo > run)
 Set the global GenRunInfo object. More...
 
shared_ptr< GenRunInforun_info () const
 Get the global GenRunInfo object. More...
 
shared_ptr< GenRunInforun_info () const
 Get the global GenRunInfo object. More...
 

Data Fields

FILE * m_file
 File to write. Need to be public to be accessible by children. More...
 

Private Attributes

char * hepevtbuffer
 Pointer to HEPEVT Fortran common block/C struct. More...
 
int m_events_count
 Events count. Needed to generate unique object name. More...
 

Constructor & Destructor Documentation

◆ WriterHEPEVT() [1/2]

WriterHEPEVT ( const std::string &  filename)

Default constructor.

Warning
If file exists, it will be overwritten

Definition at line 16 of file WriterHEPEVT.cc.

References WriterHEPEVT::hepevtbuffer, WriterHEPEVT::m_file, and HEPEVT_Wrapper::set_hepevt_address().

◆ WriterHEPEVT() [2/2]

WriterHEPEVT ( const std::string &  filename)

Default constructor.

Warning
If file exists, it will be overwritten

Member Function Documentation

◆ close() [1/2]

void close ( )
virtual

Close file stream.

Implements Writer.

Definition at line 54 of file WriterHEPEVT.cc.

References WriterHEPEVT::m_file.

◆ close() [2/2]

void close ( )
virtual

Close file stream.

Implements Writer.

◆ failed() [1/2]

bool failed ( )
virtual

Get stream error state flag.

Implements Writer.

Definition at line 59 of file WriterHEPEVT.cc.

◆ failed() [2/2]

bool failed ( )
virtual

Get stream error state flag.

Implements Writer.

◆ run_info() [1/2]

shared_ptr<GenRunInfo> run_info ( ) const
inlineinherited

Get the global GenRunInfo object.

Definition at line 42 of file build/outputs/include/HepMC/Writer.h.

References Writer::m_run_info.

◆ run_info() [2/2]

shared_ptr<GenRunInfo> run_info ( ) const
inlineinherited

Get the global GenRunInfo object.

Definition at line 42 of file include/HepMC/Writer.h.

References Writer::m_run_info.

◆ set_run_info() [1/2]

void set_run_info ( shared_ptr< GenRunInfo run)
inlineinherited

Set the global GenRunInfo object.

Definition at line 37 of file build/outputs/include/HepMC/Writer.h.

References Writer::m_run_info.

◆ set_run_info() [2/2]

void set_run_info ( shared_ptr< GenRunInfo run)
inlineinherited

Set the global GenRunInfo object.

Definition at line 37 of file include/HepMC/Writer.h.

References Writer::m_run_info.

◆ write_event() [1/2]

void write_event ( const GenEvent evt)
virtual

Write event to file.

Parameters
[in]evtEvent to be serialized

Implements Writer.

◆ write_event() [2/2]

void write_event ( const GenEvent evt)
virtual

◆ write_hepevt_event_header() [1/2]

virtual void write_hepevt_event_header ( )
virtual

Write event header to file.

Reimplemented in WriterHEPEVTZEUS.

◆ write_hepevt_event_header() [2/2]

void write_hepevt_event_header ( )
virtual

Write event header to file.

Reimplemented in WriterHEPEVTZEUS.

Definition at line 40 of file WriterHEPEVT.cc.

References HEPEVT_Wrapper::event_number(), WriterHEPEVT::m_file, and HEPEVT_Wrapper::number_entries().

◆ write_hepevt_particle() [1/2]

virtual void write_hepevt_particle ( int  index,
bool  iflong = true 
)
virtual

Write particle to file.

Parameters
[in]indexParticle to be serialized
[in]iflongFormat of record

Reimplemented in WriterHEPEVTZEUS.

◆ write_hepevt_particle() [2/2]

void write_hepevt_particle ( int  index,
bool  iflong = true 
)
virtual

Field Documentation

◆ hepevtbuffer

char * hepevtbuffer
private

Pointer to HEPEVT Fortran common block/C struct.

Definition at line 66 of file build/outputs/include/HepMC/WriterHEPEVT.h.

◆ m_events_count

int m_events_count
private

Events count. Needed to generate unique object name.

Definition at line 67 of file build/outputs/include/HepMC/WriterHEPEVT.h.

◆ m_file

FILE * m_file

File to write. Need to be public to be accessible by children.

Definition at line 63 of file build/outputs/include/HepMC/WriterHEPEVT.h.


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