public abstract class AbstractIntData extends Object implements org.lcsim.event.GenericObject
GenericObject
representation of an INT32/UINT32 bank read
from EvIO. The bank header tag identifies the type of data, and is stored as
the first int in the GenericObject
. The contents of the bank are
the remaining N-1 int
primitives. Constructors are provided from
int[]
(for reading from EvIO) and from
GenericObject
(for reading from LCIO).GenericObject
Modifier and Type | Class and Description |
---|---|
static class |
AbstractIntData.IntBankDefinition
Utility class used to search an EVIO event for a specified int bank.
|
Modifier and Type | Field and Description |
---|---|
protected int[] |
bank
The data bank.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractIntData(org.lcsim.event.GenericObject data,
int expectedTag)
Create an
AbstractIntData object from an LCIO
genericObject . |
protected |
AbstractIntData(int[] bank)
Constructs an
AbstractIntData from a raw EvIO integer bank. |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
decodeData()
Parses the bank so the object can be used in analysis.
|
int[] |
getBank()
Gets the entire, unparsed integer data bank from the object.
|
static int[] |
getBank(org.lcsim.event.GenericObject object)
Return the int bank of an AbstractIntData read from LCIO.
|
static int |
getBankInt(org.lcsim.event.GenericObject object,
int index)
Return a single value from the integer bank of an
AbstractIntData . |
double |
getDoubleVal(int index) |
float |
getFloatVal(int index) |
int |
getIntVal(int index) |
int |
getNDouble() |
int |
getNFloat() |
int |
getNInt() |
abstract int |
getTag()
Returns the EvIO bank header tag expected for this data.
|
static int |
getTag(org.lcsim.event.GenericObject data)
Returns the EVIO bank tag for a data object.
|
boolean |
isFixedSize() |
protected AbstractIntData(int[] bank)
AbstractIntData
from a raw EvIO integer bank.
It is expected that the EvIO reader will verify that the bank tag is the
appropriate type before calling the constructor.bank
- - An EvIO bank of int
data.protected AbstractIntData(org.lcsim.event.GenericObject data, int expectedTag)
AbstractIntData
object from an LCIO
genericObject
. Constructor requires that the
GenericObject
tag match the expected EvIO header tag type as
defined by the implementing class.data
- - The source data bank.expectedTag
- - The required EvIO bank header tag.public int[] getBank()
int[]
array.public static int[] getBank(org.lcsim.event.GenericObject object)
object
- public static int getBankInt(org.lcsim.event.GenericObject object, int index)
AbstractIntData
.object
- - The bank from which to obtain the data.index
- - The index of the data in the bank.public abstract int getTag()
int
primitive.public static int getTag(org.lcsim.event.GenericObject data)
data
- - A GenericObject
representing an integer data
bank.protected abstract void decodeData()
public int getNInt()
getNInt
in interface org.lcsim.event.GenericObject
public int getNFloat()
getNFloat
in interface org.lcsim.event.GenericObject
public int getNDouble()
getNDouble
in interface org.lcsim.event.GenericObject
public int getIntVal(int index)
getIntVal
in interface org.lcsim.event.GenericObject
public float getFloatVal(int index)
getFloatVal
in interface org.lcsim.event.GenericObject
public double getDoubleVal(int index)
getDoubleVal
in interface org.lcsim.event.GenericObject
public boolean isFixedSize()
isFixedSize
in interface org.lcsim.event.GenericObject
Copyright © 2019. All rights reserved.