|
|||||||||
PREV CLASS NEXT CLASS | All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjhplot.io.EFile
public class EFile
Write data structures in sequential order into ntuples using Google's Prototype Buffer. The same class can be used to read data from ntuples. Each data record inside files is compressed on-fly using zip. Normally, files should extension "nbu" (ntuples). A protocol Buffers file is provided which can be used for C++ input. Use the CBook package to create such files in C++.
Constructor Summary | |
---|---|
EFile(String file)
Open file for reading objects from a serialized file in sequential order. |
|
EFile(String file,
String option)
Open a file to write/read objects to/from a file in sequential order. |
Method Summary | |
---|---|
boolean |
close()
Close the file |
String |
entriesToString()
Get a string representing file content. |
int |
getNEntries()
Get number of events stored in the file. |
int |
getVersion()
Get version of the input file. |
PEventFile.HEvent |
read()
Read next event |
PEventFile.HEvent |
read(int index)
Get object from a file using its index. |
int |
size()
Get the number of events stored in the file. |
boolean |
write(PEventFile.HEvent.Builder ev)
Add a data structure to a file |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EFile(String file, String option)
file
- File nameoption
- Option to create the file. If "w" - write a file (or read)
file, if "r" only read created file.public EFile(String file)
file
- File nameMethod Detail |
---|
public int getVersion()
public boolean write(PEventFile.HEvent.Builder ev)
ev
- Data in form HEvent class.
public int size()
public int getNEntries()
public String entriesToString()
public PEventFile.HEvent read()
public PEventFile.HEvent read(int index)
index
- of the object
public boolean close()
|
|||||||||
PREV CLASS NEXT CLASS | All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |