Hello Root,
I seem to be running into a problem with ClassDef (and ClassImp) increasing
the size of my class's storage area by about 4 bytes. I am *not* deriving
from TObject, so the extra bytes are not from there.
Is there a way around this which will still give me all the nice features
(streamer, showmember etc) of ROOT but keep my class the exact same size as
the data members I defined?
The reason that the extra bytes are a problem is because I am setting
pointers into an already existing array with data (which is created by a
FORTRAN package called BOS), in order to read it's contends. The extra bytes
causes the next pointer to be 4 bytes off.
Maurik
---------------------------------------------------------------------------------
Sample code:
The following code will have a "sizeof()" of 56 instead of the expected 52:
class TPARTData {
public:
Int_t pid; /* particle id
(GEANT) */
Float_t x; /* vector3_t vert; Vertex position
{x,y,z} */
Float_t y; /*
y */
Float_t z; /*
z */
Float_t e; /* vector4_t p;
Energy */
Float_t px; /* momentum
{x,y,z} */
Float_t py; /*
py */
Float_t pz; /*
pz */
Float_t q; /*
charge */
Int_t trkid; /* index to TBID bank, counting from
1 */
Float_t qpid; /* quality factor for the
pid */
Float_t qtrk; /* quality factor for the
trk */
Int_t flags; /* set of flags defining track (ie,
BEAM) */
ClassDef(TPARTData,1)
};
--------------AFEDF9C6EF564B01409D07C0
Content-Type: text/x-vcard; charset=us-ascii;
name="maurik.holtrop.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Maurik Holtrop
Content-Disposition: attachment;
filename="maurik.holtrop.vcf"
begin:vcard
n:Holtrop;Maurik
tel;fax:(603) 862-2998
tel;home:(603) 659-8765
tel;work:(603) 862-2019
x-mozilla-html:FALSE
url:http://www.physics.unh.edu/Maurik
org:UNH Nuclear Physics
adr:;;9 Library Way;Lee;NH;03824;USA
version:2.1
email;internet:maurik.holtrop@unh.edu
x-mozilla-cpt:;1216
fn:Maurik Holtrop
end:vcard
--------------AFEDF9C6EF564B01409D07C0--