#include <MVAWriter.h>
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 |
Protected Member Functions inherited from anab::FVectorWrapperBase | |
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::ProducesCollector & | fCollector |
std::string | fInstanceName |
std::vector< std::string > | fRegisteredDataTypes |
bool | fIsDescriptionRegistered |
std::unordered_map< size_t, FVector_ID > | fTypeHashToID |
std::unique_ptr< std::vector < anab::FVecDescription< N > > > | fDescriptions |
Friends | |
std::ostream & | operator<< (std::ostream &o, FVectorWriter const &a) |
Definition at line 25 of file MVAWriter.h.
|
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 32 of file MVAWriter.h.
|
inline |
Definition at line 78 of file MVAWriter.h.
|
inline |
Definition at line 79 of file MVAWriter.h.
|
inline |
Definition at line 80 of file MVAWriter.h.
|
inline |
Definition at line 81 of file MVAWriter.h.
|
inlineprivate |
Definition at line 144 of file MVAWriter.h.
|
private |
Check if the the writer is configured to write results for data product type name.
Definition at line 245 of file MVAWriter.h.
|
private |
Check if the containers for results prepared for "tname" data type are ready.
Definition at line 277 of file MVAWriter.h.
|
protected |
anab::FVector_ID anab::FVectorWriter< N >::getProductID | ( | ) | const |
Definition at line 232 of file MVAWriter.h.
|
inline |
Get copy of the feature vector for the type T, at index "key".
Definition at line 97 of file MVAWriter.h.
|
inline |
Get copy of the feature vector for the type T, idicated with art::Ptr::key().
Definition at line 107 of file MVAWriter.h.
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.
|
inline |
Definition at line 54 of file MVAWriter.h.
|
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 69 of file MVAWriter.h.
|
inline |
Definition at line 74 of file MVAWriter.h.
anab::FVector_ID anab::FVectorWriter< N >::initOutputs | ( | std::string const & | dataTag, |
size_t | dataSize, | ||
std::vector< std::string > const & | names | ||
) |
Definition at line 292 of file MVAWriter.h.
|
inline |
Get the length of a single feature vector.
Definition at line 93 of file MVAWriter.h.
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 257 of file MVAWriter.h.
void anab::FVectorWriter< N >::saveOutputs | ( | art::Event & | evt | ) |
Check consistency and save all the results in the event.
Definition at line 325 of file MVAWriter.h.
|
inline |
Set tag of associated data products in case it was not ready at the initialization time.
Definition at line 84 of file MVAWriter.h.
|
inline |
Definition at line 58 of file MVAWriter.h.
|
inline |
Definition at line 59 of file MVAWriter.h.
|
inline |
Definition at line 60 of file MVAWriter.h.
|
inline |
Definition at line 61 of file MVAWriter.h.
|
inline |
Get the number of contained feature vectors.
Definition at line 90 of file MVAWriter.h.
|
friend |
Definition at line 115 of file MVAWriter.h.
|
private |
Definition at line 135 of file MVAWriter.h.
|
private |
Definition at line 143 of file MVAWriter.h.
|
private |
Definition at line 136 of file MVAWriter.h.
|
private |
Definition at line 139 of file MVAWriter.h.
|
private |
Definition at line 138 of file MVAWriter.h.
|
private |
Definition at line 141 of file MVAWriter.h.
|
protected |
Definition at line 131 of file MVAWriter.h.