14 #ifndef DD4HEP_DDEVE_GENERICEVENTHANDLER_H
15 #define DD4HEP_DDEVE_GENERICEVENTHANDLER_H
59 virtual bool Open(
const std::string& type,
const std::string& file_name);
65 virtual bool GotoEvent(
long event_number);
Event data actor base class for hits. Used to extract data from concrete classes. ...
virtual std::string datasourceName() const
Access the data source name.
virtual size_t collectionLoop(const std::string &collection, DDEveHitActor &actor)
Loop over collection and extract data.
virtual bool GotoEvent(long event_number)
Goto a specified event in the file.
virtual bool Open(const std::string &type, const std::string &file_name)
Open a new event data file.
Subscriptions m_subscriptions
Data subscriptions (unordered)
Event handler base class. Interface to all DDEve I/O actions.
virtual CollectionType collectionType(const std::string &collection) const
Access to the collection type by name.
EventHandler * current() const
virtual bool PreviousEvent()
User overloadable function: Load the previous event.
virtual const TypedEventCollections & data() const =0
Access the map of simulation data collections.
virtual void Subscribe(EventConsumer *display)
Subscribe to notification of new data present.
virtual const TypedEventCollections & data() const
Access the map of simulation data collections.
virtual void Unsubscribe(EventConsumer *display)
Unsubscribe from notification of new data present.
Event handler base class. Interface to all DDEve I/O actions.
std::set< EventConsumer * > Subscriptions
Subscriber set.
GenericEventHandler()
Standard constructor.
std::map< std::string, EventHandler * > m_handlers
virtual ~GenericEventHandler()
Default destructor.
virtual bool NextEvent()
Load the next event.
std::map< std::string, std::vector< Collection > > TypedEventCollections
Types collection: collections are grouped by type (class name)
virtual long numEvents() const
Access the number of events on the current input data source (-1 if no data source connected) ...
ClassDef(GenericEventHandler, 0)
Event data actor base class for particles. Used to extract data from concrete classes.
virtual void NotifySubscribers(void(EventConsumer::*pmf)(EventHandler *))
Notfy all subscribers.