EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
erhic::EventFromAsciiFactory< T > Class Template Reference

#include <eic-smear/blob/master/include/eicsmear/erhic/EventFactory.h>

+ Inheritance diagram for erhic::EventFromAsciiFactory< T >:
+ Collaboration diagram for erhic::EventFromAsciiFactory< T >:

Public Member Functions

 EventFromAsciiFactory ()
 
virtual ~EventFromAsciiFactory ()
 
 EventFromAsciiFactory (std::istream &is)
 
virtual TCreate ()
 
virtual std::string EventName () const
 
virtual void FindFirstEvent ()
 
template<>
void FindFirstEvent ()
 
template<>
erhic::EventHepMCCreate ()
 
- Public Member Functions inherited from erhic::VirtualEventFactory
virtual ~VirtualEventFactory ()
 
virtual VirtualEventGetEvBufferPtr ()
 
virtual TBranch * Branch (TTree &, const std::string &)
 
virtual void Fill (TBranch &)
 

Protected Member Functions

bool AtEndOfEvent () const
 
Int_t FinishEvent ()
 
bool AddParticle ()
 
template<>
bool AtEndOfEvent () const
 
template<>
bool AddParticle ()
 

Protected Attributes

std::istream * mInput
 
std::string mLine
 
std::unique_ptr< TmEvent
 

Additional Inherited Members

- Public Types inherited from erhic::VirtualEventFactory
typedef std::pair< TString,
TObject * > 
NamedObjects
 
- Public Attributes inherited from erhic::VirtualEventFactory
std::vector< NamedObjectsmObjectsToWriteAtTheEnd
 
std::map< std::string,
std::string > 
mAdditionalInformation
 

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 110 of file EventFactory.h.

View newest version in sPHENIX GitHub at line 110 of file EventFactory.h

Constructor & Destructor Documentation

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

Constructor.

Definition at line 115 of file EventFactory.h.

View newest version in sPHENIX GitHub at line 115 of file EventFactory.h

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

Destructor.

Definition at line 120 of file EventFactory.h.

View newest version in sPHENIX GitHub at line 120 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 125 of file EventFactory.h.

View newest version in sPHENIX GitHub at line 125 of file EventFactory.h

Member Function Documentation

template<>
bool erhic::EventFromAsciiFactory< erhic::EventHepMC >::AddParticle ( )
protected

Definition at line 93 of file EventFactoryHepMC.cxx.

View newest version in sPHENIX GitHub at line 93 of file EventFactoryHepMC.cxx

References c, HepMC3::deduce_reader(), erhic::HandleAllVertices(), erhic::HandleHepmcParticle(), boost::swap(), erhic::UpdateRuninfo(), and v.

+ Here is the call graph for this function:

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 172 of file EventFactory.cxx.

View newest version in sPHENIX GitHub at line 172 of file EventFactory.cxx

References particle.

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

Definition at line 85 of file EventFactoryHepMC.cxx.

View newest version in sPHENIX GitHub at line 85 of file EventFactoryHepMC.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 51 of file EventFactory.cxx.

View newest version in sPHENIX GitHub at line 51 of file EventFactory.cxx

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

Returns a new event instance.

Implements erhic::VirtualEventFactory.

Definition at line 73 of file EventFactory.cxx.

View newest version in sPHENIX GitHub at line 73 of file EventFactory.cxx

References getFirstNonBlank(), getline, and T.

+ Here is the call graph for this function:

Returns a new event instance.

Implements erhic::VirtualEventFactory.

Definition at line 308 of file EventFactoryHepMC.cxx.

View newest version in sPHENIX GitHub at line 308 of file EventFactoryHepMC.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 193 of file EventFactory.cxx.

View newest version in sPHENIX GitHub at line 193 of file EventFactory.cxx

template<>
void erhic::EventFromAsciiFactory< erhic::EventHepMC >::FindFirstEvent ( )
virtual

if we need to skip lines to get to the first event

Reimplemented from erhic::VirtualEventFactory.

Definition at line 88 of file EventFactoryHepMC.cxx.

View newest version in sPHENIX GitHub at line 88 of file EventFactoryHepMC.cxx

template<typename T >
void erhic::EventFromAsciiFactory< T >::FindFirstEvent ( )
virtual

if we need to skip lines to get to the first event

Reimplemented from erhic::VirtualEventFactory.

Definition at line 198 of file EventFactory.cxx.

View newest version in sPHENIX GitHub at line 198 of file EventFactory.cxx

References getline.

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

Perform end-of-event operations.

Definition at line 132 of file EventFactory.cxx.

View newest version in sPHENIX GitHub at line 132 of file EventFactory.cxx

References BeamParticles::BeamHadron(), BeamParticles::BeamLepton(), erhic::LeptonKinematicsComputer::Calculate(), erhic::JacquetBlondelComputer::Calculate(), erhic::DoubleAngleComputer::Calculate(), Acts::UnitConstants::h, ParticleIdentifier::IdentifyBeams(), n, Acts::UnitConstants::nm, Acts::UnitConstants::s, and BeamParticles::ScatteredLepton().

+ Here is the call graph for this function:

Member Data Documentation

template<typename T>
std::unique_ptr<T> erhic::EventFromAsciiFactory< T >::mEvent
protected

Definition at line 145 of file EventFactory.h.

View newest version in sPHENIX GitHub at line 145 of file EventFactory.h

template<typename T>
std::istream* erhic::EventFromAsciiFactory< T >::mInput
protected

Definition at line 143 of file EventFactory.h.

View newest version in sPHENIX GitHub at line 143 of file EventFactory.h

template<typename T>
std::string erhic::EventFromAsciiFactory< T >::mLine
protected

Definition at line 144 of file EventFactory.h.

View newest version in sPHENIX GitHub at line 144 of file EventFactory.h


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