|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jlab.coda.jevio.BaseStructure
org.jlab.coda.jevio.EvioBank
org.jlab.coda.jevio.EvioEvent
public class EvioEvent
An event is really just the outer, primary bank. That is, the first structure in an event (aka logical record, aka
buffer) must be a bank, probably a bank of banks.
The Event trivially extends bank, just so there can be a distinct EvioEvent
class, for clarity.
Field Summary | |
---|---|
static java.lang.String |
ELEMENT_NAME
The XML record tag for an event. |
Constructor Summary | |
---|---|
EvioEvent()
Explicit null constructor for evio event. |
|
EvioEvent(BankHeader bankHeader)
Constructor using a provided BankHeader |
|
EvioEvent(int tag,
DataType dataType,
int num)
This is a general constructor to use for an EvioEvent. |
|
EvioEvent(int tag,
int dataType,
int num)
This is a general constructor to use for an EvioEvent. |
Method Summary | |
---|---|
int |
getEventNumber()
This returns a number [1..] indicating which event this was in the event file from which it was read. |
java.util.List<BaseStructure> |
getMatchingStructures(IEvioFilter filter)
Visit all the descendant structures, and collect those that pass a filter. |
javax.swing.tree.DefaultTreeModel |
getTreeModel()
Get the tree model representing this event. |
java.lang.String |
getXMLElementName()
Get the element name for the bank for writing to XML. |
void |
insert(BaseStructure child,
BaseStructure parent)
Inserts a child structure into the event's JTree. |
void |
setEventNumber(int eventNumber)
This sets a number [1..] indicating which event this was in the event file from which it was read. |
java.lang.String |
toString()
Create a string representation of the event. |
void |
toXML(javax.xml.stream.XMLStreamWriter xmlWriter)
Write this event structure out as an XML record. |
void |
vistAllStructures(IEvioListener listener)
Visit all the structures in this event (including the event itself--which is considered its own descendant). |
void |
vistAllStructures(IEvioListener listener,
IEvioFilter filter)
Visit all the structures in this event (including the event itself--which is considered its own descendant) in a depth first manner. |
Methods inherited from class org.jlab.coda.jevio.EvioBank |
---|
getStructureType |
Methods inherited from class org.jlab.coda.jevio.BaseStructure |
---|
appendByteData, appendCharData, appendDoubleData, appendFloatData, appendIntData, appendLongData, appendShortData, children, getAllowsChildren, getByteData, getByteOrder, getChildAt, getChildCount, getChildren, getDescription, getDoubleData, getFloatData, getHeader, getIndex, getIntData, getLongData, getParent, getRawBytes, getShortData, getStringData, getTotalBytes, insert, insert, isContainer, isLeaf, isSwap, remove, remove, removeFromParent, setAllHeaderLengths, setByteOrder, setParent, setRawBytes, setUserObject, write |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ELEMENT_NAME
Constructor Detail |
---|
public EvioEvent()
public EvioEvent(BankHeader bankHeader)
bankHeader
- the header to use.BankHeader
public EvioEvent(int tag, DataType dataType, int num)
tag
- the tag for the event header (which is just a bank header).dataType
- the (enum) data type for the content of the bank.num
- sometimes, but not necessarily, an ordinal enumeration.public EvioEvent(int tag, int dataType, int num)
tag
- the tag for the event header (which is just a bank header).dataType
- the (int) data type for the content of the bank.num
- sometimes, but not necessarily, an ordinal enumeration.Method Detail |
---|
public java.lang.String toString()
toString
in class BaseStructure
public javax.swing.tree.DefaultTreeModel getTreeModel()
public void insert(BaseStructure child, BaseStructure parent)
child
- the child structure being added to the tree.parent
- the parent structure of the new child.public void vistAllStructures(IEvioListener listener)
listener
- an listener to notify as each structure is visited.public void vistAllStructures(IEvioListener listener, IEvioFilter filter)
listener
- an listener to notify as each structure is visited.filter
- an optional filter that must "accept" structures before they are passed to the listener. If null
, all
structures are passed. In this way, specific types of structures can be captured.public java.util.List<BaseStructure> getMatchingStructures(IEvioFilter filter)
filter
- the filter that must be passed. If null
, this will return all the structures.
public int getEventNumber()
public void setEventNumber(int eventNumber)
eventNumber
- a number [1..] indicating which event this was in the event file from which
it was read.public void toXML(javax.xml.stream.XMLStreamWriter xmlWriter)
toXML
in class EvioBank
xmlWriter
- the writer used to write the events.public java.lang.String getXMLElementName()
getXMLElementName
in class EvioBank
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |