8#ifndef PANDORA_BINARY_FILE_READER_H
9#define PANDORA_BINARY_FILE_READER_H 1
130 char *
const pMemBlock =
new char[
sizeof(T)];
133 t = *(
reinterpret_cast<T*
>(pMemBlock));
137 return STATUS_CODE_FAILURE;
139 return STATUS_CODE_SUCCESS;
145 unsigned int stringSize;
148 if (STATUS_CODE_SUCCESS != statusCode)
151 char *
const pMemBlock =
new char[stringSize];
154 t = std::string(pMemBlock, stringSize);
158 return STATUS_CODE_FAILURE;
160 return STATUS_CODE_SUCCESS;
172 return STATUS_CODE_SUCCESS;
183 return STATUS_CODE_SUCCESS;
Header file for the cartesian vector class.
Header file for the file reader class.
Header file for the pandora class.
#define PANDORA_RETURN_RESULT_IF(StatusCode1, Operator, Command)
Header file for the track state class.
StatusCode ReadTrack(bool checkComponentId=true)
Read a track from the current position in the file, recreating the stored object.
StatusCode ReadCaloHit(bool checkComponentId=true)
Read a calo hit from the current position in the file, recreating the stored object.
std::ifstream::pos_type m_containerSize
Size of the current event/geometry container object in the file.
StatusCode ReadHeader()
Read the container header from the current position in the file, checking for properly written contai...
StatusCode ReadSubDetector(bool checkComponentId=true)
Read a sub detector from the current position in the file.
StatusCode GoToNextContainer()
Skip to next container in the file.
StatusCode ReadLineGap(bool checkComponentId=true)
Read a line gap from the current position in the file.
StatusCode ReadConcentricGap(bool checkComponentId=true)
Read a concentric gap from the current position in the file.
StatusCode ReadVariable(T &t)
Read a variable from the file.
StatusCode GoToGeometry(const unsigned int geometryNumber)
Skip to a specified geometry number in the file.
StatusCode ReadRelationship(bool checkComponentId=true)
Read a relationship from the current position in the file, recreating the stored relationship.
StatusCode ReadLArTPC(bool checkComponentId=true)
Read a lar tpc from the current position in the file.
~BinaryFileReader()
Destructor.
ContainerId GetNextContainerId()
Get the id of the next container in the file without changing the current position in the file.
StatusCode ReadNextEventComponent()
Read the next pandora event component from the current position in the file, recreating the stored co...
StatusCode ReadNextGeometryComponent()
Read the next pandora geometry component from the current position in the file, recreating the stored...
StatusCode ReadBoxGap(bool checkComponentId=true)
Read a box gap from the current position in the file.
std::ifstream m_fileStream
The stream class to read from the file.
std::ifstream::pos_type m_containerPosition
Position of start of the current event/geometry container object in file.
StatusCode ReadMCParticle(bool checkComponentId=true)
Read a mc particle from the current position in the file, recreating the stored object.
StatusCode GoToEvent(const unsigned int eventNumber)
Skip to a specified event number in the file.
ContainerId
The container identification enum.
StatusCode
The StatusCode enum.