I am trying to read a std::vector object using ROOT in Python but I am getting an error as std::vector is not supported. I tried to create a file mydict.h
#ifndef __MYDICT_H_ #define __MYDICT_H_ #if defined(__ROOTCLING__) #pragma link C++ class std::vector <double>+; #endif #endif // __MYDICT_H_
and load ROOT and mydict.h as follows to the python file to be executed
from ROOT import gROOT gROOT.LoadMacro('$ROOTCOREDIR/scripts/load_packages.C') gROOT.ProcessLine(".L LinkDef.h");
However, I am still getting an ERROR that std::vector is not supported. I suspect that I am not building mydict.h with ROOT correctly but I am unsure how to solve the problem.
Thanks you for your time and help!