LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
lar_pandora::LArPandoraEventDump::PandoraData Class Reference

Class holding the handle for all of the data types from Pandora. More...

Public Member Functions

 PandoraData (const art::Event &evt, const std::string &pandoraLabel, const std::string &trackLabel="", const std::string &showerLabel="")
 Default constructor. More...
 
 ~PandoraData ()
 Default destructor. More...
 

Public Attributes

Collection< recob::PFParticlem_pfParticleCollection
 The PFParticle handle. More...
 
Collection< larpandoraobj::PFParticleMetadatam_pfParticleMetadataCollection
 The PFParticleMetadata handle. More...
 
Collection< recob::Clusterm_clusterCollection
 The Cluster handle. More...
 
Collection< recob::SpacePointm_spacePointCollection
 The SpacePoint handle. More...
 
Collection< recob::Vertexm_vertexCollection
 The Vertex handle. More...
 
Collection< recob::Trackm_trackCollection
 The Track handle. More...
 
Collection< recob::Showerm_showerCollection
 The Shower handle. More...
 
Collection< recob::PCAxism_pcAxisCollection
 The PCAxis handle. More...
 
Collection< recob::Slicem_sliceCollection
 The Slice handle. More...
 
Association< larpandoraobj::PFParticleMetadata > * m_pPFParticleToMetadataAssociation
 The PFParticle to metadata association. More...
 
Association< recob::Cluster > * m_pPFParticleToClusterAssociation
 The PFParticle to cluster association. More...
 
Association< recob::SpacePoint > * m_pPFParticleToSpacePointAssociation
 The PFParticle to space point association. More...
 
Association< recob::Vertex > * m_pPFParticleToVertexAssociation
 The PFParticle to vertex association. More...
 
Association< recob::Track > * m_pPFParticleToTrackAssociation
 The PFParticle to track association. More...
 
Association< recob::Shower > * m_pPFParticleToShowerAssociation
 The PFParticle to shower association. More...
 
Association< recob::Slice > * m_pPFParticleToSliceAssociation
 The PFParticle to slice association. More...
 
Association< recob::Hit > * m_pClusterToHitAssociation
 The Cluster to hit association. More...
 
Association< recob::Hit > * m_pSpacePointToHitAssociation
 The SpacePoint to hit association. More...
 
Association< recob::Hit > * m_pTrackToHitAssociation
 The Track to hit association. More...
 
Association< recob::Hit > * m_pShowerToHitAssociation
 The Shower to hit association. More...
 
Association< recob::Hit > * m_pSliceToHitAssociation
 The Slice to hit association. More...
 
Association< recob::PCAxis > * m_pShowerToPCAxisAssociation
 The Shower to PCAxis association. More...
 

Private Member Functions

template<class T >
void LoadCollection (const art::Event &evt, const std::string &label, Collection< T > &collection)
 Load a collection from the event. More...
 
template<class T , class U >
void LoadAssociation (const art::Event &evt, const std::string &label, const Collection< T > &collection, Association< U > *&pAssociation)
 Load an association from the event. More...
 

Detailed Description

Class holding the handle for all of the data types from Pandora.

Definition at line 52 of file LArPandoraEventDump_module.cc.

Constructor & Destructor Documentation

lar_pandora::LArPandoraEventDump::PandoraData::PandoraData ( const art::Event evt,
const std::string &  pandoraLabel,
const std::string &  trackLabel = "",
const std::string &  showerLabel = "" 
)

Default constructor.

Parameters
evtthe art event
pandoraLabelthe pandora producer label
trackLabelthe track producer label (optional)
showerLabelthe shower producer label (optional)

Definition at line 749 of file LArPandoraEventDump_module.cc.

References LoadAssociation(), LoadCollection(), m_clusterCollection, m_pcAxisCollection, m_pClusterToHitAssociation, m_pfParticleCollection, m_pfParticleMetadataCollection, m_pPFParticleToClusterAssociation, m_pPFParticleToMetadataAssociation, m_pPFParticleToShowerAssociation, m_pPFParticleToSliceAssociation, m_pPFParticleToSpacePointAssociation, m_pPFParticleToTrackAssociation, m_pPFParticleToVertexAssociation, m_pShowerToHitAssociation, m_pShowerToPCAxisAssociation, m_pSliceToHitAssociation, m_pSpacePointToHitAssociation, m_pTrackToHitAssociation, m_showerCollection, m_sliceCollection, m_spacePointCollection, m_trackCollection, and m_vertexCollection.

760  , m_pClusterToHitAssociation(nullptr)
762  , m_pTrackToHitAssociation(nullptr)
763  , m_pShowerToHitAssociation(nullptr)
764  , m_pSliceToHitAssociation(nullptr)
766  {
767 
768  // Load the collections
769  this->LoadCollection(evt, pandoraLabel, m_pfParticleCollection);
770  this->LoadCollection(evt, pandoraLabel, m_pfParticleMetadataCollection);
771  this->LoadCollection(evt, pandoraLabel, m_clusterCollection);
772  this->LoadCollection(evt, pandoraLabel, m_spacePointCollection);
773  this->LoadCollection(evt, pandoraLabel, m_vertexCollection);
774  this->LoadCollection(evt, trackLabel, m_trackCollection);
775  this->LoadCollection(evt, showerLabel, m_showerCollection);
776  this->LoadCollection(evt, showerLabel, m_pcAxisCollection);
777  this->LoadCollection(evt, pandoraLabel, m_sliceCollection);
778 
779  // Load the associations
780  this->LoadAssociation(
782  this->LoadAssociation(
784  this->LoadAssociation(
786  this->LoadAssociation(
788  this->LoadAssociation(
793 
796 
797  this->LoadAssociation(
801  }
Association< recob::Slice > * m_pPFParticleToSliceAssociation
The PFParticle to slice association.
Association< recob::Hit > * m_pClusterToHitAssociation
The Cluster to hit association.
Collection< recob::Cluster > m_clusterCollection
The Cluster handle.
Association< recob::PCAxis > * m_pShowerToPCAxisAssociation
The Shower to PCAxis association.
Collection< recob::SpacePoint > m_spacePointCollection
The SpacePoint handle.
Association< recob::Hit > * m_pSliceToHitAssociation
The Slice to hit association.
Association< recob::Shower > * m_pPFParticleToShowerAssociation
The PFParticle to shower association.
void LoadAssociation(const art::Event &evt, const std::string &label, const Collection< T > &collection, Association< U > *&pAssociation)
Load an association from the event.
Association< recob::Cluster > * m_pPFParticleToClusterAssociation
The PFParticle to cluster association.
Collection< recob::PCAxis > m_pcAxisCollection
The PCAxis handle.
Collection< recob::Slice > m_sliceCollection
The Slice handle.
Association< recob::Track > * m_pPFParticleToTrackAssociation
The PFParticle to track association.
Collection< recob::Vertex > m_vertexCollection
The Vertex handle.
Association< larpandoraobj::PFParticleMetadata > * m_pPFParticleToMetadataAssociation
The PFParticle to metadata association.
Collection< recob::Shower > m_showerCollection
The Shower handle.
Association< recob::SpacePoint > * m_pPFParticleToSpacePointAssociation
The PFParticle to space point association.
Association< recob::Hit > * m_pSpacePointToHitAssociation
The SpacePoint to hit association.
Association< recob::Hit > * m_pShowerToHitAssociation
The Shower to hit association.
void LoadCollection(const art::Event &evt, const std::string &label, Collection< T > &collection)
Load a collection from the event.
Collection< recob::PFParticle > m_pfParticleCollection
The PFParticle handle.
Collection< larpandoraobj::PFParticleMetadata > m_pfParticleMetadataCollection
The PFParticleMetadata handle.
Association< recob::Vertex > * m_pPFParticleToVertexAssociation
The PFParticle to vertex association.
Association< recob::Hit > * m_pTrackToHitAssociation
The Track to hit association.
Collection< recob::Track > m_trackCollection
The Track handle.
lar_pandora::LArPandoraEventDump::PandoraData::~PandoraData ( )

Default destructor.

Definition at line 805 of file LArPandoraEventDump_module.cc.

References m_pClusterToHitAssociation, m_pPFParticleToClusterAssociation, m_pPFParticleToMetadataAssociation, m_pPFParticleToShowerAssociation, m_pPFParticleToSliceAssociation, m_pPFParticleToSpacePointAssociation, m_pPFParticleToTrackAssociation, m_pPFParticleToVertexAssociation, m_pShowerToHitAssociation, m_pShowerToPCAxisAssociation, m_pSliceToHitAssociation, m_pSpacePointToHitAssociation, and m_pTrackToHitAssociation.

806  {
807  // Clean up all heap memory
821  }
Association< recob::Slice > * m_pPFParticleToSliceAssociation
The PFParticle to slice association.
Association< recob::Hit > * m_pClusterToHitAssociation
The Cluster to hit association.
Association< recob::PCAxis > * m_pShowerToPCAxisAssociation
The Shower to PCAxis association.
Association< recob::Hit > * m_pSliceToHitAssociation
The Slice to hit association.
Association< recob::Shower > * m_pPFParticleToShowerAssociation
The PFParticle to shower association.
Association< recob::Cluster > * m_pPFParticleToClusterAssociation
The PFParticle to cluster association.
Association< recob::Track > * m_pPFParticleToTrackAssociation
The PFParticle to track association.
Association< larpandoraobj::PFParticleMetadata > * m_pPFParticleToMetadataAssociation
The PFParticle to metadata association.
Association< recob::SpacePoint > * m_pPFParticleToSpacePointAssociation
The PFParticle to space point association.
Association< recob::Hit > * m_pSpacePointToHitAssociation
The SpacePoint to hit association.
Association< recob::Hit > * m_pShowerToHitAssociation
The Shower to hit association.
Association< recob::Vertex > * m_pPFParticleToVertexAssociation
The PFParticle to vertex association.
Association< recob::Hit > * m_pTrackToHitAssociation
The Track to hit association.

Member Function Documentation

template<class T , class U >
void lar_pandora::LArPandoraEventDump::PandoraData::LoadAssociation ( const art::Event evt,
const std::string &  label,
const Collection< T > &  collection,
Association< U > *&  pAssociation 
)
private

Load an association from the event.

Parameters
evtthe art event
labelthe producer label
collectionthe input collection (from which object are associated)
pAssociationthe output association

Definition at line 838 of file LArPandoraEventDump_module.cc.

References tca::evt.

Referenced by PandoraData().

842  {
843  if (label.empty()) return;
844 
845  if (pAssociation)
846  throw cet::exception("LArPandoraEventDump")
847  << "Association supplied type has already been loaded!";
848 
849  pAssociation = new Association<U>(collection, evt, label);
850  }
TCEvent evt
Definition: DataStructs.cxx:8
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
template<class T >
void lar_pandora::LArPandoraEventDump::PandoraData::LoadCollection ( const art::Event evt,
const std::string &  label,
Collection< T > &  collection 
)
private

Load a collection from the event.

Parameters
evtthe art event
labelthe producer label
collectionthe output collection

Definition at line 826 of file LArPandoraEventDump_module.cc.

References art::ProductRetriever::getByLabel().

Referenced by PandoraData().

829  {
830  if (label.empty()) return;
831 
832  evt.getByLabel(label, collection);
833  }
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const

Member Data Documentation

Collection<recob::Cluster> lar_pandora::LArPandoraEventDump::PandoraData::m_clusterCollection

The Cluster handle.

Definition at line 76 of file LArPandoraEventDump_module.cc.

Referenced by PandoraData(), and lar_pandora::LArPandoraEventDump::PrintEventSummary().

Collection<recob::PCAxis> lar_pandora::LArPandoraEventDump::PandoraData::m_pcAxisCollection

The PCAxis handle.

Definition at line 81 of file LArPandoraEventDump_module.cc.

Referenced by PandoraData(), and lar_pandora::LArPandoraEventDump::PrintEventSummary().

Association<recob::Hit>* lar_pandora::LArPandoraEventDump::PandoraData::m_pClusterToHitAssociation
Collection<larpandoraobj::PFParticleMetadata> lar_pandora::LArPandoraEventDump::PandoraData::m_pfParticleMetadataCollection

The PFParticleMetadata handle.

Definition at line 75 of file LArPandoraEventDump_module.cc.

Referenced by PandoraData(), and lar_pandora::LArPandoraEventDump::PrintEventSummary().

Association<recob::Cluster>* lar_pandora::LArPandoraEventDump::PandoraData::m_pPFParticleToClusterAssociation
Association<larpandoraobj::PFParticleMetadata>* lar_pandora::LArPandoraEventDump::PandoraData::m_pPFParticleToMetadataAssociation
Association<recob::Shower>* lar_pandora::LArPandoraEventDump::PandoraData::m_pPFParticleToShowerAssociation
Association<recob::Slice>* lar_pandora::LArPandoraEventDump::PandoraData::m_pPFParticleToSliceAssociation
Association<recob::SpacePoint>* lar_pandora::LArPandoraEventDump::PandoraData::m_pPFParticleToSpacePointAssociation
Association<recob::Track>* lar_pandora::LArPandoraEventDump::PandoraData::m_pPFParticleToTrackAssociation
Association<recob::Vertex>* lar_pandora::LArPandoraEventDump::PandoraData::m_pPFParticleToVertexAssociation
Association<recob::Hit>* lar_pandora::LArPandoraEventDump::PandoraData::m_pShowerToHitAssociation
Association<recob::PCAxis>* lar_pandora::LArPandoraEventDump::PandoraData::m_pShowerToPCAxisAssociation
Association<recob::Hit>* lar_pandora::LArPandoraEventDump::PandoraData::m_pSliceToHitAssociation
Association<recob::Hit>* lar_pandora::LArPandoraEventDump::PandoraData::m_pSpacePointToHitAssociation
Association<recob::Hit>* lar_pandora::LArPandoraEventDump::PandoraData::m_pTrackToHitAssociation
Collection<recob::Shower> lar_pandora::LArPandoraEventDump::PandoraData::m_showerCollection

The Shower handle.

Definition at line 80 of file LArPandoraEventDump_module.cc.

Referenced by PandoraData(), and lar_pandora::LArPandoraEventDump::PrintEventSummary().

Collection<recob::Slice> lar_pandora::LArPandoraEventDump::PandoraData::m_sliceCollection
Collection<recob::SpacePoint> lar_pandora::LArPandoraEventDump::PandoraData::m_spacePointCollection

The SpacePoint handle.

Definition at line 77 of file LArPandoraEventDump_module.cc.

Referenced by PandoraData(), and lar_pandora::LArPandoraEventDump::PrintEventSummary().

Collection<recob::Track> lar_pandora::LArPandoraEventDump::PandoraData::m_trackCollection
Collection<recob::Vertex> lar_pandora::LArPandoraEventDump::PandoraData::m_vertexCollection

The Vertex handle.

Definition at line 78 of file LArPandoraEventDump_module.cc.

Referenced by PandoraData(), and lar_pandora::LArPandoraEventDump::PrintEventSummary().


The documentation for this class was generated from the following file: