LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
anab::MVAReader< T, N > Class Template Reference

#include "MVAReader.h"

Inheritance diagram for anab::MVAReader< T, N >:
anab::FVectorReader< T, N > anab::MVAWrapperBase anab::FVectorWrapperBase

Public Member Functions

 MVAReader (const art::Event &evt, const art::InputTag &tag)
 
std::vector< FeatureVector< N > > const & outputs () const
 Access the vector of the feature vectors. More...
 
std::array< float, N > getOutput (size_t key) const
 Get copy of the MVA output vector at index "key". More...
 
std::array< float, N > getOutput (art::Ptr< T > const &item) const
 Get copy of the MVA output vector idicated with art::Ptr::key(). More...
 
std::array< float, N > getOutput (std::vector< art::Ptr< T >> const &items) const
 Get MVA results accumulated over the vector of items (eg. over hits associated to a cluster). More...
 
std::array< float, N > getOutput (std::vector< art::Ptr< T >> const &items, std::vector< float > const &weights) const
 
std::array< float, N > getOutput (std::vector< art::Ptr< T >> const &items, std::function< float(T const &)> fweight) const
 
const std::string & outputName (size_t index) const
 Meaning/name of the index'th column in the collection of MVA output vectors. More...
 
T const & item (size_t key) const
 Access data product at index "key". More...
 
std::vector< T > const & items () const
 
std::vector< FeatureVector< N > > const & vectors () const
 Access the vector of the feature vectors. More...
 
std::array< float, N > getVector (size_t key) const
 Get copy of the feature vector at index "key". More...
 
std::array< float, N > getVector (art::Ptr< T > const &item) const
 Get copy of the feature vector idicated with art::Ptr::key(). More...
 
size_t size () const
 Get the number of contained items (no. of data product objects equal to no. of feature vectors). More...
 
size_t length () const
 Get the length of a single feature vector. More...
 
const std::string & dataTag () const
 Get the input tag (string representation) of data product used to calculate feature vectors. More...
 
const art::Handle< std::vector< T > > & dataHandle () const
 Access the data product handle. More...
 
const std::string & columnName (size_t index) const
 Meaning/name of the index'th column in the collection of feature vectors. More...
 
int getIndex (const std::string &name) const
 Index of column with given name, or -1 if name not found. More...
 

Static Public Member Functions

static std::unique_ptr< MVAReadercreate (const art::Event &evt, const art::InputTag &tag)
 

Protected Member Functions

std::string getProductName (std::type_info const &ti) const
 
size_t getProductHash (std::type_info const &ti) const
 
template<class T , size_t N>
std::array< float, N > pAccumulate (std::vector< art::Ptr< T >> const &items, std::vector< FeatureVector< N >> const &outs) const
 
template<class T , size_t N>
std::array< float, N > pAccumulate (std::vector< art::Ptr< T >> const &items, std::vector< float > const &weights, std::vector< FeatureVector< N >> const &outs) const
 
template<class T , size_t N>
std::array< float, N > pAccumulate (std::vector< art::Ptr< T >> const &items, std::function< float(T const &)> fweight, std::vector< FeatureVector< N >> const &outs) const
 
template<class T , size_t N>
std::array< float, N > pAccumulate (std::vector< art::Ptr< T >> const &items, std::function< float(art::Ptr< T > const &)> fweight, std::vector< FeatureVector< N >> const &outs) const
 
template<class T , size_t N>
std::array< float, N > pAccumulate (std::vector< art::Ptr< T >> const &items, std::vector< FeatureVector< N >> const &outs, std::array< char, N > const &mask) const
 

Private Member Functions

 MVAReader (const art::Event &evt, const art::InputTag &tag, bool &success)
 Not-throwing constructor. More...
 

Detailed Description

template<class T, size_t N>
class anab::MVAReader< T, N >

Helper for reading the reconstructed objects of type T together with associated N-outputs MVA results with their metadata (this class is not a data product).

Definition at line 103 of file MVAReader.h.

Constructor & Destructor Documentation

template<class T, size_t N>
anab::MVAReader< T, N >::MVAReader ( const art::Event evt,
const art::InputTag tag 
)
inline

Create the wrapper for MVA data stored in the event evt with the provided input tag (the same tag which was used to save MVA results with MVAWriter class). Throws exception if data products not found in the event.

Definition at line 121 of file MVAReader.h.

121 : FVectorReader<T, N>(evt, tag) {}
TCEvent evt
Definition: DataStructs.cxx:8
template<class T, size_t N>
anab::MVAReader< T, N >::MVAReader ( const art::Event evt,
const art::InputTag tag,
bool &  success 
)
inlineprivate

Not-throwing constructor.

Definition at line 167 of file MVAReader.h.

168  : FVectorReader<T, N>(evt, tag, success)
169  {}
TCEvent evt
Definition: DataStructs.cxx:8

Member Function Documentation

template<class T , size_t N>
const std::string& anab::FVectorReader< T, N >::columnName ( size_t  index) const
inlineinherited

Meaning/name of the index'th column in the collection of feature vectors.

Definition at line 79 of file MVAReader.h.

References anab::FVectorReader< T, N >::fDescription.

Referenced by anab::MVAReader< T, N >::outputName().

79 { return fDescription->outputName(index); }
FVecDescription< N > const * fDescription
Definition: MVAReader.h:95
template<class T, size_t N>
static std::unique_ptr<MVAReader> anab::MVAReader< T, N >::create ( const art::Event evt,
const art::InputTag tag 
)
inlinestatic

Create the wrapper for MVA data stored in the event evt with the provided input tag (the same tag which was used to save MVA results with MVAWriter class). Returns nullptr if data products not found in the event.

Definition at line 108 of file MVAReader.h.

Referenced by nnet::PointIdEffTest::analyze(), DUNE::NeutrinoShowerEff::checkCNNtrkshw(), trkf::PMAlgTrackMaker::getPdgFromCnnOnHits(), trkf::PMAlgTrackMaker::init(), and shower::EMShower::produce().

109  {
110  bool success;
111  std::unique_ptr<MVAReader> ptr(new MVAReader(evt, tag, success));
112  if (success) { return ptr; }
113  else {
114  return nullptr;
115  }
116  }
MVAReader(const art::Event &evt, const art::InputTag &tag)
Definition: MVAReader.h:121
template<class T , size_t N>
const art::Handle<std::vector<T> >& anab::FVectorReader< T, N >::dataHandle ( ) const
inlineinherited

Access the data product handle.

Definition at line 76 of file MVAReader.h.

References anab::FVectorReader< T, N >::fDataHandle.

76 { return fDataHandle; }
art::Handle< std::vector< T > > fDataHandle
Definition: MVAReader.h:97
template<class T , size_t N>
const std::string& anab::FVectorReader< T, N >::dataTag ( ) const
inlineinherited

Get the input tag (string representation) of data product used to calculate feature vectors.

Definition at line 73 of file MVAReader.h.

References anab::FVectorReader< T, N >::fDescription.

73 { return fDescription->dataTag(); }
FVecDescription< N > const * fDescription
Definition: MVAReader.h:95
template<class T , size_t N>
int anab::FVectorReader< T, N >::getIndex ( const std::string &  name) const
inlineinherited

Index of column with given name, or -1 if name not found.

Definition at line 82 of file MVAReader.h.

References anab::FVectorReader< T, N >::fDescription.

Referenced by pdsp::CheckCNNScore::analyze(), and nnet::PointIdEffTest::analyze().

82 { return fDescription->getIndex(name); }
FVecDescription< N > const * fDescription
Definition: MVAReader.h:95
template<class T, size_t N>
std::array<float, N> anab::MVAReader< T, N >::getOutput ( size_t  key) const
inline

Get copy of the MVA output vector at index "key".

Definition at line 127 of file MVAReader.h.

References anab::FVectorReader< T, N >::getVector().

Referenced by pdsp::CheckCNNScore::analyze().

127 { return FVectorReader<T, N>::getVector(key); }
std::array< float, N > getVector(size_t key) const
Get copy of the feature vector at index "key".
Definition: MVAReader.h:55
template<class T, size_t N>
std::array<float, N> anab::MVAReader< T, N >::getOutput ( art::Ptr< T > const &  item) const
inline

Get copy of the MVA output vector idicated with art::Ptr::key().

Definition at line 130 of file MVAReader.h.

References anab::FVectorReader< T, N >::getVector(), and art::Ptr< T >::key().

131  {
132  return FVectorReader<T, N>::getVector(item.key());
133  }
std::array< float, N > getVector(size_t key) const
Get copy of the feature vector at index "key".
Definition: MVAReader.h:55
key_type key() const noexcept
Definition: Ptr.h:166
template<class T, size_t N>
std::array<float, N> anab::MVAReader< T, N >::getOutput ( std::vector< art::Ptr< T >> const &  items) const
inline

Get MVA results accumulated over the vector of items (eg. over hits associated to a cluster).

Definition at line 136 of file MVAReader.h.

References anab::FVectorReader< T, N >::items().

137  {
138  return pAccumulate(items, FVectorReader<T, N>::vectors());
139  }
std::array< float, N > pAccumulate(std::vector< art::Ptr< T >> const &items, std::vector< FeatureVector< N >> const &outs) const
std::vector< FeatureVector< N > > const & vectors() const
Access the vector of the feature vectors.
Definition: MVAReader.h:48
template<class T, size_t N>
std::array<float, N> anab::MVAReader< T, N >::getOutput ( std::vector< art::Ptr< T >> const &  items,
std::vector< float > const &  weights 
) const
inline

Get MVA results accumulated with provided weights over the vector of items (eg. over clusters associated to a track, weighted by the cluster size; or over hits associated to a cluster, weighted by the hit area).

Definition at line 144 of file MVAReader.h.

References anab::FVectorReader< T, N >::items().

146  {
147  return pAccumulate(items, weights, FVectorReader<T, N>::vectors());
148  }
std::array< float, N > pAccumulate(std::vector< art::Ptr< T >> const &items, std::vector< FeatureVector< N >> const &outs) const
std::vector< FeatureVector< N > > const & vectors() const
Access the vector of the feature vectors.
Definition: MVAReader.h:48
template<class T, size_t N>
std::array<float, N> anab::MVAReader< T, N >::getOutput ( std::vector< art::Ptr< T >> const &  items,
std::function< float(T const &)>  fweight 
) const
inline

Get MVA results accumulated with provided weighting function over the vector of items (eg. over clusters associated to a track, weighted by the cluster size; or over hits associated to a cluster, weighted by the hit area).

Definition at line 153 of file MVAReader.h.

References anab::FVectorReader< T, N >::items().

155  {
156  return pAccumulate(items, fweight, FVectorReader<T, N>::vectors());
157  }
std::array< float, N > pAccumulate(std::vector< art::Ptr< T >> const &items, std::vector< FeatureVector< N >> const &outs) const
std::vector< FeatureVector< N > > const & vectors() const
Access the vector of the feature vectors.
Definition: MVAReader.h:48
size_t anab::FVectorWrapperBase::getProductHash ( std::type_info const &  ti) const
inlineprotectedinherited

Definition at line 29 of file MVAWrapperBase.h.

Referenced by anab::FVectorWriter< N >::getProductID(), and anab::FVectorWriter< N >::initOutputs().

29 { return ti.hash_code(); }
std::string anab::FVectorWrapperBase::getProductName ( std::type_info const &  ti) const
protectedinherited

Definition at line 17 of file MVAWrapperBase.cxx.

Referenced by anab::FVectorReader< T, N >::FVectorReader(), anab::FVectorWriter< N >::getProductID(), anab::FVectorWriter< N >::initOutputs(), and anab::FVectorWriter< N >::produces_using().

18  {
19  char* realname;
20  int status;
21 
22  realname = abi::__cxa_demangle(ti.name(), 0, 0, &status);
23  std::string pname(realname);
24  free(realname);
25 
26  pname.erase(std::remove(pname.begin(), pname.end(), ' '), pname.end());
27  pname.erase(std::remove(pname.begin(), pname.end(), ':'), pname.end());
28 
29  return pname;
30  }
template<class T , size_t N>
std::array<float, N> anab::FVectorReader< T, N >::getVector ( size_t  key) const
inlineinherited

Get copy of the feature vector at index "key".

Access feature vector data at index "key". *** WOULD LIKE TO CHANGE TYPE OF FVEC DATA MEMBER TO std::array AND THEN ENABLE THIS FUNCTION ***

Definition at line 55 of file MVAReader.h.

References anab::FVectorReader< T, N >::fVectors.

Referenced by anab::MVAReader< T, N >::getOutput().

56  {
57  std::array<float, N> vout;
58  for (size_t i = 0; i < N; ++i)
59  vout[i] = (*fVectors)[key][i];
60  return vout;
61  }
std::vector< FeatureVector< N > > const * fVectors
Definition: MVAReader.h:96
template<class T , size_t N>
std::array<float, N> anab::FVectorReader< T, N >::getVector ( art::Ptr< T > const &  item) const
inlineinherited

Get copy of the feature vector idicated with art::Ptr::key().

Definition at line 64 of file MVAReader.h.

References anab::FVectorReader< T, N >::getVector(), and art::Ptr< T >::key().

Referenced by anab::FVectorReader< T, N >::getVector().

64 { return getVector(item.key()); }
std::array< float, N > getVector(size_t key) const
Get copy of the feature vector at index "key".
Definition: MVAReader.h:55
key_type key() const noexcept
Definition: Ptr.h:166
template<class T , size_t N>
T const& anab::FVectorReader< T, N >::item ( size_t  key) const
inlineinherited

Access data product at index "key".

Definition at line 44 of file MVAReader.h.

References anab::FVectorReader< T, N >::fDataHandle.

44 { return (*fDataHandle)[key]; }
art::Handle< std::vector< T > > fDataHandle
Definition: MVAReader.h:97
template<class T , size_t N>
std::vector<T> const& anab::FVectorReader< T, N >::items ( ) const
inlineinherited

Definition at line 45 of file MVAReader.h.

References anab::FVectorReader< T, N >::fDataHandle.

Referenced by anab::MVAReader< T, N >::getOutput().

45 { return *fDataHandle; }
art::Handle< std::vector< T > > fDataHandle
Definition: MVAReader.h:97
template<class T , size_t N>
size_t anab::FVectorReader< T, N >::length ( ) const
inlineinherited

Get the length of a single feature vector.

Definition at line 70 of file MVAReader.h.

70 { return N; }
template<class T, size_t N>
const std::string& anab::MVAReader< T, N >::outputName ( size_t  index) const
inline

Meaning/name of the index'th column in the collection of MVA output vectors.

Definition at line 160 of file MVAReader.h.

References anab::FVectorReader< T, N >::columnName().

161  {
162  return FVectorReader<T, N>::columnName(index);
163  }
const std::string & columnName(size_t index) const
Meaning/name of the index&#39;th column in the collection of feature vectors.
Definition: MVAReader.h:79
template<class T, size_t N>
std::vector<FeatureVector<N> > const& anab::MVAReader< T, N >::outputs ( ) const
inline

Access the vector of the feature vectors.

Definition at line 124 of file MVAReader.h.

References anab::FVectorReader< T, N >::vectors().

Referenced by nnet::PointIdEffTest::analyze().

124 { return FVectorReader<T, N>::vectors(); }
std::vector< FeatureVector< N > > const & vectors() const
Access the vector of the feature vectors.
Definition: MVAReader.h:48
template<class T , size_t N>
std::array< float, N > anab::MVAWrapperBase::pAccumulate ( std::vector< art::Ptr< T >> const &  items,
std::vector< FeatureVector< N >> const &  outs 
) const
protectedinherited

Definition at line 73 of file MVAWrapperBase.h.

References trkf::fill().

76 {
77  std::array<double, N> acc;
78  acc.fill(0);
79 
80  float pmin = 1.0e-6, pmax = 1.0 - pmin;
81  float log_pmin = std::log(pmin), log_pmax = std::log(pmax);
82 
83  for (auto const& ptr : items) {
84  auto const& vout = outs[ptr.key()];
85  for (size_t i = 0; i < vout.size(); ++i) {
86  float v;
87  if (vout[i] < pmin)
88  v = log_pmin;
89  else if (vout[i] > pmax)
90  v = log_pmax;
91  else
92  v = std::log(vout[i]);
93 
94  acc[i] += v;
95  }
96  }
97 
98  if (!items.empty()) {
99  double totp = 0.0;
100  for (size_t i = 0; i < N; ++i) {
101  acc[i] = exp(acc[i] / items.size());
102  totp += acc[i];
103  }
104  for (size_t i = 0; i < N; ++i) {
105  acc[i] /= totp;
106  }
107  }
108  else
109  std::fill(acc.begin(), acc.end(), 1.0 / N);
110 
111  std::array<float, N> result;
112  for (size_t i = 0; i < N; ++i)
113  result[i] = acc[i];
114  return result;
115 }
void fill(const art::PtrVector< recob::Hit > &hits, int only_plane)
template<class T , size_t N>
std::array< float, N > anab::MVAWrapperBase::pAccumulate ( std::vector< art::Ptr< T >> const &  items,
std::vector< float > const &  weights,
std::vector< FeatureVector< N >> const &  outs 
) const
protectedinherited

Definition at line 119 of file MVAWrapperBase.h.

References trkf::fill(), and w.

123 {
124  std::array<double, N> acc;
125  acc.fill(0);
126 
127  float pmin = 1.0e-6, pmax = 1.0 - pmin;
128  float log_pmin = std::log(pmin), log_pmax = std::log(pmax);
129  double totw = 0.0;
130 
131  for (size_t k = 0; k < items.size(); ++k) {
132  auto const& ptr = items[k];
133  float w = weights[k];
134 
135  if (w == 0) continue;
136 
137  auto const& vout = outs[ptr.key()];
138  for (size_t i = 0; i < vout.size(); ++i) {
139  float v;
140  if (vout[i] < pmin)
141  v = log_pmin;
142  else if (vout[i] > pmax)
143  v = log_pmax;
144  else
145  v = std::log(vout[i]);
146 
147  acc[i] += w * v;
148  }
149  totw += w;
150  }
151 
152  if (!items.empty()) {
153  double totp = 0.0;
154  for (size_t i = 0; i < N; ++i) {
155  acc[i] = exp(acc[i] / totw);
156  totp += acc[i];
157  }
158  for (size_t i = 0; i < N; ++i) {
159  acc[i] /= totp;
160  }
161  }
162  else
163  std::fill(acc.begin(), acc.end(), 1.0 / N);
164 
165  std::array<float, N> result;
166  for (size_t i = 0; i < N; ++i)
167  result[i] = acc[i];
168  return result;
169 }
void fill(const art::PtrVector< recob::Hit > &hits, int only_plane)
Float_t w
Definition: plot.C:20
template<class T , size_t N>
std::array< float, N > anab::MVAWrapperBase::pAccumulate ( std::vector< art::Ptr< T >> const &  items,
std::function< float(T const &)>  fweight,
std::vector< FeatureVector< N >> const &  outs 
) const
protectedinherited

Definition at line 173 of file MVAWrapperBase.h.

References trkf::fill(), and w.

177 {
178  std::array<double, N> acc;
179  acc.fill(0);
180 
181  float pmin = 1.0e-6, pmax = 1.0 - pmin;
182  float log_pmin = std::log(pmin), log_pmax = std::log(pmax);
183  double totw = 0.0;
184 
185  for (size_t k = 0; k < items.size(); ++k) {
186  auto const& ptr = items[k];
187  float w = fweight(*ptr);
188 
189  if (w == 0) continue;
190 
191  auto const& vout = outs[ptr.key()];
192  for (size_t i = 0; i < vout.size(); ++i) {
193  float v;
194  if (vout[i] < pmin)
195  v = log_pmin;
196  else if (vout[i] > pmax)
197  v = log_pmax;
198  else
199  v = std::log(vout[i]);
200 
201  acc[i] += w * v;
202  }
203  totw += w;
204  }
205 
206  if (!items.empty()) {
207  double totp = 0.0;
208  for (size_t i = 0; i < N; ++i) {
209  acc[i] = exp(acc[i] / totw);
210  totp += acc[i];
211  }
212  for (size_t i = 0; i < N; ++i) {
213  acc[i] /= totp;
214  }
215  }
216  else
217  std::fill(acc.begin(), acc.end(), 1.0 / N);
218 
219  std::array<float, N> result;
220  for (size_t i = 0; i < N; ++i)
221  result[i] = acc[i];
222  return result;
223 }
void fill(const art::PtrVector< recob::Hit > &hits, int only_plane)
Float_t w
Definition: plot.C:20
template<class T , size_t N>
std::array< float, N > anab::MVAWrapperBase::pAccumulate ( std::vector< art::Ptr< T >> const &  items,
std::function< float(art::Ptr< T > const &)>  fweight,
std::vector< FeatureVector< N >> const &  outs 
) const
protectedinherited

Definition at line 227 of file MVAWrapperBase.h.

References trkf::fill(), and w.

231 {
232  std::array<double, N> acc;
233  acc.fill(0);
234 
235  float pmin = 1.0e-6, pmax = 1.0 - pmin;
236  float log_pmin = std::log(pmin), log_pmax = std::log(pmax);
237  double totw = 0.0;
238 
239  for (size_t k = 0; k < items.size(); ++k) {
240  auto const& ptr = items[k];
241  float w = fweight(ptr);
242 
243  if (w == 0) continue;
244 
245  auto const& vout = outs[ptr.key()];
246  for (size_t i = 0; i < vout.size(); ++i) {
247  float v;
248  if (vout[i] < pmin)
249  v = log_pmin;
250  else if (vout[i] > pmax)
251  v = log_pmax;
252  else
253  v = std::log(vout[i]);
254 
255  acc[i] += w * v;
256  }
257  totw += w;
258  }
259 
260  if (!items.empty()) {
261  double totp = 0.0;
262  for (size_t i = 0; i < N; ++i) {
263  acc[i] = exp(acc[i] / totw);
264  totp += acc[i];
265  }
266  for (size_t i = 0; i < N; ++i) {
267  acc[i] /= totp;
268  }
269  }
270  else
271  std::fill(acc.begin(), acc.end(), 1.0 / N);
272 
273  std::array<float, N> result;
274  for (size_t i = 0; i < N; ++i)
275  result[i] = acc[i];
276  return result;
277 }
void fill(const art::PtrVector< recob::Hit > &hits, int only_plane)
Float_t w
Definition: plot.C:20
template<class T , size_t N>
std::array< float, N > anab::MVAWrapperBase::pAccumulate ( std::vector< art::Ptr< T >> const &  items,
std::vector< FeatureVector< N >> const &  outs,
std::array< char, N > const &  mask 
) const
protectedinherited

Definition at line 285 of file MVAWrapperBase.h.

289 {
290  size_t n_groups = 0;
291  std::unordered_map<char, size_t> label2group;
292  std::vector<size_t> nb_entries;
293  std::array<int, N> groupidx;
294  for (size_t i = 0; i < N; ++i) {
295  int idx = -1;
296  if (mask[i] >= 0) {
297  auto search = label2group.find(mask[i]);
298  if (search == label2group.end()) {
299  idx = n_groups;
300  label2group[mask[i]] = idx;
301  nb_entries.push_back(0);
302  ++n_groups;
303  }
304  else {
305  idx = search->second;
306  nb_entries[idx]++;
307  }
308  }
309  groupidx[i] = idx;
310  }
311 
312  std::array<double, N> acc;
313  acc.fill(0);
314 
315  float pmin = 1.0e-6, pmax = 1.0 - pmin;
316  float log_pmin = std::log(pmin), log_pmax = std::log(pmax);
317 
318  for (auto const& ptr : items) {
319  auto const& vout = outs[ptr.key()];
320  for (size_t i = 0; i < vout.size(); ++i) {
321  if (groupidx[i] < 0) continue;
322 
323  float v;
324  if (vout[i] < pmin)
325  v = log_pmin;
326  else if (vout[i] > pmax)
327  v = log_pmax;
328  else
329  v = std::log(vout[i]);
330 
331  acc[i] += v;
332  }
333  }
334 
335  if (!items.empty()) {
336  std::vector<double> totp(n_groups, 0.0);
337  for (size_t i = 0; i < N; ++i) {
338  if (groupidx[i] >= 0) {
339  acc[i] = exp(acc[i] / items.size());
340  totp[groupidx[i]] += acc[i];
341  }
342  }
343  for (size_t i = 0; i < N; ++i) {
344  if (groupidx[i] >= 0) { acc[i] /= totp[groupidx[i]]; }
345  }
346  }
347  else {
348  for (size_t i = 0; i < N; ++i) {
349  if (groupidx[i] >= 0) { acc[i] = 1 / nb_entries[groupidx[i]]; }
350  }
351  }
352 
353  std::array<float, N> result;
354  for (size_t i = 0; i < N; ++i)
355  result[i] = acc[i];
356  return result;
357 }
template<class T , size_t N>
size_t anab::FVectorReader< T, N >::size ( ) const
inlineinherited

Get the number of contained items (no. of data product objects equal to no. of feature vectors).

Definition at line 67 of file MVAReader.h.

References anab::FVectorReader< T, N >::fVectors.

67 { return fVectors->size(); }
std::vector< FeatureVector< N > > const * fVectors
Definition: MVAReader.h:96
template<class T , size_t N>
std::vector<FeatureVector<N> > const& anab::FVectorReader< T, N >::vectors ( ) const
inlineinherited

Access the vector of the feature vectors.

Definition at line 48 of file MVAReader.h.

References anab::FVectorReader< T, N >::fVectors.

Referenced by anab::MVAReader< T, N >::outputs().

48 { return *fVectors; }
std::vector< FeatureVector< N > > const * fVectors
Definition: MVAReader.h:96

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