Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
Persistency.h
Go to the documentation of this file.
1
8#ifndef PANDORA_PERSISTENCY_H
9#define PANDORA_PERSISTENCY_H 1
10
14
16
17#include <string>
18
19namespace pandora
20{
21
26{
27public:
35 Persistency(const pandora::Pandora &pandora, const std::string &fileName);
36
40 virtual ~Persistency();
41
47 const std::string &GetFileName() const;
48
54 FileType GetFileType() const;
55
61 template <typename PARAMETERS, typename OBJECT>
63
64protected:
70 template <typename PARAMETERS, typename OBJECT>
72
73 const Pandora *const m_pPandora;
74 std::string m_fileName;
77
86};
87
88//------------------------------------------------------------------------------------------------------------------------------------------
89
90inline const std::string &Persistency::GetFileName() const
91{
92 return m_fileName;
93}
94
95//------------------------------------------------------------------------------------------------------------------------------------------
96
98{
99 return m_fileType;
100}
101
102} // namespace pandora
103
104#endif // #ifndef PANDORA_PERSISTENCY_H
Header file for pandora object creation classes.
Header file for the object factory class.
Header file for the pandora object factories classes.
ObjectFactory class responsible for extended pandora object creation.
Pandora class.
Definition Pandora.h:40
Persistency class.
Definition Persistency.h:26
ObjectFactory< object_creation::Geometry::BoxGap::Parameters, object_creation::Geometry::BoxGap::Object > * m_pBoxGapFactory
Address of the box gap factory.
Definition Persistency.h:84
ContainerId m_containerId
The type of container currently being written to file.
Definition Persistency.h:76
const Pandora *const m_pPandora
Address of pandora instance to be used alongside the file writer.
Definition Persistency.h:73
ObjectFactory< object_creation::MCParticle::Parameters, object_creation::MCParticle::Object > * m_pMCParticleFactory
Address of the mc particle factory.
Definition Persistency.h:80
ObjectFactory< object_creation::Geometry::LArTPC::Parameters, object_creation::Geometry::LArTPC::Object > * m_pLArTPCFactory
Address of the lar tpc factory.
Definition Persistency.h:82
ObjectFactory< object_creation::Track::Parameters, object_creation::Track::Object > * m_pTrackFactory
Address of the track factory.
Definition Persistency.h:79
virtual ~Persistency()
Destructor.
const std::string & GetFileName() const
Get the file name.
Definition Persistency.h:90
ObjectFactory< object_creation::CaloHit::Parameters, object_creation::CaloHit::Object > * m_pCaloHitFactory
Address of the calo hit factory.
Definition Persistency.h:78
ObjectFactory< object_creation::Geometry::LineGap::Parameters, object_creation::Geometry::LineGap::Object > * m_pLineGapFactory
Address of the line gap factory.
Definition Persistency.h:83
void ReplaceCurrentFactory(ObjectFactory< PARAMETERS, OBJECT > *const pFactory)
Replace the current factory with the provided instance.
ObjectFactory< object_creation::Geometry::ConcentricGap::Parameters, object_creation::Geometry::ConcentricGap::Object > * m_pConcentricGapFactory
Address of the concentric gap factory.
Definition Persistency.h:85
std::string m_fileName
The file name.
Definition Persistency.h:74
ObjectFactory< object_creation::Geometry::SubDetector::Parameters, object_creation::Geometry::SubDetector::Object > * m_pSubDetectorFactory
Address of the sub detector factory.
Definition Persistency.h:81
StatusCode SetFactory(ObjectFactory< PARAMETERS, OBJECT > *const pFactory)
Set the factory to use for all instantiations and parameter persistence.
FileType GetFileType() const
Get the file type.
Definition Persistency.h:97
FileType m_fileType
The file type.
Definition Persistency.h:75
ContainerId
The container identification enum.
Definition PandoraIO.h:24
StatusCode
The StatusCode enum.
FileType
The file type enum.
Definition PandoraIO.h:72