InSANE  1.6
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Defines
Adding a New Class to Shared libraries

Adding a new class is straightforward following the procedures highlighted in the ROOT documentation.

I list the steps for sanity's sake:

  1. Make source and header
  2. 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.
  3. Add ClassImp(Class), with no trailing semicolon at the top of the source. Between the includes and member function definitions.
  4. Add appropriate line to (module)_LinkDef.h file. (eg. #pragma link C++ class BigcalEvent+;)
  5. 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
  6. Compile this to get the object file
  7. Assuming you have all objects make the shared libraries : g++ -shared -Wl,-soname,libWHATEVER.so.1.1 -o allTheObjectFiles.o)
  8. All goes well you have a shared library libWHATEVER.so.1.1