User Tools

Site Tools


root:addclasstoroot

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
root:addclasstoroot [2008/12/01 16:30] decianmroot:addclasstoroot [2011/03/08 12:42] – [Troubleshooting] decianm
Line 62: Line 62:
  
 ==== Some Notes ==== ==== Some Notes ====
-  * You **must** write a constructor yourself. Normally in C++, if you forget your constructor, the compiler will create a standard-constructor for you. However, if you don't provide a constructor here, you'll run into trouble.+  * You **must** write a constructor (and a destructor) yourself. Normally in C++, if you forget your constructor, the compiler will create a standard-constructor for you. However, if you don't provide a constructor here, you'll run into trouble.
   * The **ClassImp(ana)** and the **ClassDef(ana, 1)** are necessary for the full functionality. ana names the class and the number in **ClassDef** is the VersionID; it has to be greater than zero. **ClassDef(...)** always has to be the last statement before the closing bracket. These statements are needed to create the dictionary for ROOT in the compilation process.   * The **ClassImp(ana)** and the **ClassDef(ana, 1)** are necessary for the full functionality. ana names the class and the number in **ClassDef** is the VersionID; it has to be greater than zero. **ClassDef(...)** always has to be the last statement before the closing bracket. These statements are needed to create the dictionary for ROOT in the compilation process.
  
Line 116: Line 116:
 setenv PATH $ROOTSYS/bin:$PATH setenv PATH $ROOTSYS/bin:$PATH
 </code> in your .tcshrc file (if you are working on a tcsh). </code> in your .tcshrc file (if you are working on a tcsh).
-    * Did you think of the constructor? A missing constructor may give similar error messages.+    * Did you think of the constructor / destructor? A missing constructor may give similar error messages.
     * There may be also be something missing in the Makefile, meaning that not everything is linked correctly.     * There may be also be something missing in the Makefile, meaning that not everything is linked correctly.
 +    * Note: For RooFit you need an additional -lRooFit for the GLIBS
   * The described procedure works for me on lxplus and locally (leopard.physik.uzh.ch).   * The described procedure works for me on lxplus and locally (leopard.physik.uzh.ch).
  
root/addclasstoroot.txt · Last modified: 2011/03/08 12:42 by decianm