| MarlinMT
    0.1.0
    | 
ReaderListener class. More...
#include <ReaderListener.h>
Inherits LCReaderListener.
| Public Types | |
| using | EventFunction = std::function< void(std::shared_ptr< EventStore >)> | 
| using | RunHeaderFunction = std::function< void(std::shared_ptr< RunHeader >)> | 
| Public Member Functions | |
| ReaderListener ()=default | |
| ~ReaderListener ()=default | |
| ReaderListener (const ReaderListener &)=delete | |
| ReaderListener & | operator= (const ReaderListener &)=delete | 
| void | onEventRead (EventFunction func) | 
| Set the callback function to process on event read.  More... | |
| void | onRunHeaderRead (RunHeaderFunction func) | 
| Set the callback function to process on run info read.  More... | |
| Protected Member Functions | |
| void | processEvent (std::shared_ptr< EVENT::LCEvent > event) override | 
| void | processRunHeader (std::shared_ptr< EVENT::LCRunHeader > rhdr) override | 
| Private Attributes | |
| EventFunction | _onEventRead {nullptr} | 
| Callback function on event read.  More... | |
| RunHeaderFunction | _onRunHeaderRead {nullptr} | 
| Callback function on run info read.  More... | |
ReaderListener class.
Simple implementation of a reader listener. Callback functions can be set using lambda function, std::function objects or resulting call of std::bind call.
Example with lambda functions:
Example with std::bind and custom class method:
Definition at line 47 of file ReaderListener.h.
| using marlinmt::ReaderListener::EventFunction = std::function<void(std::shared_ptr<EventStore>)> | 
Definition at line 49 of file ReaderListener.h.
| using marlinmt::ReaderListener::RunHeaderFunction = std::function<void(std::shared_ptr<RunHeader>)> | 
Definition at line 50 of file ReaderListener.h.
| 
 | default | 
| 
 | default | 
| 
 | delete | 
| void marlinmt::ReaderListener::onEventRead | ( | EventFunction | func | ) | 
Set the callback function to process on event read.
Definition at line 14 of file ReaderListener.cc.
References _onEventRead.
Referenced by marlinmt::LCIOFileSource::initialize().
| void marlinmt::ReaderListener::onRunHeaderRead | ( | RunHeaderFunction | func | ) | 
Set the callback function to process on run info read.
Definition at line 20 of file ReaderListener.cc.
References _onRunHeaderRead.
Referenced by marlinmt::LCIOFileSource::initialize().
| 
 | delete | 
| 
 | overrideprotected | 
Definition at line 26 of file ReaderListener.cc.
References _onEventRead, and jenkins_hash().
| 
 | overrideprotected | 
Definition at line 44 of file ReaderListener.cc.
References _onRunHeaderRead.
| 
 | private | 
Callback function on event read.
Definition at line 74 of file ReaderListener.h.
Referenced by onEventRead(), and processEvent().
| 
 | private | 
Callback function on run info read.
Definition at line 76 of file ReaderListener.h.
Referenced by onRunHeaderRead(), and processRunHeader().