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

Class to handle the required producer labels. More...

#include "LArPandoraEvent.h"

Public Types

enum  LabelType {
  PFParticleLabel, SpacePointLabel, ClusterLabel, VertexLabel,
  SliceLabel, TrackLabel, ShowerLabel, T0Label,
  PFParticleMetadataLabel, PCAxisLabel, HitLabel, PFParticleToSpacePointLabel,
  PFParticleToClusterLabel, PFParticleToVertexLabel, PFParticleToSliceLabel, PFParticleToTrackLabel,
  PFParticleToShowerLabel, PFParticleToT0Label, PFParticleToMetadataLabel, PFParticleToPCAxisLabel,
  SpacePointToHitLabel, ClusterToHitLabel, SliceToHitLabel, TrackToHitLabel,
  ShowerToHitLabel, ShowerToPCAxisLabel
}
 Label type enumeration. More...
 

Public Member Functions

 Labels (const std::string &pfParticleProducerLabel, const std::string &hitProducerLabel)
 Minimal parametrised constructor. Sets all collection labels to be the same as the PFParticle producer label. More...
 
 Labels (const std::string &pfParticleProducerLabel, const std::string &trackProducerLabel, const std::string &showerProducerLabel, const std::string &hitProducerLabel)
 Track / Shower parametrised constructor. Sets all collection labels to be the same as the PFParticle producer label, except those relating to track and shower production, which are supplied. More...
 
const std::string & GetLabel (const LabelType type) const
 Get the label of a given type. More...
 
void SetLabel (const LabelType type, const std::string &label)
 Set the label of a given type. More...
 

Private Attributes

std::map< LabelType, std::string > m_labels
 Map holding the labels. More...
 

Detailed Description

Class to handle the required producer labels.

Definition at line 97 of file LArPandoraEvent.h.

Member Enumeration Documentation

Label type enumeration.

Enumerator
PFParticleLabel 
SpacePointLabel 
ClusterLabel 
VertexLabel 
SliceLabel 
TrackLabel 
ShowerLabel 
T0Label 
PFParticleMetadataLabel 
PCAxisLabel 
HitLabel 
PFParticleToSpacePointLabel 
PFParticleToClusterLabel 
PFParticleToVertexLabel 
PFParticleToSliceLabel 
PFParticleToTrackLabel 
PFParticleToShowerLabel 
PFParticleToT0Label 
PFParticleToMetadataLabel 
PFParticleToPCAxisLabel 
SpacePointToHitLabel 
ClusterToHitLabel 
SliceToHitLabel 
TrackToHitLabel 
ShowerToHitLabel 
ShowerToPCAxisLabel 

Definition at line 102 of file LArPandoraEvent.h.

102  {
105  ClusterLabel,
106  VertexLabel,
107  SliceLabel,
108  TrackLabel,
109  ShowerLabel,
110  T0Label,
112  PCAxisLabel,
113  HitLabel,
129  };

Constructor & Destructor Documentation

lar_pandora::LArPandoraEvent::Labels::Labels ( const std::string &  pfParticleProducerLabel,
const std::string &  hitProducerLabel 
)

Minimal parametrised constructor. Sets all collection labels to be the same as the PFParticle producer label.

Definition at line 158 of file LArPandoraEvent.cxx.

References lar_pandora::LArPandoraEvent::m_labels.

160  {
161  m_labels.emplace(PFParticleLabel, pfParticleProducerLabel);
162  m_labels.emplace(SpacePointLabel, pfParticleProducerLabel);
163  m_labels.emplace(ClusterLabel, pfParticleProducerLabel);
164  m_labels.emplace(VertexLabel, pfParticleProducerLabel);
165  m_labels.emplace(SliceLabel, pfParticleProducerLabel);
166  m_labels.emplace(TrackLabel, pfParticleProducerLabel);
167  m_labels.emplace(ShowerLabel, pfParticleProducerLabel);
168  m_labels.emplace(T0Label, pfParticleProducerLabel);
169  m_labels.emplace(PFParticleMetadataLabel, pfParticleProducerLabel);
170  m_labels.emplace(PCAxisLabel, pfParticleProducerLabel);
171  m_labels.emplace(HitLabel, hitProducerLabel);
172 
173  m_labels.emplace(PFParticleToSpacePointLabel, pfParticleProducerLabel);
174  m_labels.emplace(PFParticleToClusterLabel, pfParticleProducerLabel);
175  m_labels.emplace(PFParticleToVertexLabel, pfParticleProducerLabel);
176  m_labels.emplace(PFParticleToSliceLabel, pfParticleProducerLabel);
177  m_labels.emplace(PFParticleToTrackLabel, pfParticleProducerLabel);
178  m_labels.emplace(PFParticleToShowerLabel, pfParticleProducerLabel);
179  m_labels.emplace(PFParticleToT0Label, pfParticleProducerLabel);
180  m_labels.emplace(PFParticleToMetadataLabel, pfParticleProducerLabel);
181  m_labels.emplace(PFParticleToPCAxisLabel, pfParticleProducerLabel);
182  m_labels.emplace(SpacePointToHitLabel, pfParticleProducerLabel);
183  m_labels.emplace(ClusterToHitLabel, pfParticleProducerLabel);
184  m_labels.emplace(SliceToHitLabel, pfParticleProducerLabel);
185  m_labels.emplace(TrackToHitLabel, pfParticleProducerLabel);
186  m_labels.emplace(ShowerToHitLabel, pfParticleProducerLabel);
187  m_labels.emplace(ShowerToPCAxisLabel, pfParticleProducerLabel);
188  }
std::map< LabelType, std::string > m_labels
Map holding the labels.
lar_pandora::LArPandoraEvent::Labels::Labels ( const std::string &  pfParticleProducerLabel,
const std::string &  trackProducerLabel,
const std::string &  showerProducerLabel,
const std::string &  hitProducerLabel 
)

Track / Shower parametrised constructor. Sets all collection labels to be the same as the PFParticle producer label, except those relating to track and shower production, which are supplied.

Definition at line 192 of file LArPandoraEvent.cxx.

References lar_pandora::LArPandoraEvent::m_labels.

196  {
197  m_labels.emplace(PFParticleLabel, pfParticleProducerLabel);
198  m_labels.emplace(SpacePointLabel, pfParticleProducerLabel);
199  m_labels.emplace(ClusterLabel, pfParticleProducerLabel);
200  m_labels.emplace(VertexLabel, pfParticleProducerLabel);
201  m_labels.emplace(SliceLabel, pfParticleProducerLabel);
202  m_labels.emplace(TrackLabel, trackProducerLabel);
203  m_labels.emplace(ShowerLabel, showerProducerLabel);
204  m_labels.emplace(T0Label, pfParticleProducerLabel);
205  m_labels.emplace(PFParticleMetadataLabel, pfParticleProducerLabel);
206  m_labels.emplace(PCAxisLabel, showerProducerLabel);
207  m_labels.emplace(HitLabel, hitProducerLabel);
208 
209  m_labels.emplace(PFParticleToSpacePointLabel, pfParticleProducerLabel);
210  m_labels.emplace(PFParticleToClusterLabel, pfParticleProducerLabel);
211  m_labels.emplace(PFParticleToVertexLabel, pfParticleProducerLabel);
212  m_labels.emplace(PFParticleToSliceLabel, pfParticleProducerLabel);
213  m_labels.emplace(PFParticleToTrackLabel, trackProducerLabel);
214  m_labels.emplace(PFParticleToShowerLabel, showerProducerLabel);
215  m_labels.emplace(PFParticleToT0Label, pfParticleProducerLabel);
216  m_labels.emplace(PFParticleToMetadataLabel, pfParticleProducerLabel);
217  m_labels.emplace(PFParticleToPCAxisLabel, showerProducerLabel);
218  m_labels.emplace(SpacePointToHitLabel, pfParticleProducerLabel);
219  m_labels.emplace(ClusterToHitLabel, pfParticleProducerLabel);
220  m_labels.emplace(SliceToHitLabel, pfParticleProducerLabel);
221  m_labels.emplace(TrackToHitLabel, trackProducerLabel);
222  m_labels.emplace(ShowerToHitLabel, showerProducerLabel);
223  m_labels.emplace(ShowerToPCAxisLabel, showerProducerLabel);
224  }
std::map< LabelType, std::string > m_labels
Map holding the labels.

Member Function Documentation

const std::string & lar_pandora::LArPandoraEvent::Labels::GetLabel ( const LabelType  type) const

Get the label of a given type.

Parameters
typethe label type to retrieve
Returns
the label

Definition at line 228 of file LArPandoraEvent.cxx.

References lar_pandora::LArPandoraEvent::m_labels.

229  {
230  if (m_labels.find(type) == m_labels.end())
231  throw cet::exception("LArPandora")
232  << " LArPandoraEvent::GetLabel -- Label map doesn't contain label of requested type"
233  << std::endl;
234 
235  return m_labels.at(type);
236  }
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
std::map< LabelType, std::string > m_labels
Map holding the labels.
void lar_pandora::LArPandoraEvent::Labels::SetLabel ( const LabelType  type,
const std::string &  label 
)

Set the label of a given type.

Parameters
typethe label type to set
labelthe label to set

Definition at line 240 of file LArPandoraEvent.cxx.

References lar_pandora::LArPandoraEvent::m_labels.

241  {
242  m_labels[type] = label;
243  }
std::map< LabelType, std::string > m_labels
Map holding the labels.

Member Data Documentation

std::map<LabelType, std::string> lar_pandora::LArPandoraEvent::Labels::m_labels
private

Map holding the labels.

Definition at line 165 of file LArPandoraEvent.h.


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