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

#include "MVAWriter.h"

Inheritance diagram for anab::FVectorWriter< N >:
anab::FVectorWrapperBase anab::MVAWriter< N > anab::MVAWriter< 2 > anab::MVAWriter< 3 > anab::MVAWriter< 4 >

Public Member Functions

 FVectorWriter (art::ProducesCollector &collector, const char *name="")
 
template<class T >
void produces_using ()
 
template<class T >
FVector_ID initOutputs (std::string const &dataTag, size_t dataSize, std::vector< std::string > const &names=std::vector< std::string >(N,""))
 
template<class T >
FVector_ID initOutputs (art::InputTag const &dataTag, size_t dataSize, std::vector< std::string > const &names=std::vector< std::string >(N,""))
 
void setVector (FVector_ID id, size_t key, std::array< float, N > const &values)
 
void setVector (FVector_ID id, size_t key, std::array< double, N > const &values)
 
void setVector (FVector_ID id, size_t key, std::vector< float > const &values)
 
void setVector (FVector_ID id, size_t key, std::vector< double > const &values)
 
template<class T >
FVector_ID initOutputs (art::InputTag const &dataTag, std::vector< std::string > const &names=std::vector< std::string >(N,""))
 
template<class T >
FVector_ID initOutputs (std::vector< std::string > const &names=std::vector< std::string >(N,""))
 
void addVector (FVector_ID id, std::array< float, N > const &values)
 
void addVector (FVector_ID id, std::array< double, N > const &values)
 
void addVector (FVector_ID id, std::vector< float > const &values)
 
void addVector (FVector_ID id, std::vector< double > const &values)
 
void setDataTag (FVector_ID id, art::InputTag const &dataTag)
 Set tag of associated data products in case it was not ready at the initialization time. More...
 
void saveOutputs (art::Event &evt)
 Check consistency and save all the results in the event. More...
 
size_t size (FVector_ID id) const
 Get the number of contained feature vectors. More...
 
size_t length () const
 Get the length of a single feature vector. More...
 
template<class T >
std::array< float, N > getVector (size_t key) const
 Get copy of the feature vector for the type T, at index "key". More...
 
template<class T >
std::array< float, N > getVector (art::Ptr< T > const &item) const
 Get copy of the feature vector for the type T, idicated with art::Ptr::key(). More...
 
template<class T >
anab::FVector_ID getProductID () const
 
template<class T >
anab::FVector_ID initOutputs (std::string const &dataTag, size_t dataSize, std::vector< std::string > const &names)
 

Protected Member Functions

template<class T >
FVector_ID getProductID () const
 
std::string getProductName (std::type_info const &ti) const
 
size_t getProductHash (std::type_info const &ti) const
 

Protected Attributes

std::vector< std::unique_ptr< std::vector< anab::FeatureVector< N > > > > fVectors
 

Private Member Functions

void clearEventData ()
 
bool dataTypeRegistered (const std::string &dname) const
 Check if the the writer is configured to write results for data product type name. More...
 
bool descriptionExists (const std::string &tname) const
 Check if the containers for results prepared for "tname" data type are ready. More...
 

Private Attributes

art::ProducesCollectorfCollector
 
std::string fInstanceName
 
std::vector< std::string > fRegisteredDataTypes
 
bool fIsDescriptionRegistered
 
std::unordered_map< size_t, FVector_IDfTypeHashToID
 
std::unique_ptr< std::vector< anab::FVecDescription< N > > > fDescriptions
 

Friends

std::ostream & operator<< (std::ostream &o, FVectorWriter const &a)
 

Detailed Description

template<size_t N>
class anab::FVectorWriter< N >

Definition at line 25 of file MVAWriter.h.

Constructor & Destructor Documentation

template<size_t N>
anab::FVectorWriter< N >::FVectorWriter ( art::ProducesCollector collector,
const char *  name = "" 
)
inline

Name provided to the constructor is used as an instance name for FVecDescription<N> and FeatureVector<N> (for which it is combined with the processed data product names). The name is used as an instance name for the FVecDescription data product which lets you to save multiple vector collections from a single art module.

Definition at line 31 of file MVAWriter.h.

32  : fCollector(collector)
33  , fInstanceName(name)
35  , fDescriptions(nullptr)
36  {}
art::ProducesCollector & fCollector
Definition: MVAWriter.h:174
bool fIsDescriptionRegistered
Definition: MVAWriter.h:178
std::string fInstanceName
Definition: MVAWriter.h:175
std::unique_ptr< std::vector< anab::FVecDescription< N > > > fDescriptions
Definition: MVAWriter.h:182

Member Function Documentation

template<size_t N>
void anab::FVectorWriter< N >::addVector ( FVector_ID  id,
std::array< float, N > const &  values 
)
inline

Definition at line 96 of file MVAWriter.h.

Referenced by anab::MVAWriter< 4 >::addOutput(), and hit::DPRawHitFinder::produce().

97  {
98  fVectors[id]->emplace_back(values);
99  }
std::vector< std::unique_ptr< std::vector< anab::FeatureVector< N > > > > fVectors
Definition: MVAWriter.h:170
template<size_t N>
void anab::FVectorWriter< N >::addVector ( FVector_ID  id,
std::array< double, N > const &  values 
)
inline

Definition at line 100 of file MVAWriter.h.

101  {
102  fVectors[id]->emplace_back(values);
103  }
std::vector< std::unique_ptr< std::vector< anab::FeatureVector< N > > > > fVectors
Definition: MVAWriter.h:170
template<size_t N>
void anab::FVectorWriter< N >::addVector ( FVector_ID  id,
std::vector< float > const &  values 
)
inline

Definition at line 104 of file MVAWriter.h.

105  {
106  fVectors[id]->emplace_back(values);
107  }
std::vector< std::unique_ptr< std::vector< anab::FeatureVector< N > > > > fVectors
Definition: MVAWriter.h:170
template<size_t N>
void anab::FVectorWriter< N >::addVector ( FVector_ID  id,
std::vector< double > const &  values 
)
inline

Definition at line 108 of file MVAWriter.h.

109  {
110  fVectors[id]->emplace_back(values);
111  }
std::vector< std::unique_ptr< std::vector< anab::FeatureVector< N > > > > fVectors
Definition: MVAWriter.h:170
template<size_t N>
void anab::FVectorWriter< N >::clearEventData ( )
inlineprivate

Definition at line 183 of file MVAWriter.h.

Referenced by anab::FVectorWriter< N >::saveOutputs().

184  {
185  fTypeHashToID.clear();
186  fVectors.clear();
187  fDescriptions.reset(nullptr);
188  }
std::vector< std::unique_ptr< std::vector< anab::FeatureVector< N > > > > fVectors
Definition: MVAWriter.h:170
std::unordered_map< size_t, FVector_ID > fTypeHashToID
Definition: MVAWriter.h:180
std::unique_ptr< std::vector< anab::FVecDescription< N > > > fDescriptions
Definition: MVAWriter.h:182
template<size_t N>
bool anab::FVectorWriter< N >::dataTypeRegistered ( const std::string &  dname) const
private

Check if the the writer is configured to write results for data product type name.

Definition at line 330 of file MVAWriter.h.

References anab::FVectorWriter< N >::fRegisteredDataTypes.

Referenced by anab::FVectorWriter< 4 >::clearEventData(), anab::FVectorWriter< N >::initOutputs(), and anab::FVectorWriter< N >::produces_using().

331 {
332  for (auto const& s : fRegisteredDataTypes) {
333  if (s == dname) { return true; }
334  }
335  return false;
336 }
std::vector< std::string > fRegisteredDataTypes
Definition: MVAWriter.h:177
template<size_t N>
bool anab::FVectorWriter< N >::descriptionExists ( const std::string &  tname) const
private

Check if the containers for results prepared for "tname" data type are ready.

Definition at line 360 of file MVAWriter.h.

References d, anab::FVectorWriter< N >::fDescriptions, anab::FVectorWriter< N >::fInstanceName, and n.

Referenced by anab::FVectorWriter< 4 >::clearEventData(), anab::FVectorWriter< N >::initOutputs(), and anab::FVectorWriter< N >::saveOutputs().

361 {
362  if (!fDescriptions) return false;
363 
364  std::string n = fInstanceName + tname;
365  for (auto const& d : *fDescriptions) {
366  if (d.outputInstance() == n) { return true; }
367  }
368  return false;
369 }
Float_t d
Definition: plot.C:235
std::string fInstanceName
Definition: MVAWriter.h:175
Char_t n[5]
std::unique_ptr< std::vector< anab::FVecDescription< N > > > fDescriptions
Definition: MVAWriter.h:182
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(); }
template<size_t N>
template<class T >
FVector_ID anab::FVectorWriter< N >::getProductID ( ) const
protected
template<size_t N>
template<class T >
anab::FVector_ID anab::FVectorWriter< N >::getProductID ( ) const

Definition at line 317 of file MVAWriter.h.

References anab::FVectorWriter< N >::fTypeHashToID, anab::FVectorWrapperBase::getProductHash(), and anab::FVectorWrapperBase::getProductName().

318 {
319  auto const& ti = typeid(T);
320  auto search = fTypeHashToID.find(getProductHash(ti));
321  if (search != fTypeHashToID.end()) { return search->second; }
322  else {
323  throw cet::exception("FVectorWriter")
324  << "Feature vectors not initialized for product " << getProductName(ti) << std::endl;
325  }
326 }
std::string getProductName(std::type_info const &ti) const
std::unordered_map< size_t, FVector_ID > fTypeHashToID
Definition: MVAWriter.h:180
size_t getProductHash(std::type_info const &ti) const
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
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<size_t N>
template<class T >
std::array<float, N> anab::FVectorWriter< N >::getVector ( size_t  key) const
inline

Get copy of the feature vector for the type T, at index "key".

Definition at line 130 of file MVAWriter.h.

131  {
132  std::array<float, N> vout;
133  auto const& src = (*(fVectors[getProductID<T>()]))[key];
134  for (size_t i = 0; i < N; ++i)
135  vout[i] = src[i];
136  return vout;
137  }
std::vector< std::unique_ptr< std::vector< anab::FeatureVector< N > > > > fVectors
Definition: MVAWriter.h:170
template<size_t N>
template<class T >
std::array<float, N> anab::FVectorWriter< N >::getVector ( art::Ptr< T > const &  item) const
inline

Get copy of the feature vector for the type T, idicated with art::Ptr::key().

Definition at line 141 of file MVAWriter.h.

142  {
143  std::array<float, N> vout;
144  auto const& src = (*(fVectors[getProductID<T>()]))[item.key()];
145  for (size_t i = 0; i < N; ++i)
146  vout[i] = src[i];
147  return vout;
148  }
std::vector< std::unique_ptr< std::vector< anab::FeatureVector< N > > > > fVectors
Definition: MVAWriter.h:170
key_type key() const noexcept
Definition: Ptr.h:166
template<size_t N>
template<class T >
FVector_ID anab::FVectorWriter< N >::initOutputs ( std::string const &  dataTag,
size_t  dataSize,
std::vector< std::string > const &  names = std::vector< std::string >(N,"") 
)

Initialize container for FeatureVectors and, if not yet done, the container for metadata, then creates metadata for data products of type T. FeatureVector container is initialized to hold dataSize vectors (if dataSize > 0): use setOutput() to store values. Returns index of collection which should be used when saving actual output values.

Referenced by anab::FVectorWriter< 4 >::FVectorWriter(), hit::DPRawHitFinder::produce(), nnet::EmTrackClusterId2out::produce(), nnet::EmTrackClusterId::produce(), and nnet::EmTrackMichelId::produce().

template<size_t N>
template<class T >
FVector_ID anab::FVectorWriter< N >::initOutputs ( art::InputTag const &  dataTag,
size_t  dataSize,
std::vector< std::string > const &  names = std::vector<std::string>(N, "") 
)
inline

Definition at line 55 of file MVAWriter.h.

58  {
59  return initOutputs<T>(dataTag.encode(), dataSize, names);
60  }
template<size_t N>
template<class T >
FVector_ID anab::FVectorWriter< N >::initOutputs ( art::InputTag const &  dataTag,
std::vector< std::string > const &  names = std::vector<std::string>(N, "") 
)
inline

Initialize container for FeatureVectors and, if not yet done, the container for metadata, then creates metadata for data products of type T. FeatureVector container is initialized as EMPTY and vectors should be added with addOutput() function. Returns index of collection which should be used when adding actual output values.

Definition at line 84 of file MVAWriter.h.

86  {
87  return initOutputs<T>(dataTag.encode(), 0, names);
88  }
template<size_t N>
template<class T >
FVector_ID anab::FVectorWriter< N >::initOutputs ( std::vector< std::string > const &  names = std::vector<std::string>(N, ""))
inline

Definition at line 91 of file MVAWriter.h.

92  {
93  return initOutputs<T>(std::string(""), 0, names);
94  }
template<size_t N>
template<class T >
anab::FVector_ID anab::FVectorWriter< N >::initOutputs ( std::string const &  dataTag,
size_t  dataSize,
std::vector< std::string > const &  names 
)

Definition at line 374 of file MVAWriter.h.

References anab::FVectorWriter< N >::dataTypeRegistered(), anab::FVectorWriter< N >::descriptionExists(), anab::FVectorWriter< N >::fDescriptions, anab::FVectorWriter< N >::fInstanceName, anab::FVectorWriter< N >::fTypeHashToID, anab::FVectorWriter< N >::fVectors, anab::FVectorWrapperBase::getProductHash(), anab::FVectorWrapperBase::getProductName(), and lar::dump::vector().

377 {
378  size_t dataHash = getProductHash(typeid(T));
379  std::string dataName = getProductName(typeid(T));
380 
381  if (!dataTypeRegistered(dataName)) {
382  throw cet::exception("FVectorWriter")
383  << "Type " << dataName << "not registered with produces_using() function." << std::endl;
384  }
385 
386  if (!fDescriptions) { fDescriptions = std::make_unique<std::vector<anab::FVecDescription<N>>>(); }
387  else if (descriptionExists(dataName)) {
388  throw cet::exception("FVectorWriter")
389  << "FVecDescription<N> already initialized for " << dataName << std::endl;
390  }
391  fDescriptions->emplace_back(dataTag, fInstanceName + dataName, names);
392 
393  fVectors.push_back(std::make_unique<std::vector<anab::FeatureVector<N>>>());
394  anab::FVector_ID id = fVectors.size() - 1;
395  fTypeHashToID[dataHash] = id;
396 
397  if (dataSize) { fVectors[id]->resize(dataSize, anab::FeatureVector<N>(0.0F)); }
398 
399  return id;
400 }
bool descriptionExists(const std::string &tname) const
Check if the containers for results prepared for "tname" data type are ready.
Definition: MVAWriter.h:360
size_t FVector_ID
Index to the MVA output / FeatureVector collection, used when result vectors are added or set...
Definition: MVAWriter.h:21
std::string getProductName(std::type_info const &ti) const
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:289
std::vector< std::unique_ptr< std::vector< anab::FeatureVector< N > > > > fVectors
Definition: MVAWriter.h:170
std::unordered_map< size_t, FVector_ID > fTypeHashToID
Definition: MVAWriter.h:180
bool dataTypeRegistered(const std::string &dname) const
Check if the the writer is configured to write results for data product type name.
Definition: MVAWriter.h:330
std::string fInstanceName
Definition: MVAWriter.h:175
std::unique_ptr< std::vector< anab::FVecDescription< N > > > fDescriptions
Definition: MVAWriter.h:182
size_t getProductHash(std::type_info const &ti) const
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
template<size_t N>
size_t anab::FVectorWriter< N >::length ( ) const
inline

Get the length of a single feature vector.

Definition at line 126 of file MVAWriter.h.

126 { return N; }
template<size_t N>
template<class T >
void anab::FVectorWriter< N >::produces_using ( )

Register the collection of metadata type FVecDescription<N> (once for all data types for which vectors are saved) and the collection of FeatureVectors<N> (using data type name added to fInstanceName as instance name of the collection made for the type T).

Definition at line 341 of file MVAWriter.h.

References anab::FVectorWriter< N >::dataTypeRegistered(), anab::FVectorWriter< N >::fCollector, anab::FVectorWriter< N >::fInstanceName, anab::FVectorWriter< N >::fIsDescriptionRegistered, anab::FVectorWriter< N >::fRegisteredDataTypes, anab::FVectorWrapperBase::getProductName(), and art::ProducesCollector::produces().

Referenced by hit::DPRawHitFinder::DPRawHitFinder(), nnet::EmTrackClusterId::EmTrackClusterId(), nnet::EmTrackClusterId2out::EmTrackClusterId2out(), nnet::EmTrackMichelId::EmTrackMichelId(), and anab::FVectorWriter< 4 >::FVectorWriter().

342 {
343  std::string dataName = getProductName(typeid(T));
344  if (dataTypeRegistered(dataName)) {
345  throw cet::exception("FVectorWriter")
346  << "Type " << dataName << "was already registered." << std::endl;
347  }
348 
350  fCollector.produces<std::vector<anab::FVecDescription<N>>>(fInstanceName);
352  }
353 
354  fCollector.produces<std::vector<anab::FeatureVector<N>>>(fInstanceName + dataName);
355  fRegisteredDataTypes.push_back(dataName);
356 }
std::string getProductName(std::type_info const &ti) const
void produces(std::string const &instanceName={}, Persistable const persistable=Persistable::Yes)
art::ProducesCollector & fCollector
Definition: MVAWriter.h:174
std::vector< std::string > fRegisteredDataTypes
Definition: MVAWriter.h:177
bool fIsDescriptionRegistered
Definition: MVAWriter.h:178
bool dataTypeRegistered(const std::string &dname) const
Check if the the writer is configured to write results for data product type name.
Definition: MVAWriter.h:330
std::string fInstanceName
Definition: MVAWriter.h:175
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
template<size_t N>
void anab::FVectorWriter< N >::saveOutputs ( art::Event evt)

Check consistency and save all the results in the event.

Definition at line 404 of file MVAWriter.h.

References anab::FVectorWriter< N >::clearEventData(), anab::FVectorWriter< N >::descriptionExists(), util::empty(), anab::FVectorWriter< N >::fDescriptions, anab::FVectorWriter< N >::fInstanceName, anab::FVectorWriter< N >::fRegisteredDataTypes, anab::FVectorWriter< N >::fVectors, n, and art::Event::put().

Referenced by hit::DPRawHitFinder::produce(), nnet::EmTrack< N >::produce(), nnet::EmTrackClusterId2out::produce(), nnet::EmTrackClusterId::produce(), nnet::EmTrackMichelId::produce(), and anab::FVectorWriter< 4 >::setDataTag().

405 {
406  for (auto const& n : fRegisteredDataTypes) {
407  if (!descriptionExists(n)) {
408  throw cet::exception("FVectorWriter")
409  << "No FVecDescription<N> prepared for type " << n << std::endl;
410  }
411  }
412 
413  if (fVectors.size() != fDescriptions->size()) {
414  throw cet::exception("FVectorWriter")
415  << "FVecDescription<N> vector length not equal to the number of FeatureVector<N> vectors"
416  << std::endl;
417  }
418 
419  for (size_t i = 0; i < fVectors.size(); ++i) {
420  auto const& outInstName = (*fDescriptions)[i].outputInstance();
421  if ((*fDescriptions)[i].dataTag().empty()) {
422  throw cet::exception("FVectorWriter")
423  << "FVecDescription<N> reco data tag not set for " << outInstName << std::endl;
424  }
425  evt.put(std::move(fVectors[i]), outInstName);
426  }
427  evt.put(std::move(fDescriptions), fInstanceName);
428  clearEventData();
429 }
bool descriptionExists(const std::string &tname) const
Check if the containers for results prepared for "tname" data type are ready.
Definition: MVAWriter.h:360
PutHandle< PROD > put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
Definition: Event.h:77
std::vector< std::unique_ptr< std::vector< anab::FeatureVector< N > > > > fVectors
Definition: MVAWriter.h:170
std::vector< std::string > fRegisteredDataTypes
Definition: MVAWriter.h:177
std::string fInstanceName
Definition: MVAWriter.h:175
Char_t n[5]
std::unique_ptr< std::vector< anab::FVecDescription< N > > > fDescriptions
Definition: MVAWriter.h:182
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.
Definition: StdUtils.h:109
template<size_t N>
void anab::FVectorWriter< N >::setDataTag ( FVector_ID  id,
art::InputTag const &  dataTag 
)
inline

Set tag of associated data products in case it was not ready at the initialization time.

Definition at line 114 of file MVAWriter.h.

115  {
116  (*fDescriptions)[id].setDataTag(dataTag.encode());
117  }
template<size_t N>
void anab::FVectorWriter< N >::setVector ( FVector_ID  id,
size_t  key,
std::array< float, N > const &  values 
)
inline

Definition at line 62 of file MVAWriter.h.

Referenced by anab::MVAWriter< 4 >::setOutput().

63  {
64  (*(fVectors[id]))[key] = values;
65  }
std::vector< std::unique_ptr< std::vector< anab::FeatureVector< N > > > > fVectors
Definition: MVAWriter.h:170
decltype(auto) values(Coll &&coll)
Range-for loop helper iterating across the values of the specified collection.
template<size_t N>
void anab::FVectorWriter< N >::setVector ( FVector_ID  id,
size_t  key,
std::array< double, N > const &  values 
)
inline

Definition at line 66 of file MVAWriter.h.

67  {
68  (*(fVectors[id]))[key] = values;
69  }
std::vector< std::unique_ptr< std::vector< anab::FeatureVector< N > > > > fVectors
Definition: MVAWriter.h:170
decltype(auto) values(Coll &&coll)
Range-for loop helper iterating across the values of the specified collection.
template<size_t N>
void anab::FVectorWriter< N >::setVector ( FVector_ID  id,
size_t  key,
std::vector< float > const &  values 
)
inline

Definition at line 70 of file MVAWriter.h.

71  {
72  (*(fVectors[id]))[key] = values;
73  }
std::vector< std::unique_ptr< std::vector< anab::FeatureVector< N > > > > fVectors
Definition: MVAWriter.h:170
decltype(auto) values(Coll &&coll)
Range-for loop helper iterating across the values of the specified collection.
template<size_t N>
void anab::FVectorWriter< N >::setVector ( FVector_ID  id,
size_t  key,
std::vector< double > const &  values 
)
inline

Definition at line 74 of file MVAWriter.h.

75  {
76  (*(fVectors[id]))[key] = values;
77  }
std::vector< std::unique_ptr< std::vector< anab::FeatureVector< N > > > > fVectors
Definition: MVAWriter.h:170
decltype(auto) values(Coll &&coll)
Range-for loop helper iterating across the values of the specified collection.
template<size_t N>
size_t anab::FVectorWriter< N >::size ( FVector_ID  id) const
inline

Get the number of contained feature vectors.

Definition at line 123 of file MVAWriter.h.

123 { return fVectors[id]->size(); }
std::vector< std::unique_ptr< std::vector< anab::FeatureVector< N > > > > fVectors
Definition: MVAWriter.h:170

Friends And Related Function Documentation

template<size_t N>
std::ostream& operator<< ( std::ostream &  o,
FVectorWriter< N > const &  a 
)
friend

Definition at line 150 of file MVAWriter.h.

151  {
152  o << "FVectorWriter for " << a.fInstanceName << ", " << N << " outputs";
153  if (!a.fRegisteredDataTypes.empty()) {
154  o << ", ready to write results made for:" << std::endl;
155  for (auto const& n : a.fRegisteredDataTypes) {
156  o << "\t" << n << std::endl;
157  }
158  }
159  else {
160  o << ", nothing registered for writing to the events" << std::endl;
161  }
162  return o;
163  }
Char_t n[5]

Member Data Documentation

template<size_t N>
art::ProducesCollector& anab::FVectorWriter< N >::fCollector
private

Definition at line 174 of file MVAWriter.h.

Referenced by anab::FVectorWriter< N >::produces_using().

template<size_t N>
std::unique_ptr<std::vector<anab::FVecDescription<N> > > anab::FVectorWriter< N >::fDescriptions
private
template<size_t N>
bool anab::FVectorWriter< N >::fIsDescriptionRegistered
private

Definition at line 178 of file MVAWriter.h.

Referenced by anab::FVectorWriter< N >::produces_using().

template<size_t N>
std::vector<std::string> anab::FVectorWriter< N >::fRegisteredDataTypes
private
template<size_t N>
std::unordered_map<size_t, FVector_ID> anab::FVectorWriter< N >::fTypeHashToID
private

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