14 #ifndef DD4HEP_DDEVE_EVENTHANDLER_H
15 #define DD4HEP_DDEVE_EVENTHANDLER_H
28 #define MEV_2_GEV 0.001
108 virtual bool Open(
const std::string& type,
const std::string& file_name) = 0;
114 virtual bool GotoEvent(
long event_number) = 0;
Event data actor base class for hits. Used to extract data from concrete classes. ...
virtual bool hasFile() const
Check if a data file is connected to the handler.
virtual long numEvents() const =0
Access the number of events on the current input data source (-1 if no data source connected) ...
ClassDef(EventConsumer, 0)
virtual void setSize(size_t)
virtual CollectionType collectionType(const std::string &collection) const =0
Access to the collection type by name.
Data structure to store the MC particle information.
virtual void operator()(const DDEveHit &)=0
virtual ~DDEveParticleActor()
virtual size_t collectionLoop(const std::string &collection, DDEveHitActor &actor)=0
Loop over collection and extract hit data.
bool m_hasFile
Flag to indicate that a file is opened.
virtual std::string datasourceName() const =0
Access the data source name.
bool m_hasEvent
Flag to indicate that an event is loaded.
Event handler base class. Interface to all DDEve I/O actions.
virtual void setSize(size_t)
EventConsumer()
Standard constructor.
virtual const TypedEventCollections & data() const =0
Access the map of simulation data collections.
virtual void OnNewEvent(EventHandler *)
Consumer event data callback.
DDEve event classes: Basic hit.
ClassDef(EventHandler, 0)
virtual bool PreviousEvent()=0
User overloadable function: Load the previous event.
virtual ~EventConsumer()
Default destructor.
virtual bool NextEvent()=0
Load the next event.
virtual bool GotoEvent(long event_number)=0
Goto a specified event in the file.
std::map< std::string, std::vector< Collection > > TypedEventCollections
Types collection: collections are grouped by type (class name)
EventHandler()
Standard constructor.
virtual bool Open(const std::string &type, const std::string &file_name)=0
Open a new event data file.
virtual ~EventHandler()
Default destructor.
std::pair< const char *, size_t > Collection
Collection definition: name, size.
Event data actor base class for particles. Used to extract data from concrete classes.
virtual void OnFileOpen(EventHandler *)
Consumer file open callback.
virtual bool hasEvent() const
Check if an event is present in memory.
virtual void operator()(const DDEveParticle &)=0