Changeset 4648


Ignore:
Timestamp:
08/17/04 13:31:40 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r4647 r4648  
    5959       leak which resulted in huge memory usage when reading
    6060       MRawEvtData
     61     - changed version number from 4 to 5
     62     - changed size of fABFlag array to a more reasonable size
     63       (maxid/8+1)
     64
     65   * mraw/MRawEvtHeader.[h,cc]:
     66     - implemeted Getter for calibration pattern
    6167
    6268   * mhbase/MHMatrix.[h,cc], mranforest/MRanTree.cc,
    6369     mtools/MHSimmulatedAnnealing.h, mtools/MSimmulatedAnnealing.h:
    6470     - changed to compile with root-4.00/08
     71
     72   * mpedestal/MPedCalcFromLoGain.[h,cc]:
     73     - changed SetDumpEvents to SetNumEventsDump to fit roots naming
     74       convention
     75     - fixed crashes in case nothing has beendone
     76     - do not process abflag if it is not existing
     77     - for the moment do no call to ReCalc in Process
     78     - added some const-qualifiers
     79
     80   * mhist/MHCamera.h:
     81     - changed the definition of FetMinimum/GetMaximum such that
     82       it compiles with root 4.00/08
    6583
    6684
  • trunk/MagicSoft/Mars/mhist/MHCamera.h

    r4430 r4648  
    167167    Double_t GetMaximum(Bool_t all) const { return GetMaximumSectors(TArrayI(), TArrayI(), all); }
    168168
    169     Double_t GetMinimum() const { return GetMinimumSectors(TArrayI(), TArrayI(), kFALSE); }
    170     Double_t GetMaximum() const { return GetMaximumSectors(TArrayI(), TArrayI(), kFALSE); }
     169    Double_t GetMinimum(Double_t gt=0) const { return GetMinimumSectors(TArrayI(), TArrayI(), kFALSE); } // FIXME: To be done: Minimum greater than
     170    Double_t GetMaximum(Double_t lt=0) const { return GetMaximumSectors(TArrayI(), TArrayI(), kFALSE); } // FIXME: To be done: Maximum lower than
    171171
    172172    Double_t GetMinimumSector(Int_t sector, Int_t aidx, Bool_t all=kFALSE) const
  • trunk/MagicSoft/Mars/mpedestal/MPedCalcFromLoGain.cc

    r4609 r4648  
    357357        return kFALSE;
    358358
     359    if (fNumEventsDump<=0 && fPedestalUpdate)
     360    {
     361        *fLog << warn << "Pedestal Update switched on and Number of Events to dump <= 0... fNumEventsDump=1000" << endl;
     362        fNumEventsDump=1000;
     363    }
     364
    359365    return kTRUE;
    360366}
     
    518524        // Calculate the amplitude of the 150MHz "AB" noise
    519525
    520         Int_t abFlag = (fRunHeader->GetNumSamplesHiGain()
    521                         + fLoGainFirst
    522                         + pixel.HasABFlag()) & 0x1;
    523         for (Int_t islice=0; islice<fWindowSizeLoGain; islice+=2)
     526        if (pixel.IsABFlagValid())
    524527        {
    525             Int_t sliceAB0 = islice + abFlag;
    526             Int_t sliceAB1 = islice - abFlag + 1;
    527             fSumAB0[idx] += firstSlice[sliceAB0];
    528             fSumAB1[idx] += firstSlice[sliceAB1];
     528            const Int_t abFlag = (fRunHeader->GetNumSamplesHiGain()
     529                                  + fLoGainFirst + pixel.HasABFlag()) & 0x1;
     530            for (Int_t islice=0; islice<fWindowSizeLoGain; islice+=2)
     531            {
     532                const Int_t sliceAB0 = islice + abFlag;
     533                const Int_t sliceAB1 = islice - abFlag + 1;
     534                fSumAB0[idx] += firstSlice[sliceAB0];
     535                fSumAB1[idx] += firstSlice[sliceAB1];
     536            }
    529537        }
    530538
     
    543551    if (fPedestalUpdate)
    544552    {
    545         fPedestals->ReCalc(*fGeom);
     553        //fPedestals->ReCalc(*fGeom);
    546554        fPedestals->SetReadyToSave();
    547555    }
     
    606614    if (IsEnvDefined(env, prefix, "NumEventsDump", print))
    607615    {
    608         SetDumpEvents(GetEnvValue(env, prefix, "NumEventsDump", fNumEventsDump));
     616        SetNumEventsDump(GetEnvValue(env, prefix, "NumEventsDump", fNumEventsDump));
    609617        rc = kTRUE;
    610618    }
  • trunk/MagicSoft/Mars/mpedestal/MPedCalcFromLoGain.h

    r4609 r4648  
    6565    void SetWindowSize(Byte_t windowh=fgHiGainWindowSize, Byte_t windowl=fgLoGainWindowSize);
    6666    void SetMaxHiGainVar(Byte_t maxvar=fgMaxHiGainVar);
    67     void SetDumpEvents(UInt_t dumpevents = 0) {fNumEventsDump = dumpevents;}
     67    void SetNumEventsDump(UInt_t dumpevents = 0) { fNumEventsDump = dumpevents; }
    6868    void SetPedestalUpdate(Bool_t pedupdate)  {fPedestalUpdate = pedupdate;}
    6969
  • trunk/MagicSoft/Mars/mraw/MRawEvtData.cc

    r4576 r4648  
    4747//
    4848//
    49 //   Version 3:
    50 //   ----------
     49//   Version 5 (0.8.5):
     50//   ------------------
     51//    - Changed type of ABFlags from TArrayC to MArrayB
     52//
     53//   Version 4 (0.8.4):
     54//   ------------------
     55//    - Changed derivement from MCamEvent to MParContainer and MCamEvent
     56//
     57//   Version 3 (0.8.4):
     58//   ------------------
    5159//    - Added fABFlags
    5260//
     
    397405    if (flag && fRunHeader)
    398406    {
    399         //const int npix = fRunHeader->GetNumCrates()*fRunHeader->GetNumPixInCrate();
    400407        const int npix = fRunHeader->GetNumConnectedPixels();
    401408
     
    404411        fHiGainFadcSamples = new MArrayB(npix*fRunHeader->GetNumSamplesHiGain());
    405412        fLoGainFadcSamples = new MArrayB(npix*fRunHeader->GetNumSamplesLoGain());
    406         fABFlags           = new TArrayC(fRunHeader->GetMaxPixId());
     413        fABFlags           = new MArrayB(fRunHeader->GetMaxPixId()/8+1);
    407414
    408415        fArraySize  = npix;
     
    414421        fHiGainFadcSamples = new MArrayB(0);
    415422        fLoGainFadcSamples = new MArrayB(0);
    416         fABFlags           = new TArrayC(0);
     423        fABFlags           = new MArrayB(0);
    417424
    418425        fArraySize = 0;
     
    495502        const UShort_t ipos = npos+i;
    496503
     504        // Get Hardware Id
     505        const Short_t hwid = fRunHeader->GetPixAssignment(ipos);
     506
     507        // Check whether the pixel is connected or not
     508        if (hwid<=0)
     509            continue;
     510
    497511        // -1 converts the hardware pixel Id into the software pixel index
    498         const Int_t npix = (Int_t)fRunHeader->GetPixAssignment(ipos)-1;
    499 
    500         // Check whether the pixel is connected or not
    501         if (npix<0)
    502             continue;
     512        const Int_t npix = /*hwid>0 ?*/ (Int_t)hwid-1 /*: hwid*/;
    503513
    504514        //
  • trunk/MagicSoft/Mars/mraw/MRawEvtData.h

    r4577 r4648  
    3535    MArrayB *fLoGainFadcSamples;  //-> list of lo gain samples of all pixels (ordering: see fLoGainPixId)
    3636
    37     TArrayC *fABFlags;            //-> A information about the exact trigger position
     37    MArrayB *fABFlags;            //-> A information about the exact trigger position
    3838
    3939    Int_t fPosInArray;        //!
     
    8989        ;
    9090
    91     ClassDef(MRawEvtData, 4) //Container to store the raw Event Data
     91    ClassDef(MRawEvtData, 5) //Container to store the raw Event Data
    9292};
    9393
  • trunk/MagicSoft/Mars/mraw/MRawEvtHeader.cc

    r4609 r4648  
    399399}
    400400
     401UInt_t MRawEvtHeader::GetCalibrationPattern() const
     402{
     403    return fTrigPattern[1];
     404}
     405/*
    401406// --------------------------------------------------------------------------
    402407//
     
    425430    return (CalibCol_t)((fTrigPattern[1]<<24)&0xf);
    426431}
     432*/
  • trunk/MagicSoft/Mars/mraw/MRawEvtHeader.h

    r4609 r4648  
    2525        kTTCalibration = 2
    2626    };
    27 
     27/*
    2828    enum CalibCol_t {
    2929        kColRed   = BIT(0),
     
    3333        kColUV    = BIT(4)
    3434    };
    35 
     35 */
    3636private:
    3737    MTime   *fTime;            //! object to store the time in (ReadEvt)
     
    7474   
    7575    UInt_t     GetTriggerID() const;
    76 
     76    UInt_t     GetCalibrationPattern() const;
     77/*
    7778    UShort_t   GetPulserSlotPattern() const;
    7879    Byte_t     GetPowerOfContLight() const;
    7980    CalibCol_t GetContLedColor() const;
    80 
     81 */
    8182    Int_t ReadEvt(istream& fin, UShort_t ver);
    8283    void  SkipEvt(istream& fin, UShort_t ver);
Note: See TracChangeset for help on using the changeset viewer.