From ff3d1148aa769872c41e9de1b11ed564676c6b71 Mon Sep 17 00:00:00 2001 From: skowron Date: Thu, 26 Jun 2003 17:30:19 +0000 Subject: [PATCH] array size char->int --- HBTAN/AliHBTParticle.cxx | 92 +++++++++++++++++++++++++++++++++++++++- HBTAN/AliHBTParticle.h | 8 ++-- 2 files changed, 94 insertions(+), 6 deletions(-) diff --git a/HBTAN/AliHBTParticle.cxx b/HBTAN/AliHBTParticle.cxx index d203e36a37f..0a08f95bbda 100644 --- a/HBTAN/AliHBTParticle.cxx +++ b/HBTAN/AliHBTParticle.cxx @@ -1,6 +1,7 @@ //Simplified TParticle class #include "AliHBTParticle.h" #include +#include ClassImp(AliHBTParticle) @@ -205,12 +206,12 @@ void AliHBTParticle::Print() const printf("Not known\n"); } - printf("Px: %+f Py: %+f Pz: %+f E: %+f Calculated Mass: %f Vx: %+f Vy: %+f Vz: %+f T: %+f", + printf("Px: %+f Py: %+f Pz: %+f E: %+f Calculated Mass: %f\nVx: %+f Vy: %+f Vz: %+f T: %+f\n", Px(),Py(),Pz(),Energy(),GetCalcMass(),Vx(),Vy(),Vz(),T()); for (Int_t i = 0; i < fNPids; i++) { - printf("# %d PID: %d Probability %f name",i,fPids[i],fPidProb[i]); + printf("# %d PID: %d Probability %f name ",i,fPids[i],fPidProb[i]); const TParticlePDG *ap = TDatabasePDG::Instance()->GetParticle(fPids[i]); if (ap) { @@ -222,3 +223,90 @@ void AliHBTParticle::Print() const } } } + +//______________________________________________________________________________ + +//void AliHBTParticle::Streamer(TBuffer &b) +//{ +// // Stream all objects in the array to or from the I/O buffer. +// UInt_t R__s, R__c; +// Int_t i; +// if (b.IsReading()) +// { +// delete [] fPids; +// delete [] fPidProb; +// +// Version_t v = b.ReadVersion(&R__s, &R__c); +// if (v == 1) +// { +// AliHBTParticle::Class()->ReadBuffer(b, this); +// } +// else +// { +// TObject::Streamer(b); +// b >> fPdgIdx; +// b >> fIdxInEvent; +// +// b >> fNPids; +// Int_t* fPids = new Int_t[fNPids]; +// Float_t* fPidProb = new Float_t[fNPids]; +// for (i = 0;i> fPids[i]; +// } +// for (i = 0;i> fPidProb[i]; +// } +// b >> fCalcMass; +// +// b >> fPx; +// b >> fPy; +// b >> fPz; +// b >> fE; +// +// b >> fVx; +// b >> fVy; +// b >> fVz; +// b >> fVt; +// Info("Streamer","Read data"); +// Print(); +// } +// +// b.CheckByteCount(R__s, R__c,AliHBTParticle::IsA()); +// } +// else +// { +// R__c = b.WriteVersion(AliHBTParticle::IsA(), kTRUE); +// TObject::Streamer(b); +// Info("Streamer","Read data"); +// Print(); +// +// b << fPdgIdx; +// b << fIdxInEvent; +// b << fNPids; +// for (i = 0;i