Project
Loading...
Searching...
No Matches
o2::eventgen::GeneratorFromEventPool Class Reference

#include <GeneratorFromFile.h>

Inherits o2::eventgen::Generator.

Public Member Functions

 GeneratorFromEventPool ()=default
 
 GeneratorFromEventPool (EventPoolGenConfig const &pars)
 
bool Init () override
 
bool generateEvent () override
 
bool importParticles () override
 
std::vector< std::string > setupFileUniverse (std::string const &path) const
 
std::vector< std::string > const & getFileUniverse () const
 
- Public Member Functions inherited from o2::eventgen::Generator
 Generator ()
 
 Generator (const Char_t *name, const Char_t *title="ALICEo2 Generator")
 
 ~Generator () override=default
 
Bool_t Init () override
 
Bool_t ReadEvent (FairPrimaryGenerator *primGen) final
 
virtual void updateHeader (o2::dataformats::MCEventHeader *eventHeader)
 
Bool_t triggerEvent ()
 
void setMomentumUnit (double val)
 
double getMomentumUnit () const
 
void setEnergyUnit (double val)
 
double getEnergyUnit () const
 
void setPositionUnit (double val)
 
double getPositionUnit () const
 
void setTimeUnit (double val)
 
double getTimeUnit () const
 
void setBoost (Double_t val)
 
void setTriggerMode (ETriggerMode_t val)
 
void addTrigger (Trigger trigger)
 
void addDeepTrigger (DeepTrigger trigger)
 
const std::vector< TParticle > & getParticles () const
 
void clearParticles ()
 
virtual void notifyEmbedding (const o2::dataformats::MCEventHeader *eventHeader)
 
void setTriggerOkHook (std::function< void(std::vector< TParticle > const &p, int eventCount)> f)
 
void setTriggerFalseHook (std::function< void(std::vector< TParticle > const &p, int eventCount)> f)
 

Static Public Attributes

static constexpr std::string_view eventpool_filename = "evtpool.root"
 
static constexpr std::string_view alien_protocol_prefix = "alien://"
 

Additional Inherited Members

- Public Types inherited from o2::eventgen::Generator
enum  ETriggerMode_t { kTriggerOFF , kTriggerOR , kTriggerAND }
 
- Static Public Member Functions inherited from o2::eventgen::Generator
static void setTotalNEvents (unsigned int &n)
 
static unsigned int getTotalNEvents ()
 
- Protected Member Functions inherited from o2::eventgen::Generator
 Generator (const Generator &)
 
Generatoroperator= (const Generator &)
 
Bool_t addTracks (FairPrimaryGenerator *primGen)
 
Bool_t boostEvent ()
 
void addSubGenerator (int subGeneratorId, std::string const &subGeneratorDescription)
 
void notifySubGenerator (int subGeneratorId)
 
- Protected Attributes inherited from o2::eventgen::Generator
voidmInterface = nullptr
 
std::string mInterfaceName
 
ETriggerMode_t mTriggerMode = kTriggerOFF
 
std::vector< TriggermTriggers
 
std::vector< DeepTriggermDeepTriggers
 
std::function< void(std::vector< TParticle > const &p, int eventCount)> mTriggerOkHook = [](std::vector<TParticle> const& p, int eventCount) {}
 
std::function< void(std::vector< TParticle > const &p, int eventCount)> mTriggerFalseHook = [](std::vector<TParticle> const& p, int eventCount) {}
 
int mReadEventCounter = 0
 
double mMomentumUnit = 1.
 
double mEnergyUnit = 1.
 
double mPositionUnit = 0.1
 
double mTimeUnit = 3.3356410e-12
 
std::vector< TParticle > mParticles
 
Double_t mBoost
 
int mThisInstanceID = 0
 
- Static Protected Attributes inherited from o2::eventgen::Generator
static std::atomic< intInstanceCounter {0}
 

Detailed Description

Special generator for event pools. What do we like to have:

  • ability to give a file which contains the list of files to read
  • ability to give directly a file to read the event from
  • ability to give a pool path and to find the top N list of files closest to myself
  • ability to select itself one file from the pool

Definition at line 120 of file GeneratorFromFile.h.

Constructor & Destructor Documentation

◆ GeneratorFromEventPool() [1/2]

o2::eventgen::GeneratorFromEventPool::GeneratorFromEventPool ( )
default

◆ GeneratorFromEventPool() [2/2]

o2::eventgen::GeneratorFromEventPool::GeneratorFromEventPool ( EventPoolGenConfig const &  pars)

Definition at line 382 of file GeneratorFromFile.cxx.

Member Function Documentation

◆ generateEvent()

bool o2::eventgen::GeneratorFromEventPool::generateEvent ( )
inlineoverridevirtual

methods to override

Implements o2::eventgen::Generator.

Definition at line 132 of file GeneratorFromFile.h.

◆ getFileUniverse()

std::vector< std::string > const & o2::eventgen::GeneratorFromEventPool::getFileUniverse ( ) const
inline

Definition at line 149 of file GeneratorFromFile.h.

◆ importParticles()

bool o2::eventgen::GeneratorFromEventPool::importParticles ( )
inlineoverridevirtual

Implements o2::eventgen::Generator.

Definition at line 136 of file GeneratorFromFile.h.

◆ Init()

bool o2::eventgen::GeneratorFromEventPool::Init ( )
override

Definition at line 386 of file GeneratorFromFile.cxx.

◆ setupFileUniverse()

std::vector< std::string > o2::eventgen::GeneratorFromEventPool::setupFileUniverse ( std::string const &  path) const

A function determining the universe of event pool files, as determined by the path string returns empty vector if it fails

Definition at line 511 of file GeneratorFromFile.cxx.

Member Data Documentation

◆ alien_protocol_prefix

constexpr std::string_view o2::eventgen::GeneratorFromEventPool::alien_protocol_prefix = "alien://"
staticconstexpr

Definition at line 124 of file GeneratorFromFile.h.

◆ eventpool_filename

constexpr std::string_view o2::eventgen::GeneratorFromEventPool::eventpool_filename = "evtpool.root"
staticconstexpr

Definition at line 123 of file GeneratorFromFile.h.


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