This website is no longer maintained. Its content may be obsolete. Please visit http://home.cern/ for current CERN information.
Two 1-dimensional histograms are created, filled, plotted and saved in an HBook file.
Click to retrieve the C++ source code of the example.
Note that whenever an object returns a pointer of type T the latter is immediatelly assigned
either to an auto pointer of the standard library std::auto_ptr<T> in case the
ownership of the pointed object is passed to the user or or a reference T&
if the parent object retains the ownership.
For simplicity reasons, no pointer checking is done.
You can build the application typing :
g++ -o b4.exe b4.cpp -I$AIDA_DIR -L$ANAPHE_REL_DIR/lib \
-lAnaphe_AIDA_AnalysisFactory_native -lAnaphe_AIDA_Annotation_native \
-lAnaphe_AIDA_Histogram_native -lAnaphe_AIDA_Tree_native -lAnaphe_AIDA_HBookStore \
-lAnaphe_AIDA_Plotter_Grace -lGracePlotter -lg2c
or even simpler by typing :
g++ -o b4.exe b4.cpp `aida-config --includes --libs`
Click to retrieve the corresponing python script
to be executed by Lizard, in order to achieve the same result.
During the Lizard startup the following objects are instantiated:
For simplicity reasons, no pointer checking is done.