2 #define MT_LCREADER_H 1
15 #include "EVENT/LCIO.h"
25 class LCIORandomAccessMgr ;
std::size_t _bufferMaxSize
void readNextRecord(const LCReaderListenerList &listeners)
Reads the input stream and notifies listeners according to the object type found in the stream...
void readStream(const LCReaderListenerList &listeners)
Reads the input stream and notifies listeners according to the object type found in the stream...
void open(const std::string &filename)
Opens a file for reading (read-only).
int getNumberOfEvents()
Return the number of events in the file - the file has to be open.
void setReadCollectionNames(const std::vector< std::string > &colnames)
Limit the collection names that are going to be read to the subset given in the vector - all other co...
bool _readEventMap
Whether to read the event map using the random access manager.
std::ifstream _stream
The input file stream.
std::vector< std::string > _myFilenames
The list of files to open and read.
std::unique_ptr< EVENT::LCEvent > readEvent(int runNumber, int evtNumber, int accessMode=EVENT::LCIO::READ_ONLY)
Reads the specified event from file.
std::vector< std::string > _readCollectionNames
A restricted list of collections to read only.
std::unique_ptr< EVENT::LCRunHeader > readRunHeader(int runNumber, int accessMode=EVENT::LCIO::READ_ONLY)
Reads the specified runHeader from file.
void skipNEvents(int n)
Skips the next n events from the current position.
static constexpr int directAccess
Bit for direct access.
bool _lazyUnpack
Whether to perform the lazy unpacking of event records.
LCReader(const LCReader &)=delete
void getRuns(EVENT::IntVec &runs)
Return the run numbers of the runs (run headers) in the file - the file has to be open...
Implementation of a LCReader for parallel processing use.
std::unique_ptr< EVENT::LCEvent > readNextEvent(int accessMode=EVENT::LCIO::READ_ONLY)
Reads the next event from the file.
std::shared_ptr< sio::buffer > _rawBuffer
The raw buffer for extracting bytes from the stream.
std::shared_ptr< SIO::SIOHandlerMgr > _eventHandlerMgr
The collection block handler manager for events.
std::unique_ptr< EVENT::LCRunHeader > readNextRunHeader(int accessMode=EVENT::LCIO::READ_ONLY)
Reads the next run header from the file.
The main event interface.
std::shared_ptr< SIO::LCIORandomAccessMgr > _raMgr
The random access manager for event/run random access in the file.
LCReaderListener class Interface for MT::LCReader::readStream() callbacks.
std::shared_ptr< sio::buffer > _compBuffer
The raw buffer for uncompression.
void postProcessEvent(EVENT::LCEvent *evt)
unsigned int _currentFileIndex
The current file list index when opening multiple files.
static constexpr int lazyUnpack
Bit for lazy unpacking of event records.
int getNumberOfRuns()
Return the number of runs (run headers) in the file - the file has to be open.
void getEvents(EVENT::IntVec &events)
Return the run and event numbers of the events in the file - the file has to be open.
void close()
Closes the output file/stream etc.
LCReader & operator=(const LCReader &)=delete