FileWriter class.
More...
#include "FileWriter.h"
|
| FileWriter (const pandora::Pandora &pandora, const std::string &fileName) |
| Constructor.
|
|
virtual | ~FileWriter () |
| Destructor.
|
|
StatusCode | WriteGeometry () |
| Write the current geometry information to the file.
|
|
StatusCode | WriteEvent (const CaloHitList &caloHitList, const TrackList &trackList, const MCParticleList &mcParticleList, const bool writeMCRelationships=true, const bool writeTrackRelationships=true) |
| Write the specified event components to the file.
|
|
const std::string & | GetFileName () const |
| Get the file name.
|
|
FileType | GetFileType () const |
| Get the file type.
|
|
template<typename PARAMETERS , typename OBJECT > |
StatusCode | SetFactory (ObjectFactory< PARAMETERS, OBJECT > *const pFactory) |
| Set the factory to use for all instantiations and parameter persistence.
|
|
template<> |
void | ReplaceCurrentFactory (ObjectFactory< object_creation::CaloHit::Parameters, object_creation::CaloHit::Object > *const pFactory) |
|
template<> |
void | ReplaceCurrentFactory (ObjectFactory< object_creation::Track::Parameters, object_creation::Track::Object > *const pFactory) |
|
template<> |
void | ReplaceCurrentFactory (ObjectFactory< object_creation::MCParticle::Parameters, object_creation::MCParticle::Object > *const pFactory) |
|
template<> |
void | ReplaceCurrentFactory (ObjectFactory< object_creation::Geometry::SubDetector::Parameters, object_creation::Geometry::SubDetector::Object > *const pFactory) |
|
template<> |
void | ReplaceCurrentFactory (ObjectFactory< object_creation::Geometry::LArTPC::Parameters, object_creation::Geometry::LArTPC::Object > *const pFactory) |
|
template<> |
void | ReplaceCurrentFactory (ObjectFactory< object_creation::Geometry::LineGap::Parameters, object_creation::Geometry::LineGap::Object > *const pFactory) |
|
template<> |
void | ReplaceCurrentFactory (ObjectFactory< object_creation::Geometry::BoxGap::Parameters, object_creation::Geometry::BoxGap::Object > *const pFactory) |
|
template<> |
void | ReplaceCurrentFactory (ObjectFactory< object_creation::Geometry::ConcentricGap::Parameters, object_creation::Geometry::ConcentricGap::Object > *const pFactory) |
|
FileWriter class.
Definition at line 28 of file FileWriter.h.
◆ FileWriter()
pandora::FileWriter::FileWriter |
( |
const pandora::Pandora & |
pandora, |
|
|
const std::string & |
fileName |
|
) |
| |
Constructor.
- Parameters
-
algorithm | the pandora instance to be used alongside the file writer |
fileName | the name of the output file |
fileMode | the mode for file writing |
Definition at line 32 of file FileWriter.cc.
◆ ~FileWriter()
pandora::FileWriter::~FileWriter |
( |
| ) |
|
|
virtual |
◆ GetFileName()
const std::string & pandora::Persistency::GetFileName |
( |
| ) |
const |
|
inlineinherited |
Get the file name.
- Returns
- the file name
Definition at line 90 of file Persistency.h.
◆ GetFileType()
FileType pandora::Persistency::GetFileType |
( |
| ) |
const |
|
inlineinherited |
Get the file type.
- Returns
- the file type
Definition at line 97 of file Persistency.h.
◆ ReplaceCurrentFactory() [1/9]
◆ ReplaceCurrentFactory() [2/9]
◆ ReplaceCurrentFactory() [3/9]
◆ ReplaceCurrentFactory() [4/9]
◆ ReplaceCurrentFactory() [5/9]
◆ ReplaceCurrentFactory() [6/9]
◆ ReplaceCurrentFactory() [7/9]
◆ ReplaceCurrentFactory() [8/9]
◆ ReplaceCurrentFactory() [9/9]
template<typename PARAMETERS , typename OBJECT >
void pandora::Persistency::ReplaceCurrentFactory |
( |
ObjectFactory< PARAMETERS, OBJECT > *const |
pFactory | ) |
|
|
protectedinherited |
Replace the current factory with the provided instance.
- Parameters
-
pFactory | address of the factory |
◆ SetFactory()
template<typename PARAMETERS , typename OBJECT >
Set the factory to use for all instantiations and parameter persistence.
- Parameters
-
pFactory | address of the factory |
Definition at line 49 of file Persistency.cc.
◆ WriteCaloHit()
virtual StatusCode pandora::FileWriter::WriteCaloHit |
( |
const CaloHit *const |
pCaloHit | ) |
|
|
protectedpure virtual |
◆ WriteCaloHitList()
Write a calo hit list to the current position in the file.
- Parameters
-
caloHitList | the calo hit list |
Definition at line 138 of file FileWriter.cc.
◆ WriteCaloHitToMCParticleRelationship()
StatusCode pandora::FileWriter::WriteCaloHitToMCParticleRelationship |
( |
const CaloHit *const |
pCaloHit | ) |
|
|
private |
Write a calo hit to mc particle relationship to the current position in the file.
- Parameters
-
pCaloHit | address of the calo hit |
Definition at line 210 of file FileWriter.cc.
◆ WriteCaloHitToMCParticleRelationships()
Write calo hit to mc particle relationships for a specified calo hit list.
- Parameters
-
caloHitList | the calo hit list |
Definition at line 162 of file FileWriter.cc.
◆ WriteDetectorGap()
◆ WriteDetectorGapList()
StatusCode pandora::FileWriter::WriteDetectorGapList |
( |
| ) |
|
|
private |
Write the detector gap parameters to the file.
Definition at line 114 of file FileWriter.cc.
◆ WriteEvent()
StatusCode pandora::FileWriter::WriteEvent |
( |
const CaloHitList & |
caloHitList, |
|
|
const TrackList & |
trackList, |
|
|
const MCParticleList & |
mcParticleList, |
|
|
const bool |
writeMCRelationships = true , |
|
|
const bool |
writeTrackRelationships = true |
|
) |
| |
Write the specified event components to the file.
- Parameters
-
caloHitList | the list of calo hits to write to the file |
trackList | the list of tracks to write to the file |
mcParticleList | the list of mc particles to write to the file |
writeMCRelationships | whether to write mc relationship information to the file |
writeTrackRelationships | whether to write track relationship information to the file |
Definition at line 63 of file FileWriter.cc.
◆ WriteFooter()
virtual StatusCode pandora::FileWriter::WriteFooter |
( |
| ) |
|
|
protectedpure virtual |
◆ WriteGeometry()
Write the current geometry information to the file.
Definition at line 45 of file FileWriter.cc.
◆ WriteHeader()
◆ WriteLArTPC()
virtual StatusCode pandora::FileWriter::WriteLArTPC |
( |
const LArTPC *const |
pLArTPC | ) |
|
|
protectedpure virtual |
◆ WriteLArTPCList()
StatusCode pandora::FileWriter::WriteLArTPCList |
( |
| ) |
|
|
private |
Write the lar tpc parameters to the file.
Definition at line 102 of file FileWriter.cc.
◆ WriteMCParticle()
◆ WriteMCParticleList()
Write a mc particle list to the current position in the file.
- Parameters
-
mcParticleList | the mc particle list |
Definition at line 150 of file FileWriter.cc.
◆ WriteMCParticleRelationships() [1/2]
Write a mc particle parent/daughter relationship to the current position in the file.
- Parameters
-
pMCParticle | address of the mc particle |
Definition at line 254 of file FileWriter.cc.
◆ WriteMCParticleRelationships() [2/2]
Write mc particle relationships for a specified mc particle list.
- Parameters
-
mcParticleList | the mc particle list |
Definition at line 186 of file FileWriter.cc.
◆ WriteRelationship()
virtual StatusCode pandora::FileWriter::WriteRelationship |
( |
const RelationshipId |
relationshipId, |
|
|
const void * |
address1, |
|
|
const void * |
address2, |
|
|
const float |
weight = 1.f |
|
) |
| |
|
protectedpure virtual |
Write a relationship between two objects with specified addresses.
- Parameters
-
relationshipId | the relationship id |
address1 | first address to write |
address2 | second address to write |
Implemented in pandora::BinaryFileWriter, and pandora::XmlFileWriter.
◆ WriteSubDetector()
◆ WriteSubDetectorList()
StatusCode pandora::FileWriter::WriteSubDetectorList |
( |
| ) |
|
|
private |
Write the sub detector parameters to the file.
Definition at line 90 of file FileWriter.cc.
◆ WriteTrack()
virtual StatusCode pandora::FileWriter::WriteTrack |
( |
const Track *const |
pTrack | ) |
|
|
protectedpure virtual |
◆ WriteTrackList()
Write a track list to the current position in the file.
- Parameters
-
Definition at line 126 of file FileWriter.cc.
◆ WriteTrackRelationships() [1/2]
StatusCode pandora::FileWriter::WriteTrackRelationships |
( |
const Track *const |
pTrack | ) |
|
|
private |
Write a track sibling or parent/daughter relationship to the current position in the file.
- Parameters
-
pTrack | address of the track |
Definition at line 278 of file FileWriter.cc.
◆ WriteTrackRelationships() [2/2]
Write track relationships for a specified list of tracks.
- Parameters
-
Definition at line 198 of file FileWriter.cc.
◆ WriteTrackToMCParticleRelationship()
StatusCode pandora::FileWriter::WriteTrackToMCParticleRelationship |
( |
const Track *const |
pTrack | ) |
|
|
private |
Write a track to mc particle relationship to the current position in the file.
- Parameters
-
pTrack | address of the track |
Definition at line 232 of file FileWriter.cc.
◆ WriteTrackToMCParticleRelationships()
StatusCode pandora::FileWriter::WriteTrackToMCParticleRelationships |
( |
const TrackList & |
trackList | ) |
|
|
private |
Write track to mc particle relationships for a specified track list.
- Parameters
-
Definition at line 174 of file FileWriter.cc.
◆ m_containerId
The type of container currently being written to file.
Definition at line 76 of file Persistency.h.
◆ m_fileName
std::string pandora::Persistency::m_fileName |
|
protectedinherited |
◆ m_fileType
FileType pandora::Persistency::m_fileType |
|
protectedinherited |
◆ m_pBoxGapFactory
Address of the box gap factory.
Definition at line 84 of file Persistency.h.
◆ m_pCaloHitFactory
Address of the calo hit factory.
Definition at line 78 of file Persistency.h.
◆ m_pConcentricGapFactory
Address of the concentric gap factory.
Definition at line 85 of file Persistency.h.
◆ m_pLArTPCFactory
Address of the lar tpc factory.
Definition at line 82 of file Persistency.h.
◆ m_pLineGapFactory
Address of the line gap factory.
Definition at line 83 of file Persistency.h.
◆ m_pMCParticleFactory
Address of the mc particle factory.
Definition at line 80 of file Persistency.h.
◆ m_pPandora
const Pandora* const pandora::Persistency::m_pPandora |
|
protectedinherited |
Address of pandora instance to be used alongside the file writer.
Definition at line 73 of file Persistency.h.
◆ m_pSubDetectorFactory
Address of the sub detector factory.
Definition at line 81 of file Persistency.h.
◆ m_pTrackFactory
The documentation for this class was generated from the following files: