ProductInfo.cc
Go to the documentation of this file.
3 
4 #include <ostream>
5 #include <tuple>
6 
7 using namespace std;
8 
9 namespace art {
10 
11  ProductInfo::~ProductInfo() = default;
12 
13  ProductInfo::ProductInfo(ConsumableType const consumableType,
14  TypeID const& tid)
15  : consumableType{consumableType}
16  , typeID{tid}
17  , friendlyClassName{typeID.friendlyClassName()}
18  {}
19 
20  ProductInfo::ProductInfo(ConsumableType const consumableType,
22  : consumableType{consumableType}, friendlyClassName{friendlyName}
23  {}
24 
25  ProductInfo::ProductInfo(ConsumableType const consumableType,
26  TypeID const& tid,
27  string const& label,
28  string const& instance,
29  ProcessTag const& process)
30  : consumableType{consumableType}
31  , typeID{tid}
32  , friendlyClassName{typeID.friendlyClassName()}
33  , label{label}
35  , process{process}
36  {}
37 
38  ProductInfo::ProductInfo(ConsumableType const consumableType,
39  string const& friendlyClassName,
40  string const& label,
41  string const& instance,
42  ProcessTag const& process)
43  : consumableType{consumableType}
44  , friendlyClassName{friendlyClassName}
45  , label{label}
47  , process{process}
48  {}
49 
50  bool
52  {
53  auto const& boundA = tie(a.consumableType,
54  a.friendlyClassName,
55  a.label,
56  a.instance,
57  a.process.name());
58  auto const& boundB = tie(b.consumableType,
59  b.friendlyClassName,
60  b.label,
61  b.instance,
62  b.process.name());
63  return boundA < boundB;
64  }
65 
66  ostream&
67  operator<<(ostream& os, ProductInfo::ConsumableType const ct)
68  {
69  switch (ct) {
71  os << "Product";
72  break;
74  os << "ViewElement";
75  break;
77  os << "Many";
78  break;
79  }
80  return os;
81  }
82 
83  ostream&
84  operator<<(ostream& os, ProductInfo const& info)
85  {
86  os << "Consumable type: " << info.consumableType << '\n'
87  << "Friendly class name: " << info.friendlyClassName << '\n'
88  << "Module label: " << info.label << '\n'
89  << "Instance name: " << info.instance << '\n'
90  << "Process name: " << info.process.name() << '\n';
91  return os;
92  }
93 
94 } // namespace art
std::string string
Definition: nybbler.cc:12
const std::string instance
STL namespace.
def process(f, kind)
Definition: search.py:254
std::ostream & operator<<(std::ostream &os, const GroupSelector &gs)
bool operator<(ProductInfo const &a, ProductInfo const &b)
Definition: ProductInfo.cc:51
const double a
std::string friendlyName(std::string const &iFullName)
static bool * b
Definition: config.cpp:1043