Changeset 1548 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
10/17/02 09:33:44 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mraw
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mraw/MRawEvtPixelIter.cc

    r1082 r1548  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
    19 !
    20 !   Copyright: MAGIC Software Development, 2000-2001
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@astro.uni-wuerzburg.de>
     19!   Author(s): Markus Gaus 10/2002 <mailto:markus@ifae.es>
     20!
     21!   Copyright: MAGIC Software Development, 2000-2002
    2122!
    2223!
     
    168169// --------------------------------------------------------------------------
    169170//
     171// returns the sum of squares of all hi gain fadc sample of the actual pixel
     172//
     173ULong_t MRawEvtPixelIter::GetSumSqrHiGainSamples() const
     174{
     175    //
     176    // return the sum of the squares of the hi gain samples of the present pixel
     177    //
     178    Byte_t *ptr = fHiGainPos;
     179    const Byte_t *end = ptr + fNumHiGainSamples;
     180
     181    ULong_t sum=0;
     182
     183    do sum += (*ptr)*(*ptr);
     184    while (++ptr != end);
     185
     186    return sum;
     187}
     188
     189// --------------------------------------------------------------------------
     190//
    170191// returns the sum of all lo gain fadc samples of the actual pixel.
    171192// if no lo gain information is available 0 is returned.
     
    189210    return sum;
    190211}
     212
     213// --------------------------------------------------------------------------
     214//
     215// returns the sum of squares of all hi gain fadc sample of the actual pixel
     216//
     217ULong_t MRawEvtPixelIter::GetSumSqrLoGainSamples() const
     218{
     219    //
     220    // return the sum of the lo gain samples squares of the present pixel
     221    //
     222    if (!HasLoGain())
     223        return 0;
     224
     225    Byte_t *ptr = fLoGainPos;
     226    const Byte_t *end = ptr + fNumLoGainSamples;
     227
     228    ULong_t sum=0;
     229
     230    do sum += (*ptr)*(*ptr);
     231    while (++ptr != end);
     232
     233    return sum;
     234}
  • trunk/MagicSoft/Mars/mraw/MRawEvtPixelIter.h

    r1052 r1548  
    7878
    7979    ULong_t GetSumHiGainSamples() const;
     80    ULong_t GetSumSqrHiGainSamples() const;
    8081
    8182    Bool_t HasLoGain() const
     
    9798
    9899    ULong_t GetSumLoGainSamples() const;
    99 
     100    ULong_t GetSumSqrLoGainSamples() const;
    100101
    101102    void Reset();
Note: See TracChangeset for help on using the changeset viewer.