From: fca Date: Wed, 3 Nov 1999 13:17:09 +0000 (+0000) Subject: Have ProdProcess return const char* X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=6a935c13791b349da5aec8aebee1b3d50a3e60e3;p=u%2Fmrichter%2FAliRoot.git Have ProdProcess return const char* --- diff --git a/GEODB/AliGEODB.cxx b/GEODB/AliGEODB.cxx index be71e8b8cc2..8720aa53e2c 100644 --- a/GEODB/AliGEODB.cxx +++ b/GEODB/AliGEODB.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.2 1999/09/29 09:24:19 fca +Introduction of the Copyright and cvs Log + */ ////////////////////////////////////////////////////// @@ -270,9 +273,10 @@ Int_t AliGEODB::NSecondaries() const /***********************************************************************/ -void AliGEODB::ProdProcess(char*) const +const char* AliGEODB::ProdProcess() const { cout << " ProdProcess" << endl; + return 0; } /***********************************************************************/ diff --git a/GEODB/AliGEODB.h b/GEODB/AliGEODB.h index e803739235b..2218573d206 100644 --- a/GEODB/AliGEODB.h +++ b/GEODB/AliGEODB.h @@ -53,7 +53,7 @@ public: Bool_t TrackAlive() const; Int_t NSecondaries() const; Int_t CurrentEvent() const; - void ProdProcess(char*) const; + const char* ProdProcess() const; void GetSecondary(Int_t, Int_t&, Float_t*, Float_t*); void StopTrack(); void StopEvent(); diff --git a/MUON/AliMUON.cxx b/MUON/AliMUON.cxx index 4ed898caf3b..704e7f77922 100644 --- a/MUON/AliMUON.cxx +++ b/MUON/AliMUON.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.13 1999/10/26 06:04:48 fca +Introduce TLorentzVector in AliMC::GetSecondary. Thanks to I.Hrivnacova + Revision 1.12 1999/10/07 21:08:10 fca Corrections by G.Chabratova @@ -633,10 +636,10 @@ void AliMUON::StepManager() Int_t nsec, ipart; TLorentzVector x, p; Float_t pt, th0, th2; - char proc[5]; + char *proc; if(fAccCut) { if((nsec=gMC->NSecondaries())>0) { - gMC->ProdProcess(proc); + proc=gMC->ProdProcess(); if((gMC->TrackPid()==443 || gMC->TrackPid()==553) && !strcmp(proc,"DCAY")) { // // Check angular acceptance diff --git a/RICH/AliRICH.cxx b/RICH/AliRICH.cxx index c55f3efc15a..2470a33a0aa 100644 --- a/RICH/AliRICH.cxx +++ b/RICH/AliRICH.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.13 1999/10/26 06:04:49 fca +Introduce TLorentzVector in AliMC::GetSecondary. Thanks to I.Hrivnacova + Revision 1.12 1999/09/29 09:24:29 fca Introduction of the Copyright and cvs Log @@ -442,10 +445,10 @@ void AliRICH::StepManager() Int_t nsec, ipart; TLorentzVector x, p; Float_t pt, th0, th1; - char proc[5]; + const char *proc; if(fAccCut) { if((nsec=gMC->NSecondaries())>0) { - gMC->ProdProcess(proc); + proc=gMC->ProdProcess(); if((gMC->TrackPid()==113 || gMC->TrackPid()==114) && !strcmp(proc,"DCAY")) { // Check angular acceptance diff --git a/STEER/AliMC.h b/STEER/AliMC.h index 42e6251784c..7d16c2e418f 100644 --- a/STEER/AliMC.h +++ b/STEER/AliMC.h @@ -56,7 +56,7 @@ public: virtual Bool_t IsTrackAlive() const=0; virtual Int_t NSecondaries() const=0; virtual Int_t CurrentEvent() const=0; - virtual void ProdProcess(char*) const=0; + virtual const char* ProdProcess() const=0; virtual void GetSecondary(Int_t, Int_t&, TLorentzVector&, TLorentzVector&)=0; virtual void StopTrack() =0; virtual void StopEvent() =0; diff --git a/TGeant3/TGeant3.cxx b/TGeant3/TGeant3.cxx index bfb46d9cf21..3c65eeb033a 100644 --- a/TGeant3/TGeant3.cxx +++ b/TGeant3/TGeant3.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.15 1999/10/26 06:04:50 fca +Introduce TLorentzVector in AliMC::GetSecondary. Thanks to I.Hrivnacova + Revision 1.14 1999/09/29 09:24:30 fca Introduction of the Copyright and cvs Log @@ -1156,12 +1159,13 @@ Int_t TGeant3::CurrentEvent() const } //_____________________________________________________________________________ -void TGeant3::ProdProcess(char* proc) const +const char* TGeant3::ProdProcess() const { // // Name of the process that has produced the secondary particles // in the current step // + static char proc[5]; const Int_t ipmec[13] = { 5,6,7,8,9,10,11,12,21,23,25,105,108 }; Int_t mec, km, im; // @@ -1176,12 +1180,13 @@ void TGeant3::ProdProcess(char* proc) const strncpy(proc,(char *)&fGctpol->namec1[mec - 101],4); } proc[4]='\0'; - return; + return proc; } } } strcpy(proc,"UNKN"); } else strcpy(proc,"NONE"); + return proc; } //_____________________________________________________________________________ diff --git a/TGeant3/TGeant3.h b/TGeant3/TGeant3.h index 01a85d5fbde..87ba5db8f22 100644 --- a/TGeant3/TGeant3.h +++ b/TGeant3/TGeant3.h @@ -577,10 +577,10 @@ public: Bool_t IsTrackDisappeared() const; Bool_t IsTrackStop() const; Bool_t IsTrackAlive() const; - Int_t NSecondaries() const; - Int_t CurrentEvent() const; - void ProdProcess(char*) const; - void GetSecondary(Int_t, Int_t&, TLorentzVector&, TLorentzVector&); + Int_t NSecondaries() const; + Int_t CurrentEvent() const; + const char* ProdProcess() const; + void GetSecondary(Int_t, Int_t&, TLorentzVector&, TLorentzVector&); void StopTrack(); void StopEvent(); Float_t MaxStep() const; diff --git a/TGeant3/TGeant3Dummy.cxx b/TGeant3/TGeant3Dummy.cxx index 370fe22d313..1f9e816e899 100644 --- a/TGeant3/TGeant3Dummy.cxx +++ b/TGeant3/TGeant3Dummy.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.12 1999/11/02 17:05:06 fca +Update GetSecondary arguments + Revision 1.11 1999/09/29 09:24:31 fca Introduction of the Copyright and cvs Log @@ -72,7 +75,7 @@ Bool_t TGeant3::IsTrackOut() const {return 0;} Bool_t TGeant3::IsTrackDisappeared() const {return 0;} Bool_t TGeant3::IsTrackStop() const {return 0;} Int_t TGeant3::NSecondaries() const {return 0;} -void TGeant3::ProdProcess(char*) const {} +const char* TGeant3::ProdProcess() const {} void TGeant3::GetSecondary(Int_t, Int_t&, TLorentzVector&, TLorentzVector&){} Float_t TGeant3::MaxStep() const {return 0;} diff --git a/TGeant3/gucode.cxx b/TGeant3/gucode.cxx index 0e924e2162c..46e9869b114 100644 --- a/TGeant3/gucode.cxx +++ b/TGeant3/gucode.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.9 1999/09/29 09:24:31 fca +Introduction of the Copyright and cvs Log + */ #include "AliCallf77.h" @@ -487,7 +490,7 @@ void gustep() Int_t ipp, jk, id, nt; Float_t polar[3]={0,0,0}; Float_t mom[3]; - char chproc[11]; + const char *chproc; // --- Standard GEANT debug routine TGeant3* geant3 = (TGeant3*) gMC; @@ -501,7 +504,7 @@ void gustep() } // --- Add new created particles if (gMC->NSecondaries() > 0) { - gMC->ProdProcess(chproc); + chproc=gMC->ProdProcess(); for (jk = 0; jk < geant3->Gcking()->ngkine; ++jk) { ipp = Int_t (geant3->Gcking()->gkin[jk][4]+0.5); // --- Skip neutrinos!