Changeset 5725


Ignore:
Timestamp:
01/07/05 17:31:15 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
6 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r5723 r5725  
    6565     - a small acceleration discussed with Hendrik by replacing a
    6666       counter in a loop by pointer arithmetics
     67
     68   * mraw/MRawEvtPixelIter.cc:
     69     - fixed a bug in GetMaxIdxHiLoGain which caused the loop to
     70       read one byte behind the end of the array
     71
     72   * mtrigger/MTriggerPattern.[h,cc], mtrigger/MTriggerPatternDecode.[h,cc],
     73     mtrigger/MFTriggerPattern.[h,cc]:
     74     - added
     75
     76   * mtrigger/Makefile, mtrigger/TriggerLinkDef.h:
     77     - added MTriggerPattern, MTriggerPatternDecode and MFTriggerPattern
    6778
    6879
  • trunk/MagicSoft/Mars/NEWS

    r5694 r5725  
    2424
    2525   - added possibility to read a TTree stored only in memory by MReadTree
     26
     27   - new classes to deal with the interleaved calibration events:
     28     MTriggerPattern, MTriggerPatternDecode and MFTriggerPattern
    2629
    2730
  • trunk/MagicSoft/Mars/mraw/MRawEvtPixelIter.cc

    r4643 r5725  
    160160    //
    161161    Byte_t *ptr = fHiGainPos;
    162     const Byte_t *end = ptr + fNumHiGainSamples;
     162    const Byte_t *end = fHiGainPos + fNumHiGainSamples;
    163163
    164164    ULong_t sum=0;
     
    180180    //
    181181    Byte_t *ptr = fHiGainPos;
    182     const Byte_t *end = ptr + fNumHiGainSamples;
     182    const Byte_t *end = fHiGainPos + fNumHiGainSamples;
    183183
    184184    ULong_t sum=0;
     
    197197{
    198198    Byte_t *ptr = fHiGainPos;
    199     const Byte_t *end = ptr + fNumHiGainSamples;
     199    const Byte_t *end = fHiGainPos + fNumHiGainSamples;
    200200
    201201    ULong_t sum=0;
     
    219219    Byte_t *ptr = fHiGainPos+1;
    220220    Byte_t *max = fHiGainPos;
    221     const Byte_t *end = ptr + fNumHiGainSamples;
     221    const Byte_t *end = fHiGainPos + fNumHiGainSamples;
    222222
    223223    do if (*ptr>*max) max = ptr;
     
    235235Short_t MRawEvtPixelIter::GetIdxMaxLoGainSample(const Byte_t lofirst) const
    236236{
    237 
    238   if (!HasLoGain())
    239     return -1; // means: not found
    240  
    241   Byte_t *ptr = fLoGainPos+lofirst+1;
    242   Byte_t *max = fLoGainPos+lofirst;
    243   const Byte_t *end = fLoGainPos + fNumLoGainSamples;
    244        
    245   do if (*ptr>*max) max = ptr;
    246   while (++ptr != end);
    247  
    248   return max-fLoGainPos;
     237    if (!HasLoGain())
     238        return -1; // means: not found
     239
     240    Byte_t *ptr = fLoGainPos+lofirst+1;
     241    Byte_t *max = fLoGainPos+lofirst;
     242    const Byte_t *end = fLoGainPos + fNumLoGainSamples;
     243
     244    do if (*ptr>*max) max = ptr;
     245    while (++ptr != end);
     246
     247    return max-fLoGainPos;
    249248}
    250249
     
    292291Byte_t MRawEvtPixelIter::GetMaxLoGainSample() const
    293292{
    294 
    295293    Byte_t max = 0;
    296294
     
    316314
    317315    Byte_t *ptr = fLoGainPos;
    318     const Byte_t *end = ptr + fNumLoGainSamples;
     316    const Byte_t *end = fLoGainPos + fNumLoGainSamples;
    319317
    320318    ULong_t sum=0;
     
    339337
    340338    Byte_t *ptr = fLoGainPos;
    341     const Byte_t *end = ptr + fNumLoGainSamples;
     339    const Byte_t *end = fLoGainPos + fNumLoGainSamples;
    342340
    343341    ULong_t sum=0;
  • trunk/MagicSoft/Mars/mtrigger/Makefile

    r4264 r5725  
    1919#  connect the include files defined in the config.mk file
    2020#
    21 INCLUDES = -I. -I../mbase -I../mgui
     21INCLUDES = -I. -I../mbase -I../mgui -I../mraw -I../mcalib
    2222
    2323SRCFILES = MTriggerIPR.cc \
     
    2525           MTriggerBit.cc\
    2626           MTriggerPrescFact.cc\
    27            MTriggerLiveTime.cc
     27           MTriggerLiveTime.cc \
     28           MTriggerPattern.cc \
     29           MTriggerPatternDecode.cc \
     30           MFTriggerPattern.cc
    2831
    2932############################################################
  • trunk/MagicSoft/Mars/mtrigger/TriggerLinkDef.h

    r4264 r5725  
    1111#pragma link C++ class MTriggerLiveTime+;
    1212
     13#pragma link C++ class MTriggerPattern+;
     14#pragma link C++ class MTriggerPatternDecode+;
     15#pragma link C++ class MFTriggerPattern+;
     16
    1317#endif
Note: See TracChangeset for help on using the changeset viewer.