Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
Persistency.cc
Go to the documentation of this file.
1
9#include "Pandora/Pandora.h"
10
12
13namespace pandora
14{
15
16Persistency::Persistency(const pandora::Pandora &pandora, const std::string &fileName) :
17 m_pPandora(&pandora),
18 m_fileName(fileName),
19 m_fileType(UNKNOWN_FILE_TYPE),
20 m_containerId(UNKNOWN_CONTAINER),
24 m_pSubDetectorFactory(new PandoraObjectFactory<object_creation::Geometry::SubDetector::Parameters, object_creation::Geometry::SubDetector::Object>()),
25 m_pLArTPCFactory(new PandoraObjectFactory<object_creation::Geometry::LArTPC::Parameters, object_creation::Geometry::LArTPC::Object>()),
26 m_pLineGapFactory(new PandoraObjectFactory<object_creation::Geometry::LineGap::Parameters, object_creation::Geometry::LineGap::Object>()),
27 m_pBoxGapFactory(new PandoraObjectFactory<object_creation::Geometry::BoxGap::Parameters, object_creation::Geometry::BoxGap::Object>()),
28 m_pConcentricGapFactory(new PandoraObjectFactory<object_creation::Geometry::ConcentricGap::Parameters, object_creation::Geometry::ConcentricGap::Object>())
29{
30}
31
32//------------------------------------------------------------------------------------------------------------------------------------------
33
45
46//------------------------------------------------------------------------------------------------------------------------------------------
47
48template <typename PARAMETERS, typename OBJECT>
50{
51 if (!pFactory)
52 return STATUS_CODE_INVALID_PARAMETER;
53
54 this->ReplaceCurrentFactory(pFactory);
55 return STATUS_CODE_SUCCESS;
56}
57
58//------------------------------------------------------------------------------------------------------------------------------------------
59
60template<>
66
67template<>
73
74template<>
80
81template<>
87
88template<>
94
95template<>
101
102template<>
108
109template<>
115
116//------------------------------------------------------------------------------------------------------------------------------------------
117//------------------------------------------------------------------------------------------------------------------------------------------
118
127
128} // namespace pandora
Header file for the pandora class.
Header file for persistency class.
Parameters class.
Definition Validation.h:20
BoxGap class, associated with all 3D hit types.
CaloHit class.
Definition CaloHit.h:26
ConcentricGap class, associated with all 3D hit types.
LArTPC class.
Definition LArTPC.h:26
LineGap class, associated only with 2D TPC hit types and applied only to the z coordinate when sampli...
Definition DetectorGap.h:50
MCParticle class.
Definition MCParticle.h:26
ObjectFactory class responsible for extended pandora object creation.
Pandora class.
Definition Pandora.h:40
PandoraObjectFactory class.
ObjectFactory< object_creation::Geometry::BoxGap::Parameters, object_creation::Geometry::BoxGap::Object > * m_pBoxGapFactory
Address of the box gap factory.
Definition Persistency.h:84
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.
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.
Persistency(const pandora::Pandora &pandora, const std::string &fileName)
Constructor.
ObjectFactory< object_creation::Geometry::ConcentricGap::Parameters, object_creation::Geometry::ConcentricGap::Object > * m_pConcentricGapFactory
Address of the concentric gap factory.
Definition Persistency.h:85
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.
SubDetector class.
Definition SubDetector.h:26
Track class.
Definition Track.h:26
@ UNKNOWN_CONTAINER
Definition PandoraIO.h:27
StatusCode
The StatusCode enum.
@ UNKNOWN_FILE_TYPE
Definition PandoraIO.h:75