![](https://csdnimg.cn/release/download_crawler_static/12273147/bg4.jpg)
439 Page 4 of 16 Eur. Phys. J. C (2015) 75 :439
Object creation is typically requested by a client applica-
tion (Input Objects) or an algorithm (Algorithm Objects).
The calling function must create a local instance of a Pan-
dora parameters object. There is one parameters class for
each type of Pandora object, each having public member
variables to which values must be assigned. For instance, a
PandoraApi::CaloHit::Parameters instance will have public
member variables such as the CaloHit position (three-vector)
and dimensions. The calling function must assign to each of
the member variables, then call the Create API. Failure to
assign to any member variable in the parameters instance
will lead to failure of the object creation. Successful assign-
ment will allow the Pandora SDK to create the required object
instance. The newly created instance is owned and managed
by the Pandora SDK, but can be accessed and manipulated
by algorithms, as described in Sect. 6.
It is possible, for advanced users of the Pandora SDK, to
add additional functionality to the base objects in the Pandora
EDM. The user can inherit from the Pandora base class for
the relevant object. The user may also want to add additional
content to the relevant parameters class and can also define a
new class inheriting from the base parameters. The key step
is for the user to provide an object instantiation factory, inher-
iting from the ObjectFactory template base class, to perform
the actual object creation. The Pandora SDK will continue to
work with pointers to the base class for these derived objects,
but algorithms can successfully access additional function-
ality via use of a dynamic cast.
The Pandora object creation mechanics are templated to
allow for simple addition of new objects to the EDM. Such
an addition would require only the definition of a new object
type, plus the associated parameters class.
5 Pandora client application
The Pandora client application is ultimately responsible
for controlling pattern recognition reconstruction using the
Pandora SDK. The client application creates the Pandora
instances and then sends requests to these instances. Dur-
ing the initialisation step, it must use the Pandora APIs to
perform the following operations:
1. Create the required Pandora instances. Typically only a
single instance is required, although advanced use-cases
addressing problems where particles are split between
multiple detectors may require more. A Pandora instance,
as shown in Fig. 3, contains instantiations of the Pandora
manager classes and API implementations.
2. Register the required Algorithm and Algorithm Tool Fac-
tories with the Pandora instance(s). These factories give
a Pandora instance the ability to create instances of the
algorithms and algorithm tools (see Sect. 7.3), if they
pandora::Pandora
- m_pAlgorithmManager
- m_pCaloHitManager
- m_pClusterManager
- m_pGeometryManager
- m_pMCManager
- m_pPfoManager
- m_pPluginManager
- m_pTrackManager
- m_pVertexManager
- m_pPandoraSettings
- m_pPandoraApiImpl
- m_pPandoraContentApiImpl
- m_pPandoraImpl
+ Pandora()
+ ~Pandora()
+ GetPandoraApiImpl()
+ GetPandoraContentApiImpl()
+ GetSettings()
+ GetGeometry()
+ GetPlugins()
- PrepareEvent()
- ProcessEvent()
- ResetEvent()
- ReadSettings()
Fig. 3 Class diagram describing the structure of the Pandora class.
The member variables consist of the addresses of Pandora manager
instances, API implementation instances and a settings instance. The
member functions provide a number of high-level services and are typ-
ically accessed via the Pandora APIs
are requested via the PandoraSettings XML configura-
tion file.
3. Ask the Pandora instance(s) to parse the provided Pando-
raSettings XML files, which describe the chain of pattern
recognition algorithms to be used to process each event.
The Pandora instance will create and manage the algo-
rithm instances as required and will configure them as
specified.
On a per-event basis, the client application must perform
the following operations:
1. Ask the Pandora instance(s) to create the building-blocks
for the pattern recognition problem. As described in
Sect. 4, this involves assigning values to each of the fields
required for the relevant object type. The Pandora algo-
rithms access the information stored in these building-
blocks, but, crucially, do not need to know how the infor-
mation has been obtained. The client application thus
isolates algorithms from the user’s software framework.
2. Ask each Pandora instance to process the event. The
thread will be passed to the Pandora instance, which will
then run the specified algorithms in the specified order,
123