8#ifndef PANDORA_BINARY_FILE_WRITER_H
9#define PANDORA_BINARY_FILE_WRITER_H 1
69 m_fileStream.write(
reinterpret_cast<const char*
>(&t),
sizeof(T));
72 return STATUS_CODE_FAILURE;
74 return STATUS_CODE_SUCCESS;
80 const unsigned int stringSize(t.size());
82 m_fileStream.write(
reinterpret_cast<const char*
>(t.c_str()), stringSize);
85 return STATUS_CODE_FAILURE;
87 return STATUS_CODE_SUCCESS;
96 return STATUS_CODE_SUCCESS;
104 return STATUS_CODE_SUCCESS;
Header file for the cartesian vector class.
Header file for the file writer class.
Header file for the pandora class.
#define PANDORA_RETURN_RESULT_IF(StatusCode1, Operator, Command)
Header file for the track state class.
StatusCode WriteSubDetector(const SubDetector *const pSubDetector)
Write a sub detector to the file.
std::ofstream::pos_type m_containerPosition
Position of start of the current event/geometry container object in file.
StatusCode WriteDetectorGap(const DetectorGap *const pDetectorGap)
Write the detector gap parameters to the file.
StatusCode WriteTrack(const Track *const pTrack)
Write a track to the current position in the file.
StatusCode WriteLArTPC(const LArTPC *const pLArTPC)
Write a lar tpc to the file.
StatusCode WriteHeader(const ContainerId containerId)
Write the container header to the file.
StatusCode WriteCaloHit(const CaloHit *const pCaloHit)
Write a calo hit to the current position in the file.
StatusCode WriteMCParticle(const MCParticle *const pMCParticle)
Write a mc particle to the current position in the file.
std::ofstream m_fileStream
The stream class to write to the file.
StatusCode WriteRelationship(const RelationshipId relationshipId, const void *address1, const void *address2, const float weight)
Write a relationship between two objects with specified addresses.
~BinaryFileWriter()
Destructor.
StatusCode WriteFooter()
Write the container footer to the file.
StatusCode WriteVariable(const T &t)
Write a variable to the file.
float GetX() const
Get the cartesian x coordinate.
float GetZ() const
Get the cartesian z coordinate.
float GetY() const
Get the cartesian y coordinate.
const CartesianVector & GetMomentum() const
Get the track momentum vector.
const CartesianVector & GetPosition() const
Get the track position vector.
FileMode
The file mode enum.
RelationshipId
The relationship identification enum.
ContainerId
The container identification enum.
StatusCode
The StatusCode enum.