Documentation of 'org.jlab.hipo.io.HipoRecordIndex' Java class
HipoRecordIndex
org.jlab.hipo.io

Class HipoRecordIndex



  • public class HipoRecordIndex
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor and Description
      HipoRecordIndex(long offset)
      Constructor for creating a record index with given position in the file.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean getCompression()
      returns boolean flag compression.
      java.util.List<java.lang.Integer> getEventIdex()
      returns the array containing the indecies of the events in the record.
      long getEventPosition(int index)
      Returns the position of the given event in the record, relative to the start of the file.
      int getLength()
      returns the length of the record, Length includes header length, index array length and data length.
      int getNumberOfEvents()
      returns number of events in the record, this is not necessarily mean that event index will contain the same number of entries.
      long getPosition()
      returns record position relative to the file start.
      boolean parseHeader(int hL, int hM, int hH) 
      void setCompression(boolean isc)
      Set the compression to the boolean value passed.
      void setLength(int len)
      Set record length used for reading entire record in.
      java.lang.String toString()
      returns string representation of the record index
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • HipoRecordIndex

        public HipoRecordIndex(long offset)
        Constructor for creating a record index with given position in the file.
        Parameters:
        offset - offset relative to the start of the file.
    • Method Detail

      • getEventIdex

        public java.util.List<java.lang.Integer> getEventIdex()
        returns the array containing the indecies of the events in the record. this array should not be used directly. the index offsets are only valid after the record was decompressed (in case of compression).
        Returns:
      • parseHeader

        public boolean parseHeader(int hL,
                                   int hM,
                                   int hH)
      • getNumberOfEvents

        public int getNumberOfEvents()
        returns number of events in the record, this is not necessarily mean that event index will contain the same number of entries. In case the full index is not parsed, the index array will have length=0.
        Returns:
      • getEventPosition

        public long getEventPosition(int index)
        Returns the position of the given event in the record, relative to the start of the file. the record header size and record offset already added to the event offset.
        Parameters:
        index - event order in the record
        Returns:
      • getPosition

        public long getPosition()
        returns record position relative to the file start.
        Returns:
      • setCompression

        public void setCompression(boolean isc)
        Set the compression to the boolean value passed.
        Parameters:
        isc - flag indicating weather the record is compressed.
      • getCompression

        public boolean getCompression()
        returns boolean flag compression.
        Returns:
      • setLength

        public void setLength(int len)
        Set record length used for reading entire record in. Length includes header length, index array length and data length.
        Parameters:
        len - length in bytes for the record
      • getLength

        public int getLength()
        returns the length of the record, Length includes header length, index array length and data length.
        Returns:
        total length of the record
      • toString

        public java.lang.String toString()
        returns string representation of the record index
        Overrides:
        toString in class java.lang.Object
        Returns:

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.