Public Types | Public Member Functions | Private Attributes | List of all members
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::stringGetLabel (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::stringm_labels
 Map holding the labels. More...
 

Detailed Description

Class to handle the required producer labels.

Definition at line 94 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 100 of file LArPandoraEvent.h.

101  {
104  ClusterLabel,
105  VertexLabel,
106  SliceLabel,
107  TrackLabel,
108  ShowerLabel,
109  T0Label,
111  PCAxisLabel,
112  HitLabel,
128  };

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 146 of file LArPandoraEvent.cxx.

147 {
148  m_labels.emplace(PFParticleLabel, pfParticleProducerLabel);
149  m_labels.emplace(SpacePointLabel, pfParticleProducerLabel);
150  m_labels.emplace(ClusterLabel, pfParticleProducerLabel);
151  m_labels.emplace(VertexLabel, pfParticleProducerLabel);
152  m_labels.emplace(SliceLabel, pfParticleProducerLabel);
153  m_labels.emplace(TrackLabel, pfParticleProducerLabel);
154  m_labels.emplace(ShowerLabel, pfParticleProducerLabel);
155  m_labels.emplace(T0Label, pfParticleProducerLabel);
156  m_labels.emplace(PFParticleMetadataLabel, pfParticleProducerLabel);
157  m_labels.emplace(PCAxisLabel, pfParticleProducerLabel);
158  m_labels.emplace(HitLabel, hitProducerLabel);
159 
160  m_labels.emplace(PFParticleToSpacePointLabel, pfParticleProducerLabel);
161  m_labels.emplace(PFParticleToClusterLabel, pfParticleProducerLabel);
162  m_labels.emplace(PFParticleToVertexLabel, pfParticleProducerLabel);
163  m_labels.emplace(PFParticleToSliceLabel, pfParticleProducerLabel);
164  m_labels.emplace(PFParticleToTrackLabel, pfParticleProducerLabel);
165  m_labels.emplace(PFParticleToShowerLabel, pfParticleProducerLabel);
166  m_labels.emplace(PFParticleToT0Label, pfParticleProducerLabel);
167  m_labels.emplace(PFParticleToMetadataLabel, pfParticleProducerLabel);
168  m_labels.emplace(PFParticleToPCAxisLabel, pfParticleProducerLabel);
169  m_labels.emplace(SpacePointToHitLabel, pfParticleProducerLabel);
170  m_labels.emplace(ClusterToHitLabel, pfParticleProducerLabel);
171  m_labels.emplace(SliceToHitLabel, pfParticleProducerLabel);
172  m_labels.emplace(TrackToHitLabel, pfParticleProducerLabel);
173  m_labels.emplace(ShowerToHitLabel, pfParticleProducerLabel);
174  m_labels.emplace(ShowerToPCAxisLabel, pfParticleProducerLabel);
175 }
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 179 of file LArPandoraEvent.cxx.

181 {
182  m_labels.emplace(PFParticleLabel, pfParticleProducerLabel);
183  m_labels.emplace(SpacePointLabel, pfParticleProducerLabel);
184  m_labels.emplace(ClusterLabel, pfParticleProducerLabel);
185  m_labels.emplace(VertexLabel, pfParticleProducerLabel);
186  m_labels.emplace(SliceLabel, pfParticleProducerLabel);
187  m_labels.emplace(TrackLabel, trackProducerLabel);
188  m_labels.emplace(ShowerLabel, showerProducerLabel);
189  m_labels.emplace(T0Label, pfParticleProducerLabel);
190  m_labels.emplace(PFParticleMetadataLabel, pfParticleProducerLabel);
191  m_labels.emplace(PCAxisLabel, showerProducerLabel);
192  m_labels.emplace(HitLabel, hitProducerLabel);
193 
194  m_labels.emplace(PFParticleToSpacePointLabel, pfParticleProducerLabel);
195  m_labels.emplace(PFParticleToClusterLabel, pfParticleProducerLabel);
196  m_labels.emplace(PFParticleToVertexLabel, pfParticleProducerLabel);
197  m_labels.emplace(PFParticleToSliceLabel, pfParticleProducerLabel);
198  m_labels.emplace(PFParticleToTrackLabel, trackProducerLabel);
199  m_labels.emplace(PFParticleToShowerLabel, showerProducerLabel);
200  m_labels.emplace(PFParticleToT0Label, pfParticleProducerLabel);
201  m_labels.emplace(PFParticleToMetadataLabel, pfParticleProducerLabel);
202  m_labels.emplace(PFParticleToPCAxisLabel, showerProducerLabel);
203  m_labels.emplace(SpacePointToHitLabel, pfParticleProducerLabel);
204  m_labels.emplace(ClusterToHitLabel, pfParticleProducerLabel);
205  m_labels.emplace(SliceToHitLabel, pfParticleProducerLabel);
206  m_labels.emplace(TrackToHitLabel, trackProducerLabel);
207  m_labels.emplace(ShowerToHitLabel, showerProducerLabel);
208  m_labels.emplace(ShowerToPCAxisLabel, showerProducerLabel);
209 }
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 213 of file LArPandoraEvent.cxx.

214 {
215  if (m_labels.find(type) == m_labels.end())
216  throw cet::exception("LArPandora") << " LArPandoraEvent::GetLabel -- Label map doesn't contain label of requested type" << std::endl;
217 
218  return m_labels.at(type);
219 }
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
QTextStream & endl(QTextStream &s)
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 223 of file LArPandoraEvent.cxx.

224 {
225  m_labels[type] = label;
226 }
static QCString type
Definition: declinfo.cpp:672
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 162 of file LArPandoraEvent.h.


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