eic-smear  1.0.3
A collection of ROOT classes for Monte Carlo events and a fast-smearing code simulating detector effects for the Electron-Ion Collider task force
erhic::EventFromAsciiFactory< T > Class Template Reference

#include <EventFactory.h>

Inheritance diagram for erhic::EventFromAsciiFactory< T >:
erhic::VirtualEventFactory

Public Member Functions

 EventFromAsciiFactory ()
 
virtual ~EventFromAsciiFactory ()
 
 EventFromAsciiFactory (std::istream &is)
 
virtual T * Create ()
 
virtual std::string EventName () const
 
- Public Member Functions inherited from erhic::VirtualEventFactory
virtual ~VirtualEventFactory ()
 
virtual VirtualEventGetEvBufferPtr ()
 
virtual TBranch * Branch (TTree &, const std::string &)
 
virtual void Fill (TBranch &)
 

Public Attributes

std::istream * mInput
 
std::string mLine
 
std::auto_ptr< T > mEvent
 

Protected Member Functions

bool AtEndOfEvent () const
 
Int_t FinishEvent ()
 
bool AddParticle ()
 

Detailed Description

template<typename T>
class erhic::EventFromAsciiFactory< T >

Creates events from an input plain text file containing appropriately formatted data. Templated for all the types inheriting from EventMC (any event class implementing a Parse() method to populate the event's variables from a string will work.)

Definition at line 86 of file EventFactory.h.

Constructor & Destructor Documentation

template<typename T>
erhic::EventFromAsciiFactory< T >::EventFromAsciiFactory ( )
inline

Constructor.

Definition at line 91 of file EventFactory.h.

template<typename T>
virtual erhic::EventFromAsciiFactory< T >::~EventFromAsciiFactory ( )
inlinevirtual

Destructor.

Definition at line 96 of file EventFactory.h.

template<typename T>
erhic::EventFromAsciiFactory< T >::EventFromAsciiFactory ( std::istream &  is)
inlineexplicit

Initialise the factory from an input stream.

Definition at line 101 of file EventFactory.h.

Member Function Documentation

template<typename T >
bool erhic::EventFromAsciiFactory< T >::AddParticle ( )
protected

Create a new particle from the last data read from the input stream.

Definition at line 157 of file EventFactory.cxx.

template<typename T >
bool erhic::EventFromAsciiFactory< T >::AtEndOfEvent ( ) const
protected

Returns true when an end-of-event marker is encountered in the input stream.

Definition at line 35 of file EventFactory.cxx.

template<typename T >
T * erhic::EventFromAsciiFactory< T >::Create ( )
virtual

Returns a new event instance.

Implements erhic::VirtualEventFactory.

Definition at line 57 of file EventFactory.cxx.

template<typename T >
std::string erhic::EventFromAsciiFactory< T >::EventName ( ) const
virtual

Returns the name of the event class created by this factory.

Implements erhic::VirtualEventFactory.

Definition at line 173 of file EventFactory.cxx.

template<typename T >
Int_t erhic::EventFromAsciiFactory< T >::FinishEvent ( )
protected

Perform end-of-event operations.

Definition at line 116 of file EventFactory.cxx.


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