rootcint header_file[+][-][!] ... [LinkDef.h] > dict_file
rootcint [-f] dict_file [-c] header_file[+][-][!] ... [LinkDef.h]
DESCRIPTIONThe rootcint program generates the Streamer(), TBuffer &operator>>() and ShowMembers() methods for ROOT classes, i.e. classes using the ClassDef and ClassImp macros. In addition rootcint can also generate the CINT dictionaries needed in order to get access to ones classes via the interpreter.
rootcint can be used like:
rootcint TAttAxis.h[-][!] ... [LinkDef.h] > AxisGen.C
rootcint [-f] [AxDict.C] [-c] TAttAxis.h[-][!] ... [LinkDef.h]
The difference between the two is that in the first case only the Streamer() and ShowMembers() methods are generated while in the latter case a complete compileable file is generated (including the include statements). The first method also allows the output to be appended to an already existing file (using >> ). The optional minus behind the include file name tells rootcint to not generate the Streamer() method. A custom method must be provided by the user in that case. When using option -c also the interpreter method interface stubs will be written to the output file ( AxDict.C in the above case). By default the output file will not be overwritten if it exists. Use the -f (force) option to overwite the output file.
Before specifying the first header file one can also add include file directories to be searched and preprocessor defines, like:
The (optional) file LinkDef.h looks like:
#ifdef __CINT__ #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ class TAxis; #pragma link C++ class TAttAxis-; #pragma link C++ class TArrayC-!; #pragma link C++ function StrDup; #pragma link C++ function operator+(const TString&,const TString&); #pragma link C++ global gROOT; #pragma link C++ global gEnv; #pragma link C++ enum EMessageTypes; #endif
This file tells rootcint for which classes the method interface stubs should be generated. A trailing `-' in the class name tells rootcint to not generate the Streamer() method. This is necessary for those classes that need a customized Streamer() method. A trailing `!' in the class name tells rootcint to not generate the operator>>(TBuffer &b, MyClass *&obj) method. This is necessary to be able to write pointers to objects of classes not inheriting from TObject. When this file is not specified a default version exporting the classes with the names equal to the include files minus the .h is generated.
- LinkDef.h must be the last argument on the rootcint command line.
- Note that the LinkDef file name MUST contain the string: LinkDef.h or linkdef.h, i.e. NA49_LinkDef.h is fine just like, mylinkdef.h.
ORIGINAL AUTHORSThe ROOT team (see web page above):
- Rene Brun and Fons Rademakers
COPYRIGHTThis library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
AUTHORThis manual page was written by Christian Holm Christensen <[email protected]>, for the Debian GNU/Linux system (but may be used by others).