DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
Event handler base class: Interface to all DDEve I/O actions. More...
#include <EventHandler.h>
Public Types | |
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... | |
Public Member Functions | |
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... | |
virtual const TypedEventCollections & | data () const =0 |
Access the map of simulation data collections. More... | |
virtual long | numEvents () const =0 |
Access the number of events on the current input data source (-1 if no data source connected) More... | |
virtual std::string | datasourceName () const =0 |
Access the data source name. More... | |
virtual size_t | collectionLoop (const std::string &collection, DDEveHitActor &actor)=0 |
Loop over collection and extract hit data. More... | |
virtual size_t | collectionLoop (const std::string &collection, DDEveParticleActor &actor)=0 |
Loop over collection and extract particle data. More... | |
virtual CollectionType | collectionType (const std::string &collection) const =0 |
Access to the collection type by name. More... | |
virtual bool | Open (const std::string &type, const std::string &file_name)=0 |
Open a new event data file. More... | |
virtual bool | NextEvent ()=0 |
Load the next event. More... | |
virtual bool | PreviousEvent ()=0 |
User overloadable function: Load the previous event. More... | |
virtual bool | GotoEvent (long event_number)=0 |
Goto a specified event in the file. More... | |
ClassDef (EventHandler, 0) | |
Protected Attributes | |
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... | |
Event handler base class: Interface to all DDEve I/O actions.
Definition at line 67 of file EventHandler.h.
typedef std::pair<const char*,size_t> dd4hep::EventHandler::Collection |
Collection definition: name, size.
Definition at line 78 of file EventHandler.h.
typedef std::map<std::string,std::vector<Collection> > dd4hep::EventHandler::TypedEventCollections |
Types collection: collections are grouped by type (class name)
Definition at line 80 of file EventHandler.h.
Enumerator | |
---|---|
NO_COLLECTION | |
PARTICLE_COLLECTION | |
TRACK_COLLECTION | |
CALO_HIT_COLLECTION | |
TRACKER_HIT_COLLECTION | |
HIT_COLLECTION |
Definition at line 69 of file EventHandler.h.
|
default |
Standard constructor.
|
virtual |
Default destructor.
dd4hep::EventHandler::ClassDef | ( | EventHandler | , |
0 | |||
) |
|
pure virtual |
Loop over collection and extract hit data.
Implemented in dd4hep::DDG4EventHandler, dd4hep::GenericEventHandler, and dd4hep::LCIOEventHandler.
|
pure virtual |
Loop over collection and extract particle data.
Implemented in dd4hep::DDG4EventHandler, dd4hep::GenericEventHandler, and dd4hep::LCIOEventHandler.
|
pure virtual |
Access to the collection type by name.
Implemented in dd4hep::DDG4EventHandler, dd4hep::GenericEventHandler, and dd4hep::LCIOEventHandler.
|
pure virtual |
Access the map of simulation data collections.
Implemented in dd4hep::DDG4EventHandler, dd4hep::GenericEventHandler, and dd4hep::LCIOEventHandler.
|
pure virtual |
Access the data source name.
Implemented in dd4hep::DDG4EventHandler, dd4hep::GenericEventHandler, and dd4hep::LCIOEventHandler.
|
pure virtual |
Goto a specified event in the file.
Implemented in dd4hep::DDG4EventHandler, dd4hep::GenericEventHandler, and dd4hep::LCIOEventHandler.
|
inlinevirtual |
Check if an event is present in memory.
Definition at line 93 of file EventHandler.h.
|
inlinevirtual |
Check if a data file is connected to the handler.
Definition at line 95 of file EventHandler.h.
|
pure virtual |
Load the next event.
Implemented in dd4hep::DDG4EventHandler, dd4hep::GenericEventHandler, and dd4hep::LCIOEventHandler.
|
pure virtual |
Access the number of events on the current input data source (-1 if no data source connected)
Implemented in dd4hep::DDG4EventHandler, dd4hep::GenericEventHandler, and dd4hep::LCIOEventHandler.
|
pure virtual |
Open a new event data file.
Implemented in dd4hep::DDG4EventHandler, dd4hep::GenericEventHandler, and dd4hep::LCIOEventHandler.
|
pure virtual |
User overloadable function: Load the previous event.
Implemented in dd4hep::DDG4EventHandler, dd4hep::GenericEventHandler, and dd4hep::LCIOEventHandler.
|
protected |
Flag to indicate that an event is loaded.
Definition at line 86 of file EventHandler.h.
|
protected |
Flag to indicate that a file is opened.
Definition at line 84 of file EventHandler.h.