public final class EvioFileUtilities extends Object
Modifier and Type | Field and Description |
---|---|
private static Logger |
LOGGER
Initialize the logger.
|
private static long |
MILLISECONDS
Milliseconds constant for conversion to/from second.
|
Modifier | Constructor and Description |
---|---|
private |
EvioFileUtilities()
Prevent class instantiation.
|
Modifier and Type | Method and Description |
---|---|
static Integer |
getRunFromName(File file)
Get the run number from the file name.
|
static Integer |
getSequenceFromName(File file)
Get the EVIO file sequence number, which is the number at the end of the file name.
|
static org.jlab.coda.jevio.EvioReader |
open(File file)
Open an EVIO file using an
EvioReader in memory mapping mode. |
static org.jlab.coda.jevio.EvioReader |
open(File file,
boolean sequential)
Open an EVIO file, using the cached file path if necessary.
|
static org.jlab.coda.jevio.EvioReader |
open(String path)
Open an EVIO file from a path string.
|
static void |
sortBySequence(List<File> evioFileList)
Sort a list of EVIO files by their sequence numbers.
|
private static final Logger LOGGER
private static final long MILLISECONDS
public static Integer getRunFromName(File file)
file
- the EVIO fileException
- if there is a problem parsing out the run numberpublic static Integer getSequenceFromName(File file)
file
- the EVIO fileException
- if there is an error parsing out the sequence numberpublic static org.jlab.coda.jevio.EvioReader open(File file) throws IOException, org.jlab.coda.jevio.EvioException
EvioReader
in memory mapping mode.file
- the EVIO fileEvioReader
for the fileIOException
- if there is an IO problemorg.jlab.coda.jevio.EvioException
- if there is an error reading the EVIO datapublic static org.jlab.coda.jevio.EvioReader open(File file, boolean sequential) throws IOException, org.jlab.coda.jevio.EvioException
file
- the EVIO filesequential
- true
to enable sequential readingEvioReader
for the fileIOException
- if there is an IO problemorg.jlab.coda.jevio.EvioException
- if there is an error reading the EVIO datapublic static org.jlab.coda.jevio.EvioReader open(String path) throws IOException, org.jlab.coda.jevio.EvioException
path
- the path stringEvioReader
for the fileIOException
- if there is an IO problemorg.jlab.coda.jevio.EvioException
- if there is an error reading the EVIO dataCopyright © 2019. All rights reserved.