//-------------------------------------------------- #ifndef __MyClass__ #define __MyClass__ #include "TObject.h" #include #include #ifndef __CINT__ #include "boostThings.h" #endif using namespace std; class MyClass: public TObject { private: vector servec; //some doubles, to test serialization #ifndef __CINT__ friend class boost::serialization::access; template void serialize(Archive & ar, const unsigned int version){ ar & BOOST_SERIALIZATION_NVP(servec); } #endif public: MyClass(); ~MyClass(){;}; #ifndef __CINT__ void BoostTest()/*{ //remove the /* for function definition in header string f = "test"; ifstream ifs(f.c_str()); assert(ifs.good()); boost::archive::xml_iarchive ia(ifs); MyClass newMyClass; ia >> BOOST_SERIALIZATION_NVP(newMyClass); *this = newMyClass; }*/; //remove the */ for function definition in header #endif ClassDef(MyClass,1) //Test class for root library }; #endif //--------------------------------------------------