Redefinition of class

Consider the attached file. Everytime compiling another script where #include "MyClasses.C" is inserted at the top, a redefinition error occurs. Could there be something erroneous about the way ClassDef and ClassImp are applied in the script?

MyClasses.C (273 Bytes)

Add at the beginning of your file

#ifndef MyClasses_C
#define MyClasses_C

and at the end

#endif

without this each time you have the interpreter see #include “MyClasses.C” it will define ‘yet-again’ the class.