LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
MultiPandoraApiImpl.h
Go to the documentation of this file.
1 
8 #ifndef MULTI_PANDORA_API_IMPL_H
9 #define MULTI_PANDORA_API_IMPL_H 1
10 
11 #include "Objects/CartesianVector.h"
12 
14 
15 #include <map>
16 #include <unordered_map>
17 
22 {
23 private:
28 
33 
40 
49  const pandora::Pandora *GetPandoraInstance(const pandora::Pandora *const pPrimaryPandora, const unsigned int volumeId) const;
50 
58  const PandoraInstanceList &GetDaughterPandoraInstanceList(const pandora::Pandora *const pPrimaryPandora) const;
59 
67  const pandora::Pandora *GetPrimaryPandoraInstance(const pandora::Pandora *const pDaughterPandora) const;
68 
76  unsigned int GetVolumeId(const pandora::Pandora *const pPandora) const;
77 
83  void AddPrimaryPandoraInstance(const pandora::Pandora *const pPrimaryPandora);
84 
91  void AddDaughterPandoraInstance(const pandora::Pandora *const pPrimaryPandora, const pandora::Pandora *const pDaughterPandora);
92 
98  void DeletePandoraInstances(const pandora::Pandora *const pPrimaryPandora);
99 
106  void SetVolumeId(const pandora::Pandora *const pPandora, const unsigned int volumeId);
107 
108  typedef std::unordered_map<const pandora::Pandora *, const pandora::Pandora *> PandoraRelationMap;
109  typedef std::unordered_map<const pandora::Pandora *, unsigned int> PandoraToVolumeIdMap;
110 
112  PandoraRelationMap m_daughterToPrimaryMap;
113  PandoraToVolumeIdMap m_pandoraToVolumeIdMap;
114 
115  friend class MultiPandoraApi;
116 };
117 
118 #endif // #ifndef MULTI_PANDORA_API_IMPL_H
PandoraToVolumeIdMap m_pandoraToVolumeIdMap
The map from pandora instance to volume id.
~MultiPandoraApiImpl()
Destructor;.
MultiPandoraApi class.
void AddDaughterPandoraInstance(const pandora::Pandora *const pPrimaryPandora, const pandora::Pandora *const pDaughterPandora)
Add a pandora daughter instance, associated to a primary pandora instance.
void DeletePandoraInstances(const pandora::Pandora *const pPrimaryPandora)
Delete all pandora instances associated with (and including) a specified primary pandora instance...
void AddPrimaryPandoraInstance(const pandora::Pandora *const pPrimaryPandora)
Declare a new primary pandora instance.
const pandora::Pandora * GetPrimaryPandoraInstance(const pandora::Pandora *const pDaughterPandora) const
Get the address of the primary pandora instance associated with a given daughter pandora instance...
std::vector< const pandora::Pandora * > PandoraInstanceList
std::unordered_map< const pandora::Pandora *, PandoraInstanceList > PandoraInstanceMap
void SetVolumeId(const pandora::Pandora *const pPandora, const unsigned int volumeId)
Set the volume id associated with a given pandora instance.
Header file for the MultiPandoraApi class.
PandoraRelationMap m_daughterToPrimaryMap
The map from daughter pandora instance to primary pandora instance.
const PandoraInstanceMap & GetPandoraInstanceMap() const
Get the pandora instance map.
std::unordered_map< const pandora::Pandora *, const pandora::Pandora * > PandoraRelationMap
MultiPandoraApiImpl()
Default constructor;.
const PandoraInstanceList & GetDaughterPandoraInstanceList(const pandora::Pandora *const pPrimaryPandora) const
Get the list of daughter pandora instances associated with a given primary pandora instance...
PandoraInstanceMap m_primaryToDaughtersMap
The map from primary pandora instance to list of daughter pandora instances.
std::unordered_map< const pandora::Pandora *, unsigned int > PandoraToVolumeIdMap
unsigned int GetVolumeId(const pandora::Pandora *const pPandora) const
Get the volume id associated with a given pandora instance.
MultiPandoraApiImpl class.
const pandora::Pandora * GetPandoraInstance(const pandora::Pandora *const pPrimaryPandora, const unsigned int volumeId) const
Get the address of the pandora instance associated with a given primary pandora instance and volume i...