LArSoft  v07_13_02
Liquid Argon Software toolkit - http://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 54 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 725 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.

726  :
736  m_pTrackToHitAssociation(nullptr),
737  m_pShowerToHitAssociation(nullptr),
738  m_pSliceToHitAssociation(nullptr),
740 {
741 
742  // Load the collections
743  this->LoadCollection(evt, pandoraLabel, m_pfParticleCollection);
744  this->LoadCollection(evt, pandoraLabel, m_pfParticleMetadataCollection);
745  this->LoadCollection(evt, pandoraLabel, m_clusterCollection);
746  this->LoadCollection(evt, pandoraLabel, m_spacePointCollection);
747  this->LoadCollection(evt, pandoraLabel, m_vertexCollection);
748  this->LoadCollection(evt, trackLabel , m_trackCollection);
749  this->LoadCollection(evt, showerLabel , m_showerCollection);
750  this->LoadCollection(evt, showerLabel , m_pcAxisCollection);
751  this->LoadCollection(evt, pandoraLabel, m_sliceCollection);
752 
753  // Load the associations
762 
765 
769 }
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 773 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.

774 {
775  // Clean up all heap memory
789 }
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 805 of file LArPandoraEventDump_module.cc.

References tca::evt.

Referenced by PandoraData().

806 {
807  if (label.empty())
808  return;
809 
810  if (pAssociation)
811  throw cet::exception("LArPandoraEventDump") << "Association supplied type has already been loaded!";
812 
813  pAssociation = new Association<U>(collection, evt, label);
814 }
TCEvent evt
Definition: DataStructs.cxx:5
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 794 of file LArPandoraEventDump_module.cc.

References art::DataViewImpl::getByLabel().

Referenced by PandoraData().

795 {
796  if (label.empty())
797  return;
798 
799  evt.getByLabel(label, collection);
800 }
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
Definition: DataViewImpl.h:344

Member Data Documentation

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

The Cluster handle.

Definition at line 75 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 80 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 74 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 79 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 76 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 77 of file LArPandoraEventDump_module.cc.

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


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