Dear developers, I have produced a ROOT TTree/TFolder structure saved on a TFile with ROOT v3.05.04 under linux RedHat 7.2 with gcc 296. This file is well treated afterwards under other machine running the same RedHat version and ROOT version. But, transfering the File under LXPLUS running RH73 and compiling my application with /afs/cern.ch/sw/packages/ROOT/v3.05.04/rh73_gcc296 I get a Abort that valgrind diagnostic is ==6757== Jump to the invalid address stated on the next line ==6757== at 0x0: ??? ==6757== by 0x41C5E512: __dynamic_cast_2 (in /usr/lib/libstdc++-3-libc6.2-2-2.10.0.so) ==6757== by 0x40799928: RTSCINHit::LocalParticle(void) (../OpRData/RTSCINHit.cpp:30) ==6757== by 0x402CEBBE: Tree2Tree::create(RTSCINHit *) (../OpIO/Tree2Tree.cpp The statement pointed is RParticle* RTSCINHit::LocalParticle() { return dynamic_cast<RParticle*>(fLocalParticle.GetObject()); } That is to say the TObejct* stored as a TRef is not recognized anymore. Do you have a comment on the trasfert of file created and than treated under two different of machine systems ? Best regards, Jean-Eric Campagne I give you below the RTSCINHit class definition #ifndef OPDATA_RTSCINHIT_H #define OPDATA_RTSCINHIT_H 1 #include <iostream> #include "TObject.h" #include "TRef.h" class RParticle; class RTSCINHit : public TObject { public: //Ctor RTSCINHit() : fX(0.), fY(0.), fZ(0.), fSciBar(0), fSciBox(0), fSciWall(0), fSciSM(0), fEdep(0.) { fIndex = nextId++; fLocalParticle = 0; fPrimaryParticle = 0; //JEC 4/3/03 fMotherParticle = 0; //JEC 17/3/03 } //Copy Ctor 4/3/03 RTSCINHit(const RTSCINHit& a); //JEC 4/3/03 use copy ctor to clone an object RTSCINHit* clone() const { return new RTSCINHit(*this);} //Dtor virtual ~RTSCINHit() { //cout << "Delete RTSCINHit(" << this << ")" << endl; } //list of accessors Long_t Index() const { return fIndex;} Long_t Index() { return fIndex;} void SetIndex(Long_t index) { fIndex = index; } static void ResetId() {nextId = 0;} static void SetNextId(Long_t value) { nextId = value;} Float_t X() const { return fX;} Float_t X() { return fX;} void SetX(Float_t x) { fX = x; } Float_t Y() const { return fY;} Float_t Y() { return fY;} void SetY(Float_t y) { fY = y; } Float_t Z() const { return fZ;} Float_t Z() { return fZ;} void SetZ(Float_t z) { fZ = z; } Int_t SciBar() const { return fSciBar;} Int_t SciBar() { return fSciBar;} void SetSciBar(Int_t scibar) {fSciBar=scibar;} Int_t SciBox() const { return fSciBox;} Int_t SciBox() { return fSciBox;} void SetSciBox(Int_t scibox) {fSciBox=scibox;} Int_t SciWall() const { return fSciWall;} Int_t SciWall() { return fSciWall;} void SetSciWall(Int_t sciwall) {fSciWall=sciwall;} Int_t SciSM() const { return fSciSM;} Int_t SciSM() { return fSciSM;} void SetSciSM(Int_t scism) {fSciSM=scism;} Float_t Edep() const { return fEdep;} Float_t Edep() { return fEdep;} void SetEdep(Float_t edep) { fEdep = edep; } //JEC 4/3/03 RParticle* LocalParticle() const; RParticle* LocalParticle(); void SetLocalParticle(RParticle*& value); //JEC 4/3/03 RParticle* PrimaryParticle() const; RParticle* PrimaryParticle(); void SetPrimaryParticle(RParticle*& value); //JEC 18/3/03 RParticle* MotherParticle() const; RParticle* MotherParticle(); void SetMotherParticle(RParticle*& value); private: //index JEC 4/3/03 static Long_t nextId; Long_t fIndex; //X,Y,Z Float_t fX; Float_t fY; Float_t fZ; // Volume identification Int_t fSciBar; Int_t fSciBox; Int_t fSciWall; Int_t fSciSM; // deposited energy Float_t fEdep; //JEC 4/3/03 The Particle Informations are filled in RParticle //while there is no need to reference the event number... //Local State of the Particle that produces the hits TRef fLocalParticle; //Primary Particle JEC 4/3/03 TRef fPrimaryParticle; //Mother Particle JEC 18/3/03 TRef fMotherParticle; ClassDef(RTSCINHit,2) //Root version of Target Tracker scintillator Hit }; #endif // OPRDATA_RTSCINHIT_H ........................................................................... .LAL - IN2P3 - CNRS .LAL - B.P 34 - 91898 Orsay Cedex - France .Piece 108 .Tel +33 (0)1 64 46 84 29 .Fax +33 (0)1 64 46 83 97 ...........................................................................
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:16 MET