From: Flemming Videbaek (videbaek@sgs1.hirg.bnl.gov)
Date: Fri Aug 01 2003 - 13:39:45 EDT
Hi Jens Ivar, thanks for the work. Of course for internal arrays inside code you are better off IMHO by using STL e.g. like vector <Int_t> Expandable; .. expandable.push_back(next value) This way you do not have to keep track of any resizing the resize is done automaticaly and you know at any given time what it is. And the content can be any kind of object. just my few cents worth of philosophy. Flemming | Just a evening mail to inform you that I did some bug tracking after | having problems digitizing and tracking in the DCs. I especially found | some hard coded array limits, like Int_t someArr[10]. Where I found this | I replaced with TArrayI, and accordingly for Float_t and Double_t. Also | I added corresponding tests for whether the array sizes should be | incremented. | | Therefore, the general thing to learn from this is the following: | We should be more careful with array sizes and perform the necessary | tests so the there is no overflow!!!! Use of TArrayI, TArrayF, TArrayD | or other containers with similar behaviour is encouraged. | | Below is the change log. New tag and revision bump. | | Best wishes from | Jens Ivar | | ---- | | 2003-08-01 Jens Ivar Jordre <jens@rcas0032.rcf.bnl.gov> | | * configure.in: Bumping revision to 2.9.9 after DC code bug | searching. | | * modules/util/BrDriverDC.cxx: | Some general cleanup. Many cout's were replaced by Info, | Warning and Error functions. | | 2003-08-01 Flemming Videbaek, BNL, x4106 <videbaek@rcas0032.rcf.bnl.gov> | | * data/centrality/Makefile.am: Changed DICTSOURCES to component | | * data/abc/Makefile.am: fix typo | | * util/Makefile.am, packages/Makefile.am, | modules/vertex/Makefile.am, modules/util/Makefile.am, | modules/track/tpc/Makefile.am, module\s/track/dc/Makefile.am, | modules/track/combine/Makefile.am, modules/rdo/Makefile.am, | modules/raw/Makefile.am, modules/pid/Makefile.am, | modules\/io/Makefile.am, modules/evdisp/Makefile.am, | modules/digitize/Makefile.am, modules/centrality/Makefile.am, | modules/calib/zdc/Makefile.am, mod\ules/calib/vertex/Makefile.am, | modules/calib/tpc/Makefile.am, modules/calib/tof/Makefile.am, | modules/calib/td1/Makefile.am, modules/calib/mul\t/Makefile.am, | modules/calib/dc/Makefile.am, modules/calib/chkv/Makefile.am, | modules/calib/bb/Makefile.am, modules/abc/Makefile.am, | managers/\Makefile.am, db/run/Makefile.am, db/pass/Makefile.am, | db/params/Makefile.am, db/main/Makefile.am, db/geometry/Makefile.am, | db/calib/Makefile.\am, db/abc/Makefile.am, data/vertex/Makefile.am, | data/track/Makefile.am, data/rdo/Makefile.am, data/raw/Makefile.am, | data/pid/Makefile.am, da\ta/params/Makefile.am, data/geant/Makefile.am: | Changed DICTSOURCES to component | | * data/calib/Makefile.am: Chenaged DICTSOURCES to component | | * data/abc/Makefile.am: Changed DICTSOURCES to component | | 2003-08-01 Jens Ivar Jordre <jens@rcas0032.rcf.bnl.gov> | | * modules/track/dc/BrDCTrackingModule.h, | modules/track/dc/BrDCTrackingModule.cxx: | Double_t fTof1Time[100] caused overflow and was replaced by | TArrayD with proper size testing. It's initial size is 100. Some general | \cleanup, a.o. more use of Info, Error and Warning output functions | instead of cout. | | * modules/track/dc/BrDC2DTrackFinder.cxx: | Int_t idelArr[50] in CleanTracks caused overflow and was | replaced by TArrayI and proper size tests. Also BrDataTable SavedId was | not \used and therfore commented out. | | * modules/track/combine/BrFsTrackingModule.cxx: | Arrays isave and matchQsave in CheckT2T3MatchNew had static | size (=10) causing overflow in a simulation. They were replaced with | TArrayI and TArrayF, respectively, and size tests are performed. | | * modules/io/BrGeantInput.cxx: | Added test for number of volumes in ReadStreamHeader(). | | * modules/digitize/BrDigitizeDC.cxx, | modules/digitize/BrDigitizeDC.h: | The Int_t array for counting number of hits per track | experienced overflow and was replaced by TArrayI and proper expansions | if neces\sary. Some general cleanup, in particular in Init(). | SetDetectorVolume is no longer used and therfore commented out. Class | member fVolume was\ also commented out since it was identical with | fVolumes[0]. | | 2003-08-01 Flemming Videbaek, BNL, x4106 <videbaek@rcas0032.rcf.bnl.gov> | | * util/BrIostream.h: fix type | | | -- | _____________________________________________________ | ________| Jens Ivar Jřrdre |_______ | \ | Dept. of Physics Office: 521 | / | \ | Allégt 55 Phone: +47 55 58 27 92 | / | \ | 5007 Bergen Fax: +47 55 58 94 40 | / | / | Norway E-mail: jensivar.jordre@fi.uib.no | \ | / |_____________________________________________________| \ | /__________) (_________\ |
This archive was generated by hypermail 2.1.5 : Fri Aug 01 2003 - 13:38:08 EDT