How to add new classes - nscl-hira/HiRAEVT GitHub Wiki

Classes, for example a new detector, can be added by created the header and source files. They should be added to a folder that builds to a library. In that directory the CMakeLists.txt file must be edited to add any include directories needed as well as add the source file so the make file knows to compile it. In addition the class should be added the the local GenLinkDef.h file, if needed. Classes should respect the naming convention of HTName.cxx for source, and HTName.h for headers. The FairRoot macro used to generate the ROOT dictionaries for each library, assumes these file extensions.

In general, any class added or modified should try to respect backwards compatibility. In addition, it should avoid modifying important base classes unless there is a good reason. That is, if you're adding a feature only used in a certain experiment to a certain class you should extend that class rather then modify it.