hep.physics.event
Class BaseEvent
- java.lang.Object
-
- hep.physics.event.BaseEvent
-
- All Implemented Interfaces:
- HEPEvent
- Direct Known Subclasses:
- GeneratorEvent
public class BaseEvent extends java.lang.Object implements HEPEvent
A simple implementation of HEPEvent
-
-
Constructor Summary
Constructors Constructor and Description BaseEvent(int run, int event)BaseEvent(int run, int event, long timestamp)Create a new event with an explicit timestamp
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.Objectget(java.lang.String key)Get an object from the eventintgetEventNumber()intgetRunNumber()java.util.MapgetTags()An arbitrary set of tags that can be associated with the event.longgetTimeStamp()Get the current timestamp.java.util.Setkeys()voidput(java.lang.String key, java.lang.Object component)Puts an arbitrary object into the event
-
-
-
Constructor Detail
-
BaseEvent
public BaseEvent(int run, int event)- Parameters:
run- The run numberevent- Create a new event. The timestamp will be set to the current time.
-
BaseEvent
public BaseEvent(int run, int event, long timestamp)Create a new event with an explicit timestamp- Parameters:
run- Teh run numberevent- The event numbertimestamp- The timestamp. By convention this is measured in nS since 1-jan-1970 GMT.
-
-
Method Detail
-
get
public java.lang.Object get(java.lang.String key)
Description copied from interface:HEPEventGet an object from the event
-
getEventNumber
public int getEventNumber()
- Specified by:
getEventNumberin interfaceHEPEvent- Returns:
- The event number
-
getRunNumber
public int getRunNumber()
- Specified by:
getRunNumberin interfaceHEPEvent- Returns:
- The run number for this event
-
getTags
public java.util.Map getTags()
Description copied from interface:HEPEventAn arbitrary set of tags that can be associated with the event. Intended to be used for fast event selection.
-
keys
public java.util.Set keys()
-
put
public void put(java.lang.String key, java.lang.Object component)Description copied from interface:HEPEventPuts an arbitrary object into the event
-
getTimeStamp
public long getTimeStamp()
Description copied from interface:HEPEventGet the current timestamp. By convention this is measured in nS since 1-jan-1970 GMT.- Specified by:
getTimeStampin interfaceHEPEvent- Returns:
- The timestamp.
-
-
DMelt 3.0 © DataMelt by jWork.ORG