public class HBook
extends java.lang.Object
The file extension of HBook is "jdat".
Generally, however, use HFile or Serialized class to keep objects to read and write objects in a serialized form.
Constructor and Description |
---|
HBook(java.lang.String file)
Initialize HBook class for reading a file.
|
HBook(java.lang.String file,
java.lang.String option)
Initialize HBook and tell what to do.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Clear all objects and exit.
|
void |
doc()
Show online documentation.
|
java.lang.Object |
get(java.lang.String id)
Get an object using the key
|
java.util.Map<java.lang.String,java.lang.Object> |
getAll()
Get all objects as a map
|
java.lang.String[] |
getKeys()
Return array of all know keys
|
java.lang.String |
getTimeCreation()
Return time of file creation.
|
int |
getVersion()
Get version of the file.
|
void |
setDescription(java.lang.String description)
Set a desciption which will be attached to the header of the output file.
|
void |
setFormat(java.text.DecimalFormat dfb)
Set format for writting double values.
|
void |
write(int id,
java.lang.Object ob)
Write jhplot data container.
|
void |
write(java.lang.Object ob)
Add any object.
|
void |
write(java.lang.String id,
double[] a)
add 1D array
|
void |
write(java.lang.String id,
double[][] a)
add 2D array
|
void |
write(java.lang.String id,
F1D f1)
write F1D function
|
void |
write(java.lang.String id,
F2D f2)
write F2D function
|
void |
write(java.lang.String id,
FND a)
add 2D array
|
void |
write(java.lang.String id,
FPR f1)
write FPR parametric function
|
void |
write(java.lang.String id,
H1D h1d)
write H1D histogram to HBook
|
void |
write(java.lang.String id,
H2D h2d)
write H2D histogram to HBook
|
void |
write(java.lang.String id,
int[] a)
add 1D array
|
void |
write(java.lang.String id,
int[][] a)
add 2D array
|
void |
write(java.lang.String id,
P0D pnd)
add P0D data object.
|
void |
write(java.lang.String id,
P0I pnd)
add P0I data object.
|
void |
write(java.lang.String id,
P1D p1d)
add P1D histogram to HBook
|
void |
write(java.lang.String id,
P2D pnd)
add P2D data object.
|
void |
write(java.lang.String id,
PND pnd)
add PND data object.
|
void |
write(java.lang.String id,
PNI pnd)
add PID data object.
|
public HBook(java.lang.String file, java.lang.String option)
file
- file for reading or writingoption
- can be "r" (read) or "w" (write).public HBook(java.lang.String file)
file
- input file for reading (can be URL).public void setFormat(java.text.DecimalFormat dfb)
dfb
- writing format.public void setDescription(java.lang.String description)
description
- description.public int getVersion()
public java.lang.Object get(java.lang.String id)
id
- key for object accesspublic java.lang.String[] getKeys()
public void write(java.lang.String id, H1D h1d)
id
- key to be assignedh1d
- H1D histogram to be addedpublic void write(java.lang.String id, H2D h2d)
id
- key to be assignedh2d
- H2D histogram to be addedpublic void write(java.lang.String id, P1D p1d)
id
- key to be assignedp1d
- P1D histogram to be addedpublic void write(java.lang.String id, PND pnd)
id
- key to be assignedpnd
- PND histogram to be addedpublic void write(java.lang.String id, PNI pnd)
id
- key to be assignedpnd
- PID histogram to be addedpublic void write(java.lang.String id, P0D pnd)
id
- key to be assignedpnd
- P0D histogram to be addedpublic void write(java.lang.String id, P0I pnd)
id
- key to be assignedpnd
- P0D histogram to be addedpublic void write(java.lang.String id, P2D pnd)
id
- key to be assignedpnd
- P2D histogram to be addedpublic void write(java.lang.Object ob)
obj
- object for writing.public void write(int id, java.lang.Object ob)
id
- integer keyobj
- objectpublic void write(java.lang.String id, F1D f1)
id
- key to be assignedf1
- functionpublic void write(java.lang.String id, FPR f1)
id
- key to be assignedf1
- functionpublic void write(java.lang.String id, F2D f2)
id
- key to be assignedf2
- functionpublic void write(java.lang.String id, double[] a)
id
- key to be assigneda
- arraypublic void write(java.lang.String id, int[] a)
id
- key to be assigneda
- arraypublic void write(java.lang.String id, double[][] a)
id
- key to be assigneda
- arraypublic void write(java.lang.String id, int[][] a)
id
- key to be assigneda
- arraypublic void write(java.lang.String id, FND a)
id
- key to be assigneda
- arraypublic void close()
public void doc()
public java.util.Map<java.lang.String,java.lang.Object> getAll()
public java.lang.String getTimeCreation()
JHepSim. A part of HSTOOLS. version-1.2