RE: [ROOT] Generating shared library

From: Philippe Canal (pcanal@fnal.gov)
Date: Tue Jul 22 2003 - 17:16:14 MEST


Hi,

As the error message tries to indicates, ROOT does not have enough
information to save the object of your classes.
The syntax for ROOT is as follow

class ArrayFoo : public TObject {
  private:
    Int_t size;
    Float_t *the_array;  //[size] ArrayFoo always create the_array using
the_array=new float[size];

Cheers,
Philippe



-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of matej batic
Sent: Tuesday, July 22, 2003 7:26 AM
To: roottalk@pcroot.cern.ch
Subject: [ROOT] Generating shared library


I am having some problems when I try to make shared library with myclass.
I have some data I wish to read into an array. I wrote a class to
execute operations on this array. Anyway, when I compile my class with
makefile I get following error:

rootcint -f AFdict.cc -c ArrayFoo.h
Error: *** Datamember ArrayFoo::the_array: no size indication!
Error: *** Datamember ArrayFoo::the_array: pointer to fundamental type
(need manual intervention)

The compilation end normally, everything seems ok but for the errors
mentioned above. I am using ROOT  3.05/05 on RHLinux 7.3 with g++ 2.96.
Does anyone know how to get rid of this?

thanks,
matej


Here is header ArrayFoo.h file:

#ifndef __ArrayFoo__
#define __ArrayFoo__

#include "TObject.h"
#include "TF1.h"

class ArrayFoo : public TObject{
  private:
    Float_t *the_array;
    Int_t size;

  public:
    ArrayFoo(Int_t array_size=1);        //default constructor of an foo
array
    ~ArrayFoo();                 //default destructor
    Int_t ChangeSize(Int_t array_size);    //change size of array so
that it deletes
                        //foo array and creates new one
    Int_t FillArray(Int_t where, Float_t what);//fill foo array at where
cell with what value
    Float_t ReadArray(Int_t where);        //read cell where
    Int_t Where(Float_t here);        //finds (first) cell that is
equall (greater) then value here
    Int_t PrintArray();             //print out foo array
    Int_t CalibrateArray(TF1 *fnc);            //calibrate array using
function

  ClassDef(ArrayFoo,1)                //simple ArrayFoo class

};

#endif

The compilation end normally, everything seems ok but for the errors
mentioned above. I am using ROOT  3.05/05 on RHLinux 7.3 with g++ 2.96.
Does anyone

--
----
   Matej Batic
-----------------
Five is a sufficiently close approximation to infinity.
		-- Robert Firth

"One, two, five."
		-- Monty Python and the Holy Grail



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:13 MET