From 0e88acc204b2720b3a982644e2f375d3d7677987 Mon Sep 17 00:00:00 2001 From: jchudoba Date: Thu, 18 Oct 2001 14:44:09 +0000 Subject: [PATCH] Define constant MAXTRACKS for maximum number of tracks associated with 1 digit --- MUON/AliMUONDigit.cxx | 5 ++++- MUON/AliMUONDigit.h | 6 ++++-- MUON/AliMUONDigitizer.cxx | 23 ++++++++++++++--------- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/MUON/AliMUONDigit.cxx b/MUON/AliMUONDigit.cxx index 7f2ee3cc457..8b30a9737d9 100644 --- a/MUON/AliMUONDigit.cxx +++ b/MUON/AliMUONDigit.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.3 2001/01/26 21:26:58 morsch +All data members private. Access functions provided. + Revision 1.2 2000/06/15 07:58:48 morsch Code from MUON-dev joined @@ -53,7 +56,7 @@ AliMUONDigit::AliMUONDigit(Int_t *tracks, Int_t *charges, Int_t *digits) fPhysics = digits[4]; fHit = digits[5]; - for(Int_t i=0; i<10; i++) { + for(Int_t i=0; i +#define MAXTRACKS 10 + class AliMUONDigit : public TObject { public: @@ -31,8 +33,8 @@ class AliMUONDigit : public TObject { Int_t fCathode; // Cathode number Int_t fSignal; // Signal amplitude - Int_t fTcharges[10]; // charge per track making this digit (up to 10) - Int_t fTracks[10]; // primary tracks making this digit (up to 10) + Int_t fTcharges[MAXTRACKS]; // charge per track making this digit (up to 10) + Int_t fTracks[MAXTRACKS]; // primary tracks making this digit (up to 10) Int_t fPhysics; // physics contribution to signal Int_t fHit; // hit number - temporary solution diff --git a/MUON/AliMUONDigitizer.cxx b/MUON/AliMUONDigitizer.cxx index 0cb7e0a6ab1..78f144c26b5 100644 --- a/MUON/AliMUONDigitizer.cxx +++ b/MUON/AliMUONDigitizer.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.3 2001/10/04 20:01:54 jchudoba +changes for TTask implementation, some other small editing + Revision 1.2 2001/07/28 10:46:04 hristov AliRunDigitizer.h included; typos corrected @@ -22,7 +25,6 @@ Revision 1.1 2001/07/27 15:41:01 jchudoba merging/digitization classes */ - #include #include #include @@ -319,8 +321,8 @@ void AliMUONDigitizer::Exec(Option_t* option) } // end file loop if (GetDebug()>2) cerr<<"END OF FILE LOOP"<GetEntriesFast(); for (Int_t nent = 0; nent < nentries; nent++) { @@ -348,12 +350,15 @@ void AliMUONDigitizer::Exec(Option_t* option) // this was changed to accomodate the real number of tracks - if (nptracks > 10 && GetDebug() >0) { - cerr<<"Attention - nptracks > 10 "< MAXTRACKS) { + if (GetDebug() >0) { + cerr<<"AliMUONDigitizer: nptracks > 10 "< 2 && GetDebug() >2) { - cerr<<"Attention - nptracks > 2 "< 2 "< 1) { SortTracks(tracks,charges,nptracks); } - if (nptracks < 10 ) { - for (Int_t i = nptracks; i < 10; i++) { + if (nptracks < MAXTRACKS ) { + for (Int_t i = nptracks; i < MAXTRACKS; i++) { tracks[i] = 0; charges[i] = 0; } -- 2.39.3