LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
MVAWrapperBase.cxx
Go to the documentation of this file.
1 // \version
3 //
4 // \brief Helper functions for MVAReader and MVAWriter wrappers
5 //
6 // \author robert.sulej@cern.ch
7 //
9 
11 
12 #include <cxxabi.h>
13 #include <algorithm>
14 
15 namespace anab {
16 
17 std::string FVectorWrapperBase::getProductName(std::type_info const & ti) const
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 }
31 
32 } // namespace anab
std::string getProductName(std::type_info const &ti) const