Celeritas  0.5.0-86+4a8eea4
Public Member Functions | List of all members
celeritas::RootEventReader Class Reference

Read ROOT file generated by RootEventWriter . More...

#include <RootEventReader.hh>

Inheritance diagram for celeritas::RootEventReader:
Inheritance graph
[legend]

Public Types

Type aliases
using SPConstParticles = std::shared_ptr< ParticleParams const >
 
using result_type = std::vector< Primary >
 
- Public Types inherited from celeritas::EventReaderInterface
using VecPrimary = std::vector< Primary >
 
using result_type = VecPrimary
 

Public Member Functions

 RootEventReader (std::string const &filename, SPConstParticles params)
 Construct with ROOT input filename.
 
 CELER_DELETE_COPY_MOVE (RootEventReader)
 Prevent copying and moving.
 
result_type operator() (EventId event_id)
 Read a specific single event from the primaries tree.
 
result_type operator() () final
 Read single event from the primaries tree.
 
size_type num_events () const final
 Get total number of events.
 

Additional Inherited Members

- Protected Member Functions inherited from celeritas::EventReaderInterface
 EventReaderInterface ()=default
 
 CELER_DEFAULT_COPY_MOVE (EventReaderInterface)
 

Detailed Description

Read ROOT file generated by RootEventWriter .

Each operator() call returns a vector of primaries from a single event.

RootEventReader read("primaries.root", particle_params);
RootEventReader::result_type event;
while (event = read(), !event.empty())
{
// Do stuff
}
RootEventReader(std::string const &filename, SPConstParticles params)
Construct with ROOT input filename.
Definition: RootEventReader.cc:24

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