]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
array size char->int
authorskowron <skowron@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 26 Jun 2003 17:30:19 +0000 (17:30 +0000)
committerskowron <skowron@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 26 Jun 2003 17:30:19 +0000 (17:30 +0000)
HBTAN/AliHBTParticle.cxx
HBTAN/AliHBTParticle.h

index d203e36a37ffe18477317ae8d36226064737a0e5..0a08f95bbda2152b20fdb9605be56ff6fda8c61e 100644 (file)
@@ -1,6 +1,7 @@
 //Simplified TParticle class
 #include "AliHBTParticle.h"
 #include <TParticle.h>
+#include <TClass.h>
 
 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<fNPids;i++) 
+//         {
+//           b >> fPids[i];
+//         }
+//        for (i = 0;i<fNPids;i++) 
+//        {
+//          b >> 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<fNPids;i++) 
+//      {
+//        b << fPids[i];
+//      }
+//      {
+//      {
+//     for (i = 0;i<fNPids;i++) 
+//     {
+//        b << fPidProb[i];
+//      }
+//     b << fCalcMass;
+//
+//     b << fPx;
+//     b << fPy;
+//     b << fPz;
+//     b << fE;
+//
+//     b << fVx;
+//     b << fVy;
+//     b << fVz;
+//     b << fVt;
+//
+//    b.SetByteCount(R__c, kTRUE);
+//   }
+//}
index 8a18309be72e862ccffa855dd227d50903c95daa..af8df9136d0be9131d9a65b5951aa1e678c92f54 100644 (file)
@@ -106,9 +106,9 @@ private:
   Char_t         fPdgIdx;               // index of PDG code of the particle in fPids
   Int_t          fIdxInEvent;           // index of a particle: the same particle can appear in the event
                                         //  many times with different pid's. Idx allows to check that they are the same particles
-  Char_t         fNPids;                // number of non-zero proboble Pids
-  Int_t         *fPids;                 //[fNPids]
-  Float_t       *fPidProb;              //[fNPids]
+  Int_t          fNPids;                // number of non-zero proboble Pids
+  Int_t         *fPids;                 // [fNPids] Array with PIDs
+  Float_t       *fPidProb;              // [fNPids] PIDs probabilities
   Double_t       fCalcMass;             // Calculated mass
 
   Double_t       fPx;                   // x component of momentum
@@ -121,7 +121,7 @@ private:
   Double_t       fVz;                   // z of production vertex
   Double_t       fVt;                   // t of production vertex
 
-  ClassDef(AliHBTParticle,1)  // TParticle vertex particle information
+  ClassDef(AliHBTParticle,2)  // TParticle vertex particle information
 };
 
 #endif