LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
art::InputTag Class Reference

#include "InputTag.h"

Public Member Functions

 ~InputTag ()
 
 InputTag ()
 
 InputTag (std::string const &label, std::string const &instance, std::string const &processName={})
 
 InputTag (char const *label, char const *instance, char const *processName="")
 
 InputTag (std::string const &)
 
 InputTag (char const *)
 
 InputTag (InputTag const &)
 
 InputTag (InputTag &&)
 
InputTagoperator= (InputTag const &)
 
InputTagoperator= (InputTag &&)
 
bool operator== (InputTag const &) const noexcept
 
bool empty () const noexcept
 
std::string const & label () const noexcept
 
std::string const & instance () const noexcept
 
std::string const & process () const noexcept
 
std::string encode () const
 

Private Attributes

std::string label_ {}
 
std::string instance_ {}
 
std::string process_ {}
 

Detailed Description

Definition at line 12 of file InputTag.h.

Constructor & Destructor Documentation

art::InputTag::~InputTag ( )
default
art::InputTag::InputTag ( )
default

Referenced by InputTag().

art::InputTag::InputTag ( std::string const &  label,
std::string const &  instance,
std::string const &  processName = {} 
)

Definition at line 21 of file InputTag.cc.

References instance(), instance_, and process_.

24  : label_{label}, instance_{instance}, process_{processName}
25  {}
std::string const & instance() const noexcept
Definition: InputTag.cc:85
std::string label_
Definition: InputTag.h:46
std::string process_
Definition: InputTag.h:48
std::string const & label() const noexcept
Definition: InputTag.cc:79
std::string instance_
Definition: InputTag.h:47
art::InputTag::InputTag ( char const *  label,
char const *  instance,
char const *  processName = "" 
)

Definition at line 27 of file InputTag.cc.

References instance(), instance_, and process_.

30  : label_{label}, instance_{instance}, process_{processName}
31  {}
std::string const & instance() const noexcept
Definition: InputTag.cc:85
std::string label_
Definition: InputTag.h:46
std::string process_
Definition: InputTag.h:48
std::string const & label() const noexcept
Definition: InputTag.cc:79
std::string instance_
Definition: InputTag.h:47
art::InputTag::InputTag ( std::string const &  s)

Definition at line 33 of file InputTag.cc.

References art::errors::Configuration, instance_, label_, and process_.

34  {
35  vector<string> tokens;
36  boost::split(tokens, s, boost::is_any_of(":"), boost::token_compress_off);
37  auto const nwords = tokens.size();
38  if (nwords > 3u) {
40  "An error occurred while creating an input tag.\n")
41  << "The string '" << s
42  << "' has more than three colon-delimited tokens.\n"
43  "The supported syntax is '<module_label>:<optional instance "
44  "name>:<optional process name>'.";
45  }
46  if (nwords > 0) {
47  label_ = tokens[0];
48  }
49  if (nwords > 1) {
50  instance_ = tokens[1];
51  }
52  if (nwords > 2) {
53  process_ = tokens[2];
54  }
55  }
std::string label_
Definition: InputTag.h:46
std::string process_
Definition: InputTag.h:48
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
std::string instance_
Definition: InputTag.h:47
art::InputTag::InputTag ( char const *  s)

Definition at line 57 of file InputTag.cc.

References InputTag(), and operator=().

57 : InputTag{string{s}} {}
art::InputTag::InputTag ( InputTag const &  )
default
art::InputTag::InputTag ( InputTag &&  )
default

Member Function Documentation

bool art::InputTag::empty ( ) const
noexcept

Definition at line 73 of file InputTag.cc.

References instance_, label_, and process_.

Referenced by DUNE::NeutrinoShowerEff::checkCNNtrkshw(), and nnet::WaveformRoiFinder::WaveformRoiFinder().

74  {
75  return label_.empty() && instance_.empty() && process_.empty();
76  }
std::string label_
Definition: InputTag.h:46
std::string process_
Definition: InputTag.h:48
std::string instance_
Definition: InputTag.h:47
string art::InputTag::encode ( ) const

Definition at line 97 of file InputTag.cc.

References instance_, label_, and process_.

Referenced by recob::DumpVertices::analyze(), sim::DumpSimChannels::analyze(), sim::DumpOpDetBacktrackerRecords::analyze(), pid::DumpParticleIDs::analyze(), sim::DumpSimPhotonsLite::analyze(), recob::DumpChargedSpacePoints::analyze(), ophit::DumpOpHits::analyze(), recob::DumpPCAxes::analyze(), recob::DumpSeeds::analyze(), recob::DumpSpacePoints::analyze(), hit::DumpHits::analyze(), recob::DumpClusters::analyze(), sim::DumpMCParticles::analyze(), sim::DumpMCTracks::analyze(), sim::DumpSimEnergyDeposits::analyze(), ophit::DumpOpFlashes::analyze(), sim::DumpMCShowers::analyze(), caldata::DumpWires::analyze(), detsim::DumpRawDigits::analyze(), sim::DumpSimPhotons::analyze(), recob::DumpPFParticles::analyze(), recob::DumpTracks::analyze(), evdb_tool::DrawLArVoxel3D::Draw(), sim::DumpMCParticles::DumpMCParticle(), sim::POTaccumulator::endSubRun(), evdb_tool::DrawWireHist::Fill(), detinfo::g4ref_time_for_event(), anab::FVectorWriter< 4 >::initOutputs(), evd::SimulationDrawer::MCTruthOrtho(), DUNE::NeutrinoShowerEff::processEff(), shower::EMShower::produce(), anab::FVectorWriter< 4 >::setDataTag(), and detinfo::trigger_times_for_event().

98  {
99  static string const separator{":"};
100  string result = label_;
101  if (!instance_.empty() || !process_.empty()) {
102  result += separator + instance_;
103  }
104  if (!process_.empty()) {
105  result += separator + process_;
106  }
107  return result;
108  }
std::string label_
Definition: InputTag.h:46
std::string process_
Definition: InputTag.h:48
std::string instance_
Definition: InputTag.h:47
InputTag & art::InputTag::operator= ( InputTag const &  )
default

Referenced by InputTag().

InputTag & art::InputTag::operator= ( InputTag &&  )
default
bool art::InputTag::operator== ( InputTag const &  tag) const
noexcept

Definition at line 66 of file InputTag.cc.

References instance_, label_, and process_.

67  {
68  return (label_ == tag.label_) && (instance_ == tag.instance_) &&
69  (process_ == tag.process_);
70  }
std::string label_
Definition: InputTag.h:46
std::string process_
Definition: InputTag.h:48
std::string instance_
Definition: InputTag.h:47

Member Data Documentation

std::string art::InputTag::instance_ {}
private

Definition at line 47 of file InputTag.h.

Referenced by empty(), encode(), InputTag(), instance(), and operator==().

std::string art::InputTag::label_ {}
private

Definition at line 46 of file InputTag.h.

Referenced by empty(), encode(), InputTag(), label(), and operator==().

std::string art::InputTag::process_ {}
private

Definition at line 48 of file InputTag.h.

Referenced by empty(), encode(), InputTag(), operator==(), and process().


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