DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
Event handler base class. Interface to all DDEve I/O actions. More...
#include <GenericEventHandler.h>
Public Member Functions | |
GenericEventHandler () | |
Standard constructor. More... | |
virtual | ~GenericEventHandler () |
Default destructor. More... | |
virtual const TypedEventCollections & | data () const override |
Access the map of simulation data collections. More... | |
virtual long | numEvents () const override |
Access the number of events on the current input data source (-1 if no data source connected) More... | |
virtual std::string | datasourceName () const override |
Access the data source name. More... | |
virtual CollectionType | collectionType (const std::string &collection) const override |
Access to the collection type by name. More... | |
virtual size_t | collectionLoop (const std::string &collection, DDEveHitActor &actor) override |
Loop over collection and extract data. More... | |
virtual size_t | collectionLoop (const std::string &collection, DDEveParticleActor &actor) override |
Loop over collection and extract particle data. More... | |
virtual bool | Open (const std::string &type, const std::string &file_name) override |
Open a new event data file. More... | |
virtual bool | NextEvent () override |
Load the next event. More... | |
virtual bool | PreviousEvent () override |
User overloadable function: Load the previous event. More... | |
virtual bool | GotoEvent (long event_number) override |
Goto a specified event in the file. More... | |
virtual void | Subscribe (EventConsumer *display) |
Subscribe to notification of new data present. More... | |
virtual void | Unsubscribe (EventConsumer *display) |
Unsubscribe from notification of new data present. More... | |
virtual void | NotifySubscribers (void(EventConsumer::*pmf)(EventHandler &)) |
Notfy all subscribers. More... | |
ClassDefOverride (GenericEventHandler, 0) | |
Public Member Functions inherited from dd4hep::EventHandler | |
EventHandler ()=default | |
Standard constructor. More... | |
virtual | ~EventHandler () |
Default destructor. More... | |
virtual bool | hasEvent () const |
Check if an event is present in memory. More... | |
virtual bool | hasFile () const |
Check if a data file is connected to the handler. More... | |
ClassDef (EventHandler, 0) | |
Protected Types | |
typedef std::set< EventConsumer * > | Subscriptions |
Subscriber set. More... | |
Protected Member Functions | |
EventHandler * | current () const |
Protected Attributes | |
std::map< std::string, EventHandler * > | m_handlers |
EventHandler * | m_current |
Subscriptions | m_subscriptions |
Data subscriptions (unordered) More... | |
Protected Attributes inherited from dd4hep::EventHandler | |
bool | m_hasFile = false |
Flag to indicate that a file is opened. More... | |
bool | m_hasEvent = false |
Flag to indicate that an event is loaded. More... | |
Additional Inherited Members | |
Public Types inherited from dd4hep::EventHandler | |
enum | CollectionType { NO_COLLECTION =1<<0, PARTICLE_COLLECTION =1<<1, TRACK_COLLECTION =1<<2, CALO_HIT_COLLECTION =1<<3, TRACKER_HIT_COLLECTION =1<<4, HIT_COLLECTION =CALO_HIT_COLLECTION|TRACKER_HIT_COLLECTION } |
typedef std::pair< const char *, size_t > | Collection |
Collection definition: name, size. More... | |
typedef std::map< std::string, std::vector< Collection > > | TypedEventCollections |
Types collection: collections are grouped by type (class name) More... | |
Event handler base class. Interface to all DDEve I/O actions.
Definition at line 30 of file GenericEventHandler.h.
|
protected |
Subscriber set.
Definition at line 33 of file GenericEventHandler.h.
dd4hep::GenericEventHandler::GenericEventHandler | ( | ) |
Standard constructor.
|
virtual |
Default destructor.
Definition at line 36 of file GenericEventHandler.cpp.
dd4hep::GenericEventHandler::ClassDefOverride | ( | GenericEventHandler | , |
0 | |||
) |
|
overridevirtual |
Loop over collection and extract data.
Implements dd4hep::EventHandler.
Definition at line 84 of file GenericEventHandler.cpp.
|
overridevirtual |
Loop over collection and extract particle data.
Implements dd4hep::EventHandler.
Definition at line 92 of file GenericEventHandler.cpp.
|
overridevirtual |
Access to the collection type by name.
Implements dd4hep::EventHandler.
Definition at line 76 of file GenericEventHandler.cpp.
|
protected |
Definition at line 41 of file GenericEventHandler.cpp.
|
inlineoverridevirtual |
Access the map of simulation data collections.
Implements dd4hep::EventHandler.
Definition at line 46 of file GenericEventHandler.h.
|
overridevirtual |
Access the data source name.
Implements dd4hep::EventHandler.
Definition at line 71 of file GenericEventHandler.cpp.
|
overridevirtual |
Goto a specified event in the file.
Implements dd4hep::EventHandler.
Definition at line 182 of file GenericEventHandler.cpp.
|
overridevirtual |
Load the next event.
Implements dd4hep::EventHandler.
Definition at line 147 of file GenericEventHandler.cpp.
|
virtual |
Notfy all subscribers.
Definition at line 49 of file GenericEventHandler.cpp.
|
overridevirtual |
Access the number of events on the current input data source (-1 if no data source connected)
Implements dd4hep::EventHandler.
Definition at line 66 of file GenericEventHandler.cpp.
|
overridevirtual |
Open a new event data file.
Implements dd4hep::EventHandler.
Definition at line 100 of file GenericEventHandler.cpp.
|
overridevirtual |
User overloadable function: Load the previous event.
Implements dd4hep::EventHandler.
Definition at line 171 of file GenericEventHandler.cpp.
|
virtual |
Subscribe to notification of new data present.
Definition at line 55 of file GenericEventHandler.cpp.
|
virtual |
Unsubscribe from notification of new data present.
Definition at line 60 of file GenericEventHandler.cpp.
|
protected |
Definition at line 35 of file GenericEventHandler.h.
|
protected |
Definition at line 34 of file GenericEventHandler.h.
|
protected |
Data subscriptions (unordered)
Definition at line 37 of file GenericEventHandler.h.