1 package org.lcsim.lcio;
2
3 import hep.io.sio.SIOInputStream;
4 import hep.io.sio.SIOOutputStream;
5 import java.io.IOException;
6
7 import org.lcsim.event.LCRelation;
8
9
10
11
12
13
14
15 class SIOLCRelationBlockHandler extends AbstractBlockHandler
16 {
17 public String getType() { return "LCRelation"; }
18 public Class getClassForType() { return LCRelation.class; }
19 LCIOCallback addCollectionElements(LCIOEvent event, LCIOCollection collection,
20 SIOInputStream in, int n, int version)
21 throws IOException
22 {
23 for (int i = 0; i < n; i++)
24 collection.add(new SIOLCRelation(in, collection.getFlags(), version));
25 return null;
26 }
27
28 void writeCollectionElement(Object element, SIOOutputStream out, int flags)
29 throws IOException
30 {
31 SIOLCRelation.write((LCRelation) element, out, flags);
32 }
33 }