From 84bb7c662a1f4f63efcc0ee92f7c9f7dfac1f196 Mon Sep 17 00:00:00 2001 From: nick Date: Mon, 3 Feb 2003 13:19:44 +0000 Subject: [PATCH] 01-feb-2003 NvE Memberfunction Info() renamed to Data() in various classes in order to prevent problems w.r.t. TObject::Info due to probable root/cint bug. 03-feb-2003 NvE File "gcclib" added to subdirectory "scripts" to provide Ralice installation script for Linux machines using gcc. Class AliObjMatrix introduced. --- RALICE/Ali3Vector.cxx | 8 +- RALICE/Ali3Vector.h | 4 +- RALICE/Ali3VectorObj.cxx | 4 +- RALICE/Ali4Vector.cxx | 6 +- RALICE/Ali4Vector.h | 4 +- RALICE/Ali4VectorObj.cxx | 4 +- RALICE/AliBoost.cxx | 20 +-- RALICE/AliBoost.h | 4 +- RALICE/AliCollider.cxx | 6 +- RALICE/AliEvent.cxx | 18 +-- RALICE/AliEvent.h | 8 +- RALICE/AliJet.cxx | 16 +-- RALICE/AliJet.h | 4 +- RALICE/AliObjMatrix.cxx | 286 ++++++++++++++++++++++++++++++++++++++ RALICE/AliObjMatrix.h | 39 ++++++ RALICE/AliPositionObj.cxx | 6 +- RALICE/AliRandom.cxx | 4 +- RALICE/AliRandom.h | 4 +- RALICE/AliSample.cxx | 18 +-- RALICE/AliSample.h | 6 +- RALICE/AliSignal.cxx | 6 +- RALICE/AliSignal.h | 4 +- RALICE/AliTrack.cxx | 26 ++-- RALICE/AliTrack.h | 4 +- RALICE/AliVertex.cxx | 22 +-- RALICE/AliVertex.h | 4 +- RALICE/RALICEHeaders.h | 1 + RALICE/RALICELinkDef.h | 1 + RALICE/history.txt | 5 + RALICE/libRALICE.pkg | 2 +- RALICE/scripts/gcclib | 27 ++++ 31 files changed, 465 insertions(+), 106 deletions(-) create mode 100644 RALICE/AliObjMatrix.cxx create mode 100644 RALICE/AliObjMatrix.h create mode 100644 RALICE/scripts/gcclib diff --git a/RALICE/Ali3Vector.cxx b/RALICE/Ali3Vector.cxx index 964216cc193..e3b3e3ed66f 100644 --- a/RALICE/Ali3Vector.cxx +++ b/RALICE/Ali3Vector.cxx @@ -44,7 +44,7 @@ // Float_t e[3]={0.03,0.5,0.21}; // a.SetVector(v,"car"); // a.SetErrors(e,"car"); -// a.Info(); +// a.Data(); // // Float_t vec[3]; // Float_t err[3]; @@ -61,7 +61,7 @@ // Float_t doterror=a.GetResultError(); // // Ali3Vector c=a.Cross(b); -// c.Info("sph"); +// c.Data("sph"); // c.GetVector(vec,"cyl"); // c.GetErrors(err,"cyl"); // @@ -408,7 +408,7 @@ void Ali3Vector::GetErrors(Float_t* e,TString f) } } /////////////////////////////////////////////////////////////////////////// -void Ali3Vector::Info(TString f) +void Ali3Vector::Data(TString f) { // Print vector components according to reference frame f if (f=="car" || f=="sph" || f=="cyl") @@ -423,7 +423,7 @@ void Ali3Vector::Info(TString f) } else { - cout << " *Ali3Vector::Info* Unsupported frame : " << f << endl + cout << " *Ali3Vector::Data* Unsupported frame : " << f << endl << " Possible frames are 'car', 'sph' and 'cyl'." << endl; } } diff --git a/RALICE/Ali3Vector.h b/RALICE/Ali3Vector.h index a47b89a9476..c5912eb26ee 100644 --- a/RALICE/Ali3Vector.h +++ b/RALICE/Ali3Vector.h @@ -24,7 +24,7 @@ class Ali3Vector virtual void GetErrors(Double_t* e,TString f); // Provide errors of vector in frame f virtual void SetErrors(Float_t* e,TString f); // Store errors of vector in frame f virtual void GetErrors(Float_t* e,TString f); // Provide errors of vector in frame f - virtual void Info(TString f="car"); // Print vector components in frame f + virtual void Data(TString f="car"); // Print vector components in frame f Double_t GetNorm(); // Provide norm of the vector Double_t Dot(Ali3Vector& q); // Provide dot product with q Double_t GetPseudoRapidity(); // Provide the pseudorapidity w.r.t z-axis @@ -46,6 +46,6 @@ class Ali3Vector Double_t fDx,fDy,fDz; // Errors on Cartesian coordinates Double_t fDresult; // Error on scalar result (e.g. norm or dotproduct) - ClassDef(Ali3Vector,1) // Handling of 3-vectors in various reference frames. + ClassDef(Ali3Vector,2) // Handling of 3-vectors in various reference frames. }; #endif diff --git a/RALICE/Ali3VectorObj.cxx b/RALICE/Ali3VectorObj.cxx index 77e72061445..76e9bdecf7b 100644 --- a/RALICE/Ali3VectorObj.cxx +++ b/RALICE/Ali3VectorObj.cxx @@ -47,8 +47,8 @@ // Ali3VectorObj vec2; // vec2.Load(add); // -// vec1.Info(); -// vec2.Info(); +// vec1.Data(); +// vec2.Data(); // //--- Author: Nick van Eijndhoven 18-oct-1999 UU-SAP Utrecht //- Modified: NvE $Date$ UU-SAP Utrecht diff --git a/RALICE/Ali4Vector.cxx b/RALICE/Ali4Vector.cxx index 869139b8a1c..ec29b812c6f 100644 --- a/RALICE/Ali4Vector.cxx +++ b/RALICE/Ali4Vector.cxx @@ -121,7 +121,7 @@ // Ali4Vector c; // c.SetVector(x0,x); // c.GetVector(vec,"car"); -// c.Info("cyl"); +// c.Data("cyl"); // c=a+b; // c=a-b; // c=a*5; @@ -471,7 +471,7 @@ void Ali4Vector::GetErrors(Float_t* e,TString f) } } /////////////////////////////////////////////////////////////////////////// -void Ali4Vector::Info(TString f) +void Ali4Vector::Data(TString f) { // Print contravariant vector components and errors according to // reference frame f and according to the current mode. @@ -494,7 +494,7 @@ void Ali4Vector::Info(TString f) } else { - cout << " *Ali4Vector::Info* Unsupported frame : " << f << endl + cout << " *Ali4Vector::Data* Unsupported frame : " << f << endl << " Possible frames are 'car', 'sph' and 'cyl'." << endl; } } diff --git a/RALICE/Ali4Vector.h b/RALICE/Ali4Vector.h index b25f3c67b47..90a3dbae4ac 100644 --- a/RALICE/Ali4Vector.h +++ b/RALICE/Ali4Vector.h @@ -34,7 +34,7 @@ class Ali4Vector virtual void GetErrors(Double_t* v,TString f); // Provide errors of vector v^i in frame f virtual void SetErrors(Float_t* v,TString f); // Store errors of vector v^i in frame f virtual void GetErrors(Float_t* v,TString f); // Provide errors of vector v^i in frame f - virtual void Info(TString f="car"); // Print contravariant components in frame f + virtual void Data(TString f="car"); // Print contravariant components in frame f Double_t Dot(Ali4Vector& q); // Provide dot product v^i*q_i Double_t GetResultError(); // Provide error on scalar result (e.g. Dot) Ali4Vector operator+(Ali4Vector& q); // Add contravariant vector q @@ -61,6 +61,6 @@ class Ali4Vector Double_t GetScaTrans(); // Provide "transverse value" of scalar part w.r.t. z-axis Double_t GetScaLong(); // Provide "longitudinal value" of scalar part w.r.t. z-axis - ClassDef(Ali4Vector,1) // Handling of Lorentz 4-vectors in various reference frames. + ClassDef(Ali4Vector,2) // Handling of Lorentz 4-vectors in various reference frames. }; #endif diff --git a/RALICE/Ali4VectorObj.cxx b/RALICE/Ali4VectorObj.cxx index 3a5fd9d678a..3489a6ca3b5 100644 --- a/RALICE/Ali4VectorObj.cxx +++ b/RALICE/Ali4VectorObj.cxx @@ -47,8 +47,8 @@ // Ali4VectorObj vec2; // vec2.Load(sub); // -// vec1.Info(); -// vec2.Info(); +// vec1.Data(); +// vec2.Data(); // //--- Author: Nick van Eijndhoven 18-oct-1999 UU-SAP Utrecht //- Modified: NvE $Date$ UU-SAP Utrecht diff --git a/RALICE/AliBoost.cxx b/RALICE/AliBoost.cxx index ebe99912216..fd3ba14fecf 100644 --- a/RALICE/AliBoost.cxx +++ b/RALICE/AliBoost.cxx @@ -30,7 +30,7 @@ // // AliBoost b1; // b1.SetBeta(beta); -// b1.Info(); +// b1.Data(); // // Float_t b[4]={14,1,2,3}; // Float_t eb[4]={1.4,0.1,0.2,0.3}; @@ -38,12 +38,12 @@ // p.SetVector(b,"car"); // p.SetErrors(eb,"car"); // Ali4Vector pprim=b1.Boost(p); -// p.Info(); -// pprim.Info(); +// p.Data(); +// pprim.Data(); // // p=b1.Inverse(pprim); -// pprim.Info(); -// p.Info(); +// pprim.Data(); +// p.Data(); // // Float_t c[4]={5,0,0,4}; // Float_t ec[4]={0.5,0,0,0.4}; @@ -53,7 +53,7 @@ // // AliBoost b2; // b2.Set4Momentum(q); -// b2.Info("sph"); +// b2.Data("sph"); // //--- Author: Nick van Eijndhoven 14-may-1996 UU-SAP Utrecht //- Modified: NvE $Date$ UU-SAP Utrecht @@ -113,7 +113,7 @@ void AliBoost::Set4Momentum(Ali4Vector& p) if (E <= 0.) { cout << " *AliBoost::Set4Momentum* Unphysical situation." << endl; - p.Info(); + p.Data(); } else { @@ -161,15 +161,15 @@ Double_t AliBoost::GetResultError() return fDresult; } /////////////////////////////////////////////////////////////////////////// -void AliBoost::Info(TString f) +void AliBoost::Data(TString f) { // Printing of the boost parameter info in coordinate frame f. Double_t beta=fBeta.GetNorm(); Double_t dbeta=fBeta.GetResultError(); - cout << " *AliBoost::Info* beta : " << beta << " error : " << dbeta + cout << " *AliBoost::Data* beta : " << beta << " error : " << dbeta << " gamma : " << fGamma << " error : " << fDgamma << endl; cout << " Beta"; - fBeta.Info(f); + fBeta.Data(f); } /////////////////////////////////////////////////////////////////////////// Ali4Vector AliBoost::Boost(Ali4Vector& v) diff --git a/RALICE/AliBoost.h b/RALICE/AliBoost.h index 535f2fa3b6c..530761b2bb1 100644 --- a/RALICE/AliBoost.h +++ b/RALICE/AliBoost.h @@ -22,7 +22,7 @@ class AliBoost : public TObject Ali3Vector GetBetaVector(); // Provide the beta 3-vector Double_t GetBeta(); // Provide norm of beta 3-vector Double_t GetGamma(); // Provide gamma value - void Info(TString f="car"); // Print boost parameter info in coord. frame f + void Data(TString f="car"); // Print boost parameter info in coord. frame f Ali4Vector Boost(Ali4Vector& v); // Perform Lorentz boost on 4-vector v Ali4Vector Inverse(Ali4Vector& v); // Perform inverse Lorentz boost on 4-vector v Double_t GetResultError(); // Provide error on scalar result @@ -33,6 +33,6 @@ class AliBoost : public TObject Double_t fDgamma; // Error on the gamma value Double_t fDresult; // Error on scalar result - ClassDef(AliBoost,1) // Perform various Lorentz transformations. + ClassDef(AliBoost,2) // Perform various Lorentz transformations. }; #endif diff --git a/RALICE/AliCollider.cxx b/RALICE/AliCollider.cxx index 668394bde34..0b6518b4d39 100644 --- a/RALICE/AliCollider.cxx +++ b/RALICE/AliCollider.cxx @@ -13,7 +13,7 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -// $Id: AliCollider.cxx,v 1.3 2002/12/02 15:10:37 nick Exp $ +// $Id: AliCollider.cxx,v 1.4 2002/12/11 14:45:12 nick Exp $ /////////////////////////////////////////////////////////////////////////// // Class AliCollider @@ -96,7 +96,7 @@ // // AliEvent* evt=gen->GetEvent(); // -// evt->Info(); +// evt->Data(); // } // // gen->EndRun(); @@ -104,7 +104,7 @@ // // //--- Author: Nick van Eijndhoven 22-nov-2002 Utrecht University -//- Modified: NvE $Date: 2002/12/02 15:10:37 $ Utrecht University +//- Modified: NvE $Date: 2002/12/11 14:45:12 $ Utrecht University /////////////////////////////////////////////////////////////////////////// #include "AliCollider.h" diff --git a/RALICE/AliEvent.cxx b/RALICE/AliEvent.cxx index 10e11feb796..4ef2b3cab35 100644 --- a/RALICE/AliEvent.cxx +++ b/RALICE/AliEvent.cxx @@ -13,7 +13,7 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -// $Id: AliEvent.cxx,v 1.8 2002/12/02 15:10:37 nick Exp $ +// $Id: AliEvent.cxx,v 1.9 2003/01/09 16:06:35 nick Exp $ /////////////////////////////////////////////////////////////////////////// // Class AliEvent @@ -157,7 +157,7 @@ // jx=v2.GetJet(2); // evt.AddJet(jx,0); // -// evt.Info("sph"); +// evt.Data("sph"); // v1.ListAll(); // v2.List("cyl"); // @@ -166,7 +166,7 @@ // Float_t loc[3]; // evt.GetPosition(loc,"sph"); // AliPosition r=v1.GetPosition(); -// r.Info(); +// r.Data(); // Int_t nt=v2.GetNtracks(); // AliTrack* tv=v2.GetTrack(1); // Access track number 1 of Vertex v2 // @@ -189,7 +189,7 @@ // Note : All quantities are in GeV, GeV/c or GeV/c**2 // //--- Author: Nick van Eijndhoven 27-may-2001 UU-SAP Utrecht -//- Modified: NvE $Date: 2002/12/02 15:10:37 $ UU-SAP Utrecht +//- Modified: NvE $Date: 2003/01/09 16:06:35 $ UU-SAP Utrecht /////////////////////////////////////////////////////////////////////////// #include "AliEvent.h" @@ -407,7 +407,7 @@ Int_t AliEvent::GetTargetId() return fIdTarg; } /////////////////////////////////////////////////////////////////////////// -void AliEvent::HeaderInfo() +void AliEvent::HeaderData() { // Provide event header information Int_t date=fDaytime.GetDate(); @@ -423,7 +423,7 @@ void AliEvent::HeaderInfo() char* c[12]={"jan","feb","mar","apr","may","jun", "jul","aug","sep","oct","nov","dec"}; - cout << " *AliEvent::Info* Run : " << fRun << " Event : " << fEvent; + cout << " *AliEvent::Data* Run : " << fRun << " Event : " << fEvent; cout.fill('0'); cout << " Date : " << setw(2) << day << "-" << c[month-1] << "-" << year << " Time : " << setw(2) << hh << ":" << setw(2) << mm << ":" << setw(2) << ss; @@ -431,11 +431,11 @@ void AliEvent::HeaderInfo() cout << " Ncalorimeters : " << fNcals << endl; } /////////////////////////////////////////////////////////////////////////// -void AliEvent::Info(TString f) +void AliEvent::Data(TString f) { // Provide event information within the coordinate frame f - HeaderInfo(); - AliVertex::Info(f); + HeaderData(); + AliVertex::Data(f); } /////////////////////////////////////////////////////////////////////////// Int_t AliEvent::GetNcalorimeters() diff --git a/RALICE/AliEvent.h b/RALICE/AliEvent.h index 33ec029691d..e147e2c1c56 100644 --- a/RALICE/AliEvent.h +++ b/RALICE/AliEvent.h @@ -3,7 +3,7 @@ /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ -// $Id: AliEvent.h,v 1.5 2002/10/28 14:41:34 nick Exp $ +// $Id: AliEvent.h,v 1.6 2002/12/02 15:10:38 nick Exp $ #include "Riostream.h" #include @@ -39,8 +39,8 @@ class AliEvent : public AliVertex TDatime GetDayTime(); // Provide the date and time stamp Int_t GetRunNumber(); // Provide the run number Int_t GetEventNumber(); // Provide the event number - void HeaderInfo(); // Print the event header information - void Info(TString f="car"); // Print the event info within coordinate frame f + void HeaderData(); // Print the event header information + void Data(TString f="car"); // Print the event info within coordinate frame f void SetCalCopy(Int_t j); // (De)activate creation of private copies in fCalorimeters Int_t GetCalCopy(); // Provide CalCopy flag value void AddCalorimeter(AliCalorimeter& c); // Add a calorimeter system to the event @@ -65,6 +65,6 @@ class AliEvent : public AliVertex TObjArray* fCalorimeters; // Array to hold the pointers to the calorimeter systems Int_t fCalCopy; // Flag to denote creation of private copies in fCalorimeters - ClassDef(AliEvent,4) // Creation and investigation of an Alice physics event. + ClassDef(AliEvent,5) // Creation and investigation of an Alice physics event. }; #endif diff --git a/RALICE/AliJet.cxx b/RALICE/AliJet.cxx index a49d10be8d0..d8bdff3c0d7 100644 --- a/RALICE/AliJet.cxx +++ b/RALICE/AliJet.cxx @@ -72,8 +72,8 @@ // tx->Reset(); // } // -// j1.Info(); -// j2.Info("sph"); +// j1.Data(); +// j2.Data("sph"); // // Float_t e1=j1.GetEnergy(); // Float_t pnorm=j1->GetMomentum(); @@ -244,20 +244,20 @@ void AliJet::AddTrack(AliTrack& t,Int_t copy) } /////////////////////////////////////////////////////////////////////////// -void AliJet::Info(TString f) +void AliJet::Data(TString f) { // Provide jet information within the coordinate frame f - cout << " *AliJet::Info* Id : " << fUserId << " Invmass : " << GetInvmass() << " Charge : " << fQ + cout << " *AliJet::Data* Id : " << fUserId << " Invmass : " << GetInvmass() << " Charge : " << fQ << " Momentum : " << GetMomentum() << " Ntracks : " << fNtrk << endl; cout << " "; - Ali4Vector::Info(f); + Ali4Vector::Data(f); } /////////////////////////////////////////////////////////////////////////// void AliJet::List(TString f) { // Provide jet and primary track information within the coordinate frame f - Info(f); // Information of the current jet + Data(f); // Information of the current jet // The tracks of this jet AliTrack* t; @@ -268,7 +268,7 @@ void AliJet::List(TString f) { cout << " ---Track no. " << it << endl; cout << " "; - t->Info(f); + t->Data(f); } else { @@ -281,7 +281,7 @@ void AliJet::ListAll(TString f) { // Provide jet and prim.+sec. track information within the coordinate frame f - Info(f); // Information of the current jet + Data(f); // Information of the current jet // The tracks of this jet AliTrack* t; diff --git a/RALICE/AliJet.h b/RALICE/AliJet.h index fc9238469df..7ed9c10159d 100644 --- a/RALICE/AliJet.h +++ b/RALICE/AliJet.h @@ -25,7 +25,7 @@ class AliJet : public TObject,public Ali4Vector void Reset(); // Reset all values void AddTrack(AliTrack& t,Int_t copy=1);// Add a track to the jet void AddTrack(AliTrack* t,Int_t copy=1) { AddTrack(*t,copy); } - void Info(TString f); // Print jet information in coordinate frame f + void Data(TString f); // Print jet information in coordinate frame f void List(TString f="car"); // Print jet prim. track information for coord. frame f void ListAll(TString f="car"); // Print jet prim. and decay track information for coord. frame f Double_t GetEnergy(); // Provide the total jet energy @@ -58,6 +58,6 @@ class AliJet : public TObject,public Ali4Vector Int_t fTrackCopy; // Flag to denote creation of private copies in fTracks Int_t fUserId; // The user defined identifier - ClassDef(AliJet,2) // Creation and investigation of a jet of particle tracks. + ClassDef(AliJet,3) // Creation and investigation of a jet of particle tracks. }; #endif diff --git a/RALICE/AliObjMatrix.cxx b/RALICE/AliObjMatrix.cxx new file mode 100644 index 00000000000..0a12ac3c477 --- /dev/null +++ b/RALICE/AliObjMatrix.cxx @@ -0,0 +1,286 @@ +/************************************************************************** + * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * * + * Author: The ALICE Off-line Project. * + * Contributors are mentioned in the code where appropriate. * + * * + * Permission to use, copy, modify and distribute this software and its * + * documentation strictly for non-commercial purposes is hereby granted * + * without fee, provided that the above copyright notice appears in all * + * copies and that both the copyright notice and this permission notice * + * appear in the supporting documentation. The authors make no claims * + * about the suitability of this software for any purpose. It is * + * provided "as is" without express or implied warranty. * + **************************************************************************/ + +// $Id$ + +/////////////////////////////////////////////////////////////////////////// +// Class AliObjMatrix +// Handling of a matrix structure of objects. +// All objects which are derived from TObject may be entered into the matrix +// structure. This means that also TObjArray objects can be entered, +// which implies an increase of the dimension of the resulting structure. +// +// Example : +// ========= +// +// AliObjMatrix* matrix=new AliObjMatrix(); +// matrix->SetOwner(); +// matrix->SetSwapMode(); +// +// Float_t pos[3]; +// +// AliSignal* s=0; +// +// s=new AliSignal(); +// s->SetSignal(135); +// pos[0]=-120.4 +// pos[1]=78.25 +// pos[3]=12.93 +// s->SetPosition(pos,"car"); +// m->EnterObject(6,21,s); +// +// s=new AliSignal(); +// s->SetSignal(25.84); +// pos[0]=68.7 +// pos[1]=-53.88 +// pos[3]=22.69 +// s->SetPosition(pos,"car"); +// m->EnterObject(8,13,s); +// +// s=new AliSignal(); +// s->SetSignal(87.25); +// pos[0]=154.8 +// pos[1]=932.576 +// pos[3]=-1382.754 +// s->SetPosition(pos,"car"); +// m->EnterObject(64,3,s); +// +// Int_t nrows=matrix->GetMaxRow(); +// Int_t ncols=matrix->GetMaxColumn(); +// +// cout << " Maxrow : " << nrows << " Maxcol : " << ncols +// << " Nobjects : " << matrix->GetNobjects() << endl; +// +// for (Int_t i=1; i<=nrows; i++) +// { +// for (Int_t j=1; j<=ncols; j++) +// { +// s=(AliSignal*)matrix->GetObject(i,j); +// if (s) cout << " At (" << i << "," << j << ") Signal : " << s->GetSignal() << endl; +// } +// } +// +//--- Author: Nick van Eijndhoven 23-jan-2003 Utrecht University +//- Modified: NvE $Date$ Utrecht University +/////////////////////////////////////////////////////////////////////////// + +#include "AliObjMatrix.h" + +ClassImp(AliObjMatrix) // Class implementation to enable ROOT I/O + +AliObjMatrix::AliObjMatrix() +{ +// Default constructor. +// Note : The owner and swap mode flags will be initialised to 0. +// See the memberfunctions SetOwner() and SetSwapMode() for further +// details. + fRows=0; + fOwn=0; + fSwap=0; + fMaxrow=0; + fMaxcol=0; + fNobjects=0; +} +/////////////////////////////////////////////////////////////////////////// +AliObjMatrix::~AliObjMatrix() +{ +// Default destructor. + if (fRows) + { + delete fRows; + fRows=0; + } +} +/////////////////////////////////////////////////////////////////////////// +void AliObjMatrix::Reset() +{ +// Reset the whole matrix structure. +// Note : The values of the owner and swap mode flags will not be modified. +// To modify the ownership, use the memberfunction SetOwner(). +// To modify the swap mode, use the memberfunction SetSwapMode(). + if (fRows) + { + delete fRows; + fRows=0; + } + + fMaxrow=0; + fMaxcol=0; + fNobjects=0; +} +/////////////////////////////////////////////////////////////////////////// +void AliObjMatrix::SetOwner(Int_t own) +{ +// Set the owner flag (0/1) for the stored objects. +// When the owner flag is set to 1, all entered objects are owned by the +// matrix structure. +// At invokation of this memberfunction the default argument is own=1. +// + fOwn=own; + + if (!fRows) return; + + for (Int_t irow=0; irowGetSize(); irow++) + { + TObjArray* mrow=(TObjArray*)fRows->At(irow); + if (mrow) + { + if (own) + { + mrow->SetOwner(kTRUE); + } + else + { + mrow->SetOwner(kFALSE); + } + } + } +} +/////////////////////////////////////////////////////////////////////////// +Int_t AliObjMatrix::GetOwner() +{ +// Provide the owner flag for the stored objects. + return fOwn; +} +/////////////////////////////////////////////////////////////////////////// +void AliObjMatrix::SetSwapMode(Int_t swap) +{ +// Set the swap mode flag (0/1) for the internal matrix storage. +// In case the number of rows differs considerably from the number of columns, +// it might be more efficient (w.r.t. memory usage and/or output file size) +// to internally store the matrix with the rows and colums swapped. +// This swapping is only related with the internal storage and as such +// is completely hidden for the user. +// At invokation of this memberfunction the default argument is swap=1. +// +// Note : The swap mode can only be set as long as no objects have +// been stored in the matrix structure (i.e. a new instance +// of AliObjMatrix or after invokation of the Reset() function). +// + if (!fRows) + { + fSwap=swap; + } + else + { + cout << " *AliObjMatrix::SetSwapMode* Matrix not empty ==> No action." << endl; + } +} +/////////////////////////////////////////////////////////////////////////// +Int_t AliObjMatrix::GetSwapMode() +{ +// Provide the swap mode flag for this matrix. + return fSwap; +} +/////////////////////////////////////////////////////////////////////////// +void AliObjMatrix::EnterObject(Int_t row,Int_t col,TObject* obj) +{ +// Enter an object to the matrix structure at location (row,col). +// In case the location already contained an object, the existing object +// will first be removed before the new object is stored. +// According to the status of the copy flag (see the SetCopy() function) +// the existing object will also be deleted. +// Note : The first location in the matrix is indicated as (1,1). + if (row<1 || col<1) + { + cout << " *AliObjMatrix::AddObject* Invalid argument(s) (row,col) : (" + << row << "," << col << ")" << endl; + return; + } + + if (row>fMaxrow) fMaxrow=row; + if (col>fMaxcol) fMaxcol=col; + + Int_t rowx=row; + if (fSwap) rowx=col; + Int_t colx=col; + if (fSwap) colx=row; + + if (!fRows) + { + fRows=new TObjArray(rowx); + fRows->SetOwner(); + } + else + { + if (rowx > fRows->GetSize()) fRows->Expand(rowx); + } + + TObjArray* mrow=(TObjArray*)fRows->At(rowx-1); + + if (!mrow) + { + TObjArray* columns=new TObjArray(colx); + if (fOwn) columns->SetOwner(); + fRows->AddAt(columns,rowx-1); + mrow=columns; + } + else + { + if (colx > mrow->GetSize()) mrow->Expand(colx); + } + + TObject* old=(TObject*)mrow->At(colx-1); + if (!old) fNobjects++; + if (old && fOwn) delete old; + + mrow->AddAt(obj,colx-1); +} +/////////////////////////////////////////////////////////////////////////// +TObject* AliObjMatrix::GetObject(Int_t row,Int_t col) +{ +// Provide a pointer to the object stored at the matrix location (row,col). +// In case no object was stored at the indicated location or the location +// would reside outside the matrix boundaries, a value 0 will be returned. +// Note : The first location in the matrix is indicated as (1,1). + + TObject* obj=0; + + if (!fRows || row<1 || col<1) return obj; + + + Int_t rowx=row; + if (fSwap) rowx=col; + Int_t colx=col; + if (fSwap) colx=row; + + TObjArray* mrow=0; + if (rowx <= fRows->GetSize()) mrow=(TObjArray*)fRows->At(rowx-1); + + if (!mrow) return obj; + + if (colx <= mrow->GetSize()) obj=(TObject*)mrow->At(colx-1); + + return obj; +} +/////////////////////////////////////////////////////////////////////////// +Int_t AliObjMatrix::GetMaxRow() +{ +// Provide the maximum row number index. + return fMaxrow; +} +/////////////////////////////////////////////////////////////////////////// +Int_t AliObjMatrix::GetMaxColumn() +{ +// Provide the maximum column number index. + return fMaxcol; +} +/////////////////////////////////////////////////////////////////////////// +Int_t AliObjMatrix::GetNobjects() +{ +// Provide the number of stored objects. + return fNobjects; +} +/////////////////////////////////////////////////////////////////////////// diff --git a/RALICE/AliObjMatrix.h b/RALICE/AliObjMatrix.h new file mode 100644 index 00000000000..c1d0728c4b9 --- /dev/null +++ b/RALICE/AliObjMatrix.h @@ -0,0 +1,39 @@ +#ifndef ALIOBJMATRIX_H +#define ALIOBJMATRIX_H +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + +// $Id$ + +#include "Riostream.h" + +#include "TObject.h" +#include "TObjArray.h" + +class AliObjMatrix : public TObject +{ + public: + AliObjMatrix(); // Default constructor + ~AliObjMatrix(); // Default destructor + virtual void Reset(); // Reset the whole matrix structure + virtual void SetOwner(Int_t own=1); // Set the owner flag for the stored objects + virtual Int_t GetOwner(); // Provide the owner flag for the stored objects + virtual void SetSwapMode(Int_t swap=1); // Set the swap mode flag for this matrix + virtual Int_t GetSwapMode(); // Provide the swap mode flag for this matrix + virtual void EnterObject(Int_t row,Int_t col,TObject* obj); // Enter an object into the matrix + virtual TObject* GetObject(Int_t row,Int_t col); // Provide an object from the matrix + virtual Int_t GetMaxRow(); // Provide the maximum row number index + virtual Int_t GetMaxColumn(); // Provide the maximum column number index + virtual Int_t GetNobjects(); // Provide the number of stored objects + + protected: + TObjArray* fRows; // Pointers to the various arrays representing the matrix rows + Int_t fOwn; // Flag to indicate whether the objects are owned by the matrix structure + Int_t fSwap; // Flag to indicate swapped mode for internal matrix storage + Int_t fMaxrow; // The maximum row number index + Int_t fMaxcol; // The maximum column number index + Int_t fNobjects; // The number of stored objects + + ClassDef(AliObjMatrix,1) // Handling of a matrix structure of objects. +}; +#endif diff --git a/RALICE/AliPositionObj.cxx b/RALICE/AliPositionObj.cxx index e5e404cc500..64b84724b5b 100644 --- a/RALICE/AliPositionObj.cxx +++ b/RALICE/AliPositionObj.cxx @@ -46,9 +46,9 @@ // rr2.Load(r2); // AliPositionObj ssum(r1+r2); // -// rr1.Info(); -// rr2.Info(); -// ssum.Info(); +// rr1.Data(); +// rr2.Data(); +// ssum.Data(); // //--- Author: Nick van Eijndhoven 18-oct-1999 UU-SAP Utrecht //- Modified: NvE $Date$ UU-SAP Utrecht diff --git a/RALICE/AliRandom.cxx b/RALICE/AliRandom.cxx index 0840d4f458e..22e54453742 100644 --- a/RALICE/AliRandom.cxx +++ b/RALICE/AliRandom.cxx @@ -69,7 +69,7 @@ // // The sequence is started at the location // // denoted by the counters cnt1 and cnt2. // -// q.Info(); // Print the current seed, cnt1 and cnt2 values. +// q.Data(); // Print the current seed, cnt1 and cnt2 values. // q.GetSeed(); // Provide the current seed value. // q.GetCnt1(); // Provide the current cnt1 value. // q.GetCnt2(); // Provide the current cnt2 value. @@ -317,7 +317,7 @@ Int_t AliRandom::GetCnt2() return fCnt2; } /////////////////////////////////////////////////////////////////////////// -void AliRandom::Info() +void AliRandom::Data() { // Print the current seed, cnt1 and cnt2 values cout << " *Random* seed = " << fSeed diff --git a/RALICE/AliRandom.h b/RALICE/AliRandom.h index 8722ec31949..5fe52fee3fc 100644 --- a/RALICE/AliRandom.h +++ b/RALICE/AliRandom.h @@ -20,7 +20,7 @@ class AliRandom : public TObject Int_t GetSeed(); // Provide current seed value Int_t GetCnt1(); // Provide current counter value cnt1 Int_t GetCnt2(); // Provide current counter value cnt2 - void Info(); // Print current seed, cnt1 and cnt2 + void Data(); // Print current seed, cnt1 and cnt2 Float_t Uniform(); // Uniform dist. within <0,1> Float_t Uniform(Float_t a,Float_t b); // Uniform dist. within void Uniform(Float_t* vec,Int_t n); // n uniform randoms in <0,1> @@ -48,6 +48,6 @@ class AliRandom : public TObject Float_t fYamin,fYamax; //! The min. and max. y values of the area function Int_t* fIbins; //! The bin numbers of the random x candidates - ClassDef(AliRandom,1) // Generate universal random numbers on all common machines. + ClassDef(AliRandom,2) // Generate universal random numbers on all common machines. }; #endif diff --git a/RALICE/AliSample.cxx b/RALICE/AliSample.cxx index 9a591e24815..cd3977c1be9 100644 --- a/RALICE/AliSample.cxx +++ b/RALICE/AliSample.cxx @@ -22,7 +22,7 @@ // whereas the "Reset" function resets the complete sample to 'empty'. // The info which can be extracted from a certain data sample are the // sum, mean, variance, sigma, covariance and correlation. -// The "Info" function provides all statistics data for a certain sample. +// The "Data" function provides all statistics data for a certain sample. // The variables for which these stat. parameters have to be calculated // are indicated by the index of the variable which is passed as an // argument to the various member functions. @@ -34,9 +34,9 @@ // the mean_x can be obtained as s.GetMean(1) whereas the mean_y is obtained // via s.GetMean(2). // The correlation between x and y is available via s.GetCor(1,2). -// The x-statistics are obtained via s.Info(1), y-statistics via s.Info(2), -// and the covariance and correlation between x and y via s.Info(1,2). -// All statistics of a sample are obtained via s.Info(). +// The x-statistics are obtained via s.Data(1), y-statistics via s.Data(2), +// and the covariance and correlation between x and y via s.Data(1,2). +// All statistics of a sample are obtained via s.Data(). // //--- Author: Nick van Eijndhoven 30-mar-1996 CERN Geneva //- Modified: NvE $Date$ UU-SAP Utrecht @@ -354,7 +354,7 @@ Float_t AliSample::GetCor(Int_t i,Int_t j) } } /////////////////////////////////////////////////////////////////////////// -void AliSample::Info() +void AliSample::Data() { // Printing of statistics of all variables for (Int_t i=0; i i) k=j; - cout << " *AliSample::Info(i,j)* Error : Dimension less than " << k << endl; + cout << " *AliSample::Data(i,j)* Error : Dimension less than " << k << endl; } else { diff --git a/RALICE/AliSample.h b/RALICE/AliSample.h index d03ee40e377..d1fef5c228c 100644 --- a/RALICE/AliSample.h +++ b/RALICE/AliSample.h @@ -30,9 +30,9 @@ class AliSample Float_t GetSigma(Int_t i); // Standard deviation for i-th variable Float_t GetCov(Int_t i, Int_t j); // Covariance for i-th and j-th variable Float_t GetCor(Int_t i, Int_t j); // Correlation for i-th and j-th variable - void Info(); // Stat. info for the complete sample - void Info(Int_t i); // Stat. info for the i-th variable - void Info(Int_t i, Int_t j); // Stat. info for i-th and j-th variable + void Data(); // Stat. info for the complete sample + void Data(Int_t i); // Stat. info for the i-th variable + void Data(Int_t i, Int_t j); // Stat. info for i-th and j-th variable private: Int_t fDim; // Dimension of the sample diff --git a/RALICE/AliSignal.cxx b/RALICE/AliSignal.cxx index 3acc80d92b2..ec4ef11cbf8 100644 --- a/RALICE/AliSignal.cxx +++ b/RALICE/AliSignal.cxx @@ -250,12 +250,12 @@ Float_t AliSignal::GetSignalError(Int_t j) } } /////////////////////////////////////////////////////////////////////////// -void AliSignal::Info(TString f) +void AliSignal::Data(TString f) { // Provide signal information within the coordinate frame f - cout << " *AliSignal::Info* For signal of kind : " << fName << endl; + cout << " *AliSignal::Data* For signal of kind : " << fName << endl; cout << " Position"; - Ali3Vector::Info(f); + Ali3Vector::Data(f); if (fSignal && fDsignal) { diff --git a/RALICE/AliSignal.h b/RALICE/AliSignal.h index 62bd7a8bab1..5fdff6d8d54 100644 --- a/RALICE/AliSignal.h +++ b/RALICE/AliSignal.h @@ -24,7 +24,7 @@ class AliSignal : public TObject,public AliPosition virtual void ResetSignals(); // Reset all signal values and errors to 0 virtual void ResetPosition(); // Reset position and errors to 0 virtual void Reset(); // Reset signal and pos. values and errors - void Info(TString f="car"); // Print signal info for coord. frame f + void Data(TString f="car"); // Print signal info for coord. frame f void SetName(TString name); // Set the name tag to indicate the kind of signal TString GetName(); // Provide the name tag indicating the kind of signal Int_t GetNvalues(); // Provide the number of signal values @@ -35,6 +35,6 @@ class AliSignal : public TObject,public AliPosition TArrayF* fDsignal; // Errors on signal values TString fName; // Name tag to identify the kind of signal - ClassDef(AliSignal,3) // Handling of ALICE (extrapolated) signals. + ClassDef(AliSignal,4) // Handling of ALICE (extrapolated) signals. }; #endif diff --git a/RALICE/AliTrack.cxx b/RALICE/AliTrack.cxx index 2739a922ac9..f520ceb2acd 100644 --- a/RALICE/AliTrack.cxx +++ b/RALICE/AliTrack.cxx @@ -36,8 +36,8 @@ // t2.SetCharge(0); // t2.SetMass(1.115); // -// t1.Info(); -// t2.Info(); +// t1.Data(); +// t2.Data(); // // Float_t pi=acos(-1.); // Float_t thcms=0.2*pi; // decay theta angle in cms @@ -268,12 +268,12 @@ void AliTrack::SetCharge(Float_t q) fQ=q; } /////////////////////////////////////////////////////////////////////////// -void AliTrack::Info(TString f) +void AliTrack::Data(TString f) { // Provide track information within the coordinate frame f Double_t m=GetMass(); Double_t dm=GetResultError(); - cout << " *AliTrack::Info* Id : " << fUserId << " Code : " << fCode + cout << " *AliTrack::Data* Id : " << fUserId << " Code : " << fCode << " Mass : " << m << " error : " << dm << " Charge : " << fQ << " Momentum : " << GetMomentum() << " Nmass hyp. : " << fNmasses << " Ntracks : " << fNdec << " Nsignals : " << fNsig << endl; @@ -283,14 +283,14 @@ void AliTrack::Info(TString f) << " error : " << fDmasses->At(i) << " prob. : " << fPmasses->At(i) << endl; } - Ali4Vector::Info(f); + Ali4Vector::Data(f); } /////////////////////////////////////////////////////////////////////////// void AliTrack::List(TString f) { // Provide current track and decay level 1 information within coordinate frame f - Info(f); // Information of the current track + Data(f); // Information of the current track // Decay products of this track AliTrack* td; @@ -300,7 +300,7 @@ void AliTrack::List(TString f) if (td) { cout << " ---Level 1 sec. track no. " << id << endl; - td->Info(f); + td->Data(f); } else { @@ -313,12 +313,12 @@ void AliTrack::ListAll(TString f) { // Provide complete track and decay information within the coordinate frame f - Info(f); // Information of the current track - cout << " Begin-point :"; fBegin.Info(f); - cout << " End-point :"; fEnd.Info(f); + Data(f); // Information of the current track + cout << " Begin-point :"; fBegin.Data(f); + cout << " End-point :"; fEnd.Data(f); for (Int_t is=1; is<=GetNsignals(); is++) { - ((AliSignal*)GetSignal(is))->Info(f); + ((AliSignal*)GetSignal(is))->Data(f); } AliTrack* t=this; @@ -335,10 +335,10 @@ void AliTrack::Dump(AliTrack* t,Int_t n,TString f) if (td) { cout << " ---Level " << n << " sec. track no. " << id << endl; - td->Info(f); + td->Data(f); for (Int_t is=1; is<=td->GetNsignals(); is++) { - ((AliSignal*)td->GetSignal(is))->Info(f); + ((AliSignal*)td->GetSignal(is))->Data(f); } // Go for next decay level of this decay track recursively diff --git a/RALICE/AliTrack.h b/RALICE/AliTrack.h index 16d18e73b5c..c879664f1bc 100644 --- a/RALICE/AliTrack.h +++ b/RALICE/AliTrack.h @@ -27,7 +27,7 @@ class AliTrack : public TObject,public Ali4Vector void SetMass(Double_t m,Double_t dm=0); // Set particle mass and error void SetMass(); // Set mass and error to mass hypothesis with highest prob. void SetCharge(Float_t q); // Set particle charge - void Info(TString f="car"); // Print track information for coord. frame f + void Data(TString f="car"); // Print track information for coord. frame f void List(TString f="car"); // Print track and decay level 1 information for coord. frame f void ListAll(TString f="car"); // Print track and all decay level information for coord. frame f Ali3Vector Get3Momentum(); // Provide track 3-momentum @@ -97,6 +97,6 @@ class AliTrack : public TObject,public Ali4Vector private: void Dump(AliTrack* t,Int_t n,TString f); // Recursively print all decay levels - ClassDef(AliTrack,2) // Handling of the attributes of a reconstructed particle track. + ClassDef(AliTrack,3) // Handling of the attributes of a reconstructed particle track. }; #endif diff --git a/RALICE/AliVertex.cxx b/RALICE/AliVertex.cxx index 44c1622aa2f..086692fe970 100644 --- a/RALICE/AliVertex.cxx +++ b/RALICE/AliVertex.cxx @@ -101,7 +101,7 @@ // Float_t r3[3]={6.2,4.8,1.3}; // v3.SetPosition(r3,"car"); // -// v1.Info("sph"); +// v1.Data("sph"); // v2.ListAll(); // v3.List("cyl"); // @@ -110,7 +110,7 @@ // Float_t loc[3]; // v1.GetPosition(loc,"sph"); // AliPosition r=v2.GetPosition(); -// r.Info(); +// r.Data(); // Int_t nt=v2.GetNtracks(); // AliTrack* tv=v2.GetTrack(1); // Access track number 1 of Vertex v2 // @@ -549,24 +549,24 @@ void AliVertex::AddVertex(AliVertex& v,Int_t connect) } } /////////////////////////////////////////////////////////////////////////// -void AliVertex::Info(TString f) +void AliVertex::Data(TString f) { // Provide vertex information within the coordinate frame f - cout << " *AliVertex::Info* Id : " << fUserId << " Invmass : " << GetInvmass() + cout << " *AliVertex::Data* Id : " << fUserId << " Invmass : " << GetInvmass() << " Charge : " << GetCharge() << " Momentum : " << GetMomentum() << " Ntracks : " << GetNtracks() << " Nvertices : " << fNvtx << " Njets : " << fNjets << endl; cout << " "; - Ali4Vector::Info(f); + Ali4Vector::Data(f); cout << " Position"; - AliPosition::Info(f); + AliPosition::Data(f); } /////////////////////////////////////////////////////////////////////////// void AliVertex::List(TString f) { // Provide primary track and sec. vertex information within the coordinate frame f - Info(f); // Information of the current vertex + Data(f); // Information of the current vertex // The tracks of this vertex AliTrack* t; @@ -577,7 +577,7 @@ void AliVertex::List(TString f) { cout << " ---Track no. " << it << endl; cout << " "; - t->Info(f); + t->Data(f); } else { @@ -594,7 +594,7 @@ void AliVertex::List(TString f) { cout << " ---Level 1 sec. vertex no. " << iv << endl; cout << " "; - v->Info(f); + v->Data(f); } else { @@ -607,7 +607,7 @@ void AliVertex::ListAll(TString f) { // Provide complete (sec) vertex and (decay) track info within the coordinate frame f - Info(f); // Information of the current vertex + Data(f); // Information of the current vertex // The tracks of this vertex AliTrack* t; @@ -641,7 +641,7 @@ void AliVertex::Dump(AliVertex* v,Int_t n,TString f) { cout << " ---Level " << n << " sec. vertex no. " << iv << endl; cout << " "; - vs->Info(f); + vs->Data(f); // The tracks of this vertex AliTrack* t; diff --git a/RALICE/AliVertex.h b/RALICE/AliVertex.h index bf8f6be058e..a0b9eacdf59 100644 --- a/RALICE/AliVertex.h +++ b/RALICE/AliVertex.h @@ -29,7 +29,7 @@ class AliVertex : public AliJet,public AliPosition void AddVertex(AliVertex& v,Int_t connect=1);// Add (and connect) a (sec.) vertex to the current vertex void AddJet(AliJet* j,Int_t tracks=1) { AddJet(*j,tracks); } void AddVertex(AliVertex* v,Int_t connect=1) { AddVertex(*v,connect); } - void Info(TString f="car"); // Print the vertex info within coordinate frame f + void Data(TString f="car"); // Print the vertex info within coordinate frame f void List(TString f="car"); // Print vertex prim. track information for coord. frame f void ListAll(TString f="car"); // Print prim. + sec. vertex full track info for coord. frame f Int_t GetNvertices(); // Return the number of (secondary) vertices @@ -65,6 +65,6 @@ class AliVertex : public AliJet,public AliPosition private: void Dump(AliVertex* v,Int_t n,TString f); // Recursively print all sec. vertices - ClassDef(AliVertex,3) // Creation and investigation of an AliVertex. + ClassDef(AliVertex,4) // Creation and investigation of an AliVertex. }; #endif diff --git a/RALICE/RALICEHeaders.h b/RALICE/RALICEHeaders.h index f7a92189106..d167985ca3c 100644 --- a/RALICE/RALICEHeaders.h +++ b/RALICE/RALICEHeaders.h @@ -29,3 +29,4 @@ #include "AliInvmass.h" #include "AliEvent.h" #include "AliCollider.h" +#include "AliObjMatrix.h" diff --git a/RALICE/RALICELinkDef.h b/RALICE/RALICELinkDef.h index 5f223c0bf08..b266f47070f 100644 --- a/RALICE/RALICELinkDef.h +++ b/RALICE/RALICELinkDef.h @@ -34,5 +34,6 @@ #pragma link C++ class AliInvmass+; #pragma link C++ class AliEvent+; #pragma link C++ class AliCollider+; + #pragma link C++ class AliObjMatrix+; #endif diff --git a/RALICE/history.txt b/RALICE/history.txt index 24a49ac1d31..70548d0b377 100644 --- a/RALICE/history.txt +++ b/RALICE/history.txt @@ -333,3 +333,8 @@ leaks in reading back AliCalorimeter objects from a data file. Also unnecessary "LoadMatrix()" statement removed in AliCalorimeter::Reset(). Irrelevant cout statement removed from AliEvent constructor. +01-feb-2003 NvE Memberfunction Info() renamed to Data() in various classes in order to + prevent problems w.r.t. TObject::Info due to probable root/cint bug. +03-feb-2003 NvE File "gcclib" added to subdirectory "scripts" to provide Ralice installation + script for Linux machines using gcc. + Class AliObjMatrix introduced. diff --git a/RALICE/libRALICE.pkg b/RALICE/libRALICE.pkg index aecb5dfb047..1f9e02dafc1 100644 --- a/RALICE/libRALICE.pkg +++ b/RALICE/libRALICE.pkg @@ -2,7 +2,7 @@ SRCS= Ali3Vector.cxx Ali4Vector.cxx AliBoost.cxx AliCalcluster.cxx \ AliCalmodule.cxx AliCalorimeter.cxx AliInvmass.cxx AliJet.cxx \ AliMath.cxx AliPosition.cxx AliRandom.cxx AliSample.cxx AliSignal.cxx \ AliTrack.cxx AliVertex.cxx Ali3VectorObj.cxx Ali4VectorObj.cxx \ - AliPositionObj.cxx AliEvent.cxx AliCollider.cxx + AliPositionObj.cxx AliEvent.cxx AliCollider.cxx AliObjMatrix.cxx HDRS= $(SRCS:.cxx=.h) diff --git a/RALICE/scripts/gcclib b/RALICE/scripts/gcclib new file mode 100644 index 00000000000..1f1fbd84b17 --- /dev/null +++ b/RALICE/scripts/gcclib @@ -0,0 +1,27 @@ +### Shell script to create a ROOT loadable GCC shared lib out of .cxx source code +### +### NvE 23-may-2000 UU-SAP Utrecht +# +### Name of the produced shared library +lib=ralice.so +# +### The option string for GCC shared lib compilation and linking *** +### For the GCC ROOT loadable shared lib the strict requirements are *** +### dropped to avoid many warnings from the rootcint generated code *** +gccroot="-shared -g0 -ansi -pedantic -Wall -I$ROOTSYS/include -o $lib" +# +echo "lib = " $lib +echo "gccroot = " $gccroot +# +### Create the dictionary files +rootcint -f zzzralicedict.cxx -c RALICEHeaders.h RALICELinkDef.h +# +### Compile and create the ROOT loadable shared library +g++ $gccroot *.cxx +# +rm zzzralicedict.* +rm *.o +#rm so_locations +# +echo ' ' +echo '*** gcclib done. Result in ralice.so' -- 2.43.0