APRILContent
Algorithm of Particle Reconstruction for ILC - implementation with PandoraSDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations
ObjectFactories.h
Go to the documentation of this file.
1 /*
3  *
4  * ObjectFactories.h header template automatically generated by a class generator
5  * Creation date : mar. avr. 28 2015
6  *
7  * This file is part of APRILContent libraries.
8  *
9  * APRILContent is free software: you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation, either version 3 of the License, or
12  * (at your option) any later version.
13  * based upon these libraries are permitted. Any copy of these libraries
14  * must include this copyright notice.
15  *
16  * APRILContent is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with APRILContent. If not, see <http://www.gnu.org/licenses/>.
23  *
24  * @author Remi Ete
25  * @copyright CNRS , IPNL
26  */
27 
28 
29 #ifndef OBJECTFACTORIES_H
30 #define OBJECTFACTORIES_H
31 
32 #include "Api/PandoraApi.h"
33 #include "Api/PandoraContentApi.h"
34 
36 #include "Pandora/ObjectFactory.h"
37 
38 namespace pandora { class FileReader; class FileWriter; }
39 
40 namespace april_content
41 {
42 
46 class CaloHitFactory : public pandora::ObjectFactory<PandoraApi::CaloHit::Parameters, pandora::CaloHit>
47 {
48 private:
54  PandoraApi::CaloHit::Parameters *NewParameters() const;
55 
62  pandora::StatusCode Read(PandoraApi::CaloHit::Parameters &parameters, pandora::FileReader &fileReader) const;
63 
70  pandora::StatusCode Write(const pandora::CaloHit *const pCaloHit, pandora::FileWriter &fileWriter) const;
71 
78  pandora::StatusCode Create(const PandoraApi::CaloHit::Parameters &parameters, const pandora::CaloHit *&pCaloHit) const;
79 };
80 
81 //------------------------------------------------------------------------------------------------------------------------------------------
82 //------------------------------------------------------------------------------------------------------------------------------------------
83 
87 class TrackFactory : public pandora::ObjectFactory<PandoraApi::Track::Parameters, pandora::Track>
88 {
89 private:
95  PandoraApi::Track::Parameters *NewParameters() const;
96 
103  pandora::StatusCode Read(PandoraApi::Track::Parameters &parameters, pandora::FileReader &fileReader) const;
104 
111  pandora::StatusCode Write(const pandora::Track *const pTrack, pandora::FileWriter &fileWriter) const;
112 
119  pandora::StatusCode Create(const PandoraApi::Track::Parameters &parameters, const pandora::Track *&pTrack) const;
120 
121 };
122 
126 class ClusterFactory : public pandora::ObjectFactory<PandoraContentApi::Cluster::Parameters, pandora::Cluster>
127 {
128 private:
134  PandoraContentApi::Cluster::Parameters *NewParameters() const;
135 
142  pandora::StatusCode Read(PandoraContentApi::Cluster::Parameters &parameters, pandora::FileReader &fileReader) const;
143 
150  pandora::StatusCode Write(const pandora::Cluster *const pCluster, pandora::FileWriter &fileWriter) const;
151 
158  pandora::StatusCode Create(const PandoraContentApi::Cluster::Parameters &parameters, const pandora::Cluster *&pCluster) const;
159 };
160 
161 
162 }
163 
164 #endif // OBJECTFACTORIES_H
pandora::StatusCode Create(const PandoraApi::CaloHit::Parameters &parameters, const pandora::CaloHit *&pCaloHit) const
Create an object with the given parameters.
Definition: ObjectFactories.cc:58
pandora::StatusCode Write(const pandora::Track *const pTrack, pandora::FileWriter &fileWriter) const
Persist any additional (derived class only) object parameters using the specified file writer...
Definition: ObjectFactories.cc:103
pandora::StatusCode Create(const PandoraApi::Track::Parameters &parameters, const pandora::Track *&pTrack) const
Create an object with the given parameters.
Definition: ObjectFactories.cc:111
ClusterFactory class.
Definition: ObjectFactories.h:126
pandora::StatusCode Read(PandoraContentApi::Cluster::Parameters &parameters, pandora::FileReader &fileReader) const
Read any additional (derived class only) object parameters from file using the specified file reader...
Definition: ObjectFactories.cc:148
pandora::StatusCode Read(PandoraApi::CaloHit::Parameters &parameters, pandora::FileReader &fileReader) const
Read any additional (derived class only) object parameters from file using the specified file reader...
Definition: ObjectFactories.cc:42
CaloHitFactory class.
Definition: ObjectFactories.h:46
pandora::StatusCode Read(PandoraApi::Track::Parameters &parameters, pandora::FileReader &fileReader) const
Read any additional (derived class only) object parameters from file using the specified file reader...
Definition: ObjectFactories.cc:95
pandora::StatusCode Write(const pandora::CaloHit *const pCaloHit, pandora::FileWriter &fileWriter) const
Persist any additional (derived class only) object parameters using the specified file writer...
Definition: ObjectFactories.cc:50
PandoraApi::Track::Parameters * NewParameters() const
Create new parameters instance on the heap (memory-management to be controlled by user) ...
Definition: ObjectFactories.cc:88
PandoraContentApi::Cluster::Parameters * NewParameters() const
Create new parameters instance on the heap (memory-management to be controlled by user) ...
Definition: ObjectFactories.cc:141
PandoraApi::CaloHit::Parameters * NewParameters() const
Create new parameters instance on the heap (memory-management to be controlled by user) ...
Definition: ObjectFactories.cc:35
pandora::StatusCode Write(const pandora::Cluster *const pCluster, pandora::FileWriter &fileWriter) const
Persist any additional (derived class only) object parameters using the specified file writer...
Definition: ObjectFactories.cc:156
TrackFactory class.
Definition: ObjectFactories.h:87
pandora::StatusCode Create(const PandoraContentApi::Cluster::Parameters &parameters, const pandora::Cluster *&pCluster) const
Create an object with the given parameters.
Definition: ObjectFactories.cc:164