org.jlab.hipo.data
Class HipoEvent
- java.lang.Object
-
- org.jlab.hipo.data.HipoEvent
-
public class HipoEvent extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classHipoEvent.GroupNodeIndexListstatic classHipoEvent.HipoNodeIndexstatic classHipoEvent.NodeIndexList
-
Constructor Summary
Constructors Constructor and Description HipoEvent()HipoEvent(byte[] buffer)Initialize HipoEvent from a byte array.HipoEvent(byte[] buffer, SchemaFactory factory)HipoEvent(SchemaFactory factory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddNode(HipoNode node)Add a single node to the event.voidaddNodes(java.util.List<HipoNode> nodes)Add the nodes in the list to the event.byte[]getDataBuffer()java.util.Map<java.lang.Integer,HipoNode>getGroup(int group)HipoGroupgetGroup(java.lang.String name)returns a group of nodes for given Schema.java.util.List<HipoGroup>getGroups()HipoNodegetNode(int group, int item)SchemaFactorygetSchemaFactory()booleanhasGroup(int group)booleanhasGroup(java.lang.String group)static voidmain(java.lang.String[] args)voidremoveGroup(int group)Removes given group with given group id from the eventvoidremoveGroup(java.lang.String name)removes group with given name from the eventvoidreset()voidshow()voidshowGroup(int group)voidshowGroup(java.lang.String group)voidshowGroupByOrder(int order)java.lang.StringtoGroupListString()java.lang.StringtoString()Return string representation of the event.voidupdateNodeIndex()updates the index of thevoidwriteGroup(HipoGroup group)writes all the nodes in the group into the event.
-
-
-
Constructor Detail
-
HipoEvent
public HipoEvent()
-
HipoEvent
public HipoEvent(SchemaFactory factory)
-
HipoEvent
public HipoEvent(byte[] buffer)
Initialize HipoEvent from a byte array.- Parameters:
buffer-
-
HipoEvent
public HipoEvent(byte[] buffer, SchemaFactory factory)
-
-
Method Detail
-
addNode
public void addNode(HipoNode node)
Add a single node to the event.- Parameters:
node- HipoNode to add to the event.
-
addNodes
public void addNodes(java.util.List<HipoNode> nodes)
Add the nodes in the list to the event.- Parameters:
nodes- list of HipoNode objects to add to the event.
-
updateNodeIndex
public final void updateNodeIndex()
updates the index of the
-
reset
public void reset()
-
writeGroup
public void writeGroup(HipoGroup group)
writes all the nodes in the group into the event.- Parameters:
group- group containing nodes
-
getGroup
public HipoGroup getGroup(java.lang.String name)
returns a group of nodes for given Schema.- Parameters:
name- name of the Schema- Returns:
- group containing HipoNodes
-
toString
public java.lang.String toString()
Return string representation of the event.- Overrides:
toStringin classjava.lang.Object- Returns:
- string printout of the event
-
getDataBuffer
public byte[] getDataBuffer()
-
show
public void show()
-
showGroupByOrder
public void showGroupByOrder(int order)
-
showGroup
public void showGroup(int group)
-
showGroup
public void showGroup(java.lang.String group)
-
getNode
public HipoNode getNode(int group, int item)
-
hasGroup
public boolean hasGroup(int group)
-
hasGroup
public boolean hasGroup(java.lang.String group)
-
getSchemaFactory
public SchemaFactory getSchemaFactory()
-
getGroups
public java.util.List<HipoGroup> getGroups()
-
removeGroup
public void removeGroup(int group)
Removes given group with given group id from the event- Parameters:
group-
-
removeGroup
public void removeGroup(java.lang.String name)
removes group with given name from the event- Parameters:
name-
-
getGroup
public java.util.Map<java.lang.Integer,HipoNode> getGroup(int group)
-
toGroupListString
public java.lang.String toGroupListString()
-
main
public static void main(java.lang.String[] args)
-
-
DMelt 3.0 © DataMelt by jWork.ORG