HepMC3 event record library
Public Member Functions | Private Attributes
Writer Class Referenceabstract

Detailed Description

Base class for all I/O writers.

Examples
convert_example.cc.

Definition at line 25 of file Writer.h.

#include <Writer.h>

+ Inheritance diagram for Writer:
+ Collaboration diagram for Writer:

Public Member Functions

virtual ~Writer ()
 Virtual destructor. More...
 
virtual void write_event (const GenEvent &evt)=0
 Write event evt to output target. More...
 
virtual bool failed ()=0
 Get file and/or stream error state. More...
 
virtual void close ()=0
 Close file and/or stream. 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...
 

Private Attributes

shared_ptr< GenRunInfom_run_info
 The global GenRunInfo object. More...
 

Constructor & Destructor Documentation

◆ ~Writer()

virtual ~Writer ( )
inlinevirtual

Virtual destructor.

Definition at line 29 of file Writer.h.

Member Function Documentation

◆ close()

virtual void close ( )
pure virtual

Close file and/or stream.

Implemented in WriterDOT, WriterAscii, WriterAsciiHepMC2, WriterHEPEVT, WriterRoot, and WriterRootTree.

Examples
convert_example.cc.

◆ failed()

virtual bool failed ( )
pure virtual

Get file and/or stream error state.

Implemented in WriterDOT, WriterAscii, WriterAsciiHepMC2, WriterHEPEVT, WriterRoot, and WriterRootTree.

◆ run_info()

shared_ptr< GenRunInfo > run_info ( ) const
inline

Get the global GenRunInfo object.

Definition at line 44 of file Writer.h.

References Writer::m_run_info.

◆ set_run_info()

void set_run_info ( shared_ptr< GenRunInfo run)
inline

Set the global GenRunInfo object.

Definition at line 39 of file Writer.h.

References Writer::m_run_info.

◆ write_event()

virtual void write_event ( const GenEvent evt)
pure virtual

Write event evt to output target.

Implemented in WriterDOT, WriterRootTreeOPAL, WriterAscii, WriterAsciiHepMC2, WriterHEPEVT, WriterRoot, and WriterRootTree.

Examples
convert_example.cc.

Field Documentation

◆ m_run_info

shared_ptr<GenRunInfo> m_run_info
private

The global GenRunInfo object.

Definition at line 51 of file Writer.h.


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