Adding a new class is straightforward following the procedures highlighted in the ROOT documentation.
I list the steps for sanity's sake:
-
Make source and header
-
Add ClassDef(Class,#) to header just before the end of the class declaration's "};" It does not need a semicolon after it and should always be the last thing.
-
Add ClassImp(Class), with no trailing semicolon at the top of the source. Between the includes and member function definitions.
-
Add appropriate line to (module)_LinkDef.h file. (eg. #pragma link C++ class BigcalEvent+;)
-
Create Dictionary header and source definitions with rootcint ( rootcint -f /BETAEventDict.cxx -c -p $^ ) This makes BETAEventDict.cxx and BETAEventDict.h. Or just find the makefiles in build and add a lib/NEWCLASSTHATNEEDSDICT.o to list of object files
-
Compile this to get the object file
-
Assuming you have all objects make the shared libraries : g++ -shared -Wl,-soname,libWHATEVER.so.1.1 -o allTheObjectFiles.o)
-
All goes well you have a shared library libWHATEVER.so.1.1