Changeset 2209 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
06/23/03 12:09:05 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
6 added
20 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r2205 r2209  
    11                                                 -*-*- END OF LINE -*-*-
     2
     3 2003/06/23: Thomas Bretz
     4 
     5   * manalysis/MBlindPixelCalc.[h,cc], manalysis/MCT1PadONOFF.[h,cc],
     6     manalysis/MCT1PadSchweizer.[h,cc], manalysis/MCompProbCalc.[h,cc],
     7     manalysis/MCT1PointingCorrCalc.[h,cc], manalysis/MEnergyEstimate.[h,cc],
     8     manalysis/MCT1SupercutsCalc.[h,cc], manalysis/MEnergyEstParam.[h,cc],
     9     manalysis/MFiltercutsCalc.[cc,h], manalysis/MMatrixLoop.[h,cc],
     10     manalysis/MMcPedestalCopy.[h,cc], manalysis/MMcPedestalNSBAdd.[h,cc],
     11     manalysis/MMcTriggerLvl2Calc.[h,cc], manalysis/MPadding.[h,cc],
     12     manalysis/MMultiDimDistCalc.[h,cc], manalysis/MPedCalcPedRun.[h,cc],
     13     manalysis/MPedestalCalc.[h,cc], manalysis/MPointingCorr.[h,cc],
     14     mbase/MClone.[h,cc], mbase/MGTask.[h,cc], mbase/MPrint.[h,cc],
     15     mbase/MTask.[h,cc], mbase/MTaskInteractive.[h,cc],
     16     mbase/MTaskList.[h,cc], mtools/MChisqEval.[h,cc],
     17     mbase/MContinue.[h,cc], mdatacheck/MDumpEvtHeader.[h,cc]
     18     mfileio/MCT1ReadAscii.[h,cc], mfileio/MCT1ReadPreProc.[h,cc],
     19     mfileio/MReadCurrents.[h,cc], mfileio/MReadMarsFile.[h,cc],
     20     mfileio/MReadRflFile.[h,cc], mfilter/MF.[h,cc],
     21     mfilter/MFAlpha.[h,cc], mfilter/MFCT1SelBasic.[h,cc],
     22     mfilter/MFCT1SelFinal.[h,cc], mfilter/MFCT1SelStandard.[h,cc],
     23     mfilter/MFDataChain.[h,cc], mfilter/MFDataMember.[h,cc],
     24     mfilter/MFEnergySlope.[h,cc], mfilter/MFEventSelector.[h,cc],
     25     mfilter/MFEventSelector2.[h,cc], mfilter/MFParticleId.[h,cc],
     26     mfilter/MFTriggerLvl1.[h,cc], mfilter/MFTriggerLvl2.[h,cc],
     27     mfilter/MFilterList.[h,cc], mhist/MFillH.[h,cc],
     28     mimage/MCameraSmooth.[h,cc], mimage/MHillasCalc.[h,cc],
     29     mimage/MHillasSrcCalc.[h,cc], mimage/MImgCleanStd.[h,cc],
     30     mimage/MNewImageParCalc.[h,cc], mmontecarlo/MMcThresholdCalc.[h,cc],
     31     mranforest/MRanForestCalc.[h,cc], mranforest/MRanForestFill.[h,cc]
     32     mmontecarlo/MMcTimeGenerate.[h,cc], mranforest/MRanForestGrow.[h,cc],
     33     mmontecarlo/MMcCollectionAreaCalc.[h,cc], mraw/MRawFileWrite.[h,cc],
     34     mmontecarlo/MMcTriggerRateCalc.[h,cc], mraw/MRawFileRead.[h,cc],
     35     manalysis/MSigmabarCalc.[h,cc]:
     36     - changed Bool_t in *Process to Int_t to support newer root
     37       versions correctly - PRELIMINARY (will be replaced by
     38       enums in the future)
     39       
     40   * manalysis/MCerPhotEvt.[h,cc]:
     41     - added case 3 and 4 to GetPixelContent
     42     - changed definition of GetPixelContent
     43
     44   * manalysis/MCurrents.[h,cc], manalysis/MPedestalCam.[h,cc]: 
     45     - changed definition of GetPixelContent
     46
     47   * manalysis/MFiltercutsCalc.[h,cc]:
     48     - Added list to ListOfCleanups, and set kMustCleanup for list
     49     - Set kMustCleanup for external filters
     50
     51   * mbase/MEvtLoop.[h,cc]:
     52     - added to ListOfCleanups
     53     - Set kMustCleanup for parlist, progressbar and display
     54     - added some checks for root's Batch-Mode
     55     - no need for checking ListOfSpecials for fDisplay (this is now
     56       handled through the Cleanups)
     57     - No need for kFileExit anymore (this can now be handles through
     58       the Cleanups)
     59     - added recursiveRemove to support Cleanups
     60     - added SetDisplay to set kMustCleanup for fDisplay
     61
     62   * mbase/MTaskList.cc, mdata/MDataArray.cc, mdata/MDataList.cc,
     63     mfilter/MFilterList.cc:
     64     - added lists to ListOfCleanups
     65     - Set kMustCleanup for the lists
     66     
     67   * mdatacheck/DataCheckLinkDef.h, mdatacheck/Makefile:
     68     - removed unnecessary MDumpEvtHeader
     69     
     70   * mbase/MContinue.[h,cc]:
     71     - added SetDisplay to support setting display for the filter
     72     - added SetLogStream to support setting logstream for the filter
     73     
     74   * mfilter/MFCT1SelBasic.cc, mfilter/MFCT1SelFinal.cc,
     75     mfilter/MFCT1SelStandard.cc:
     76     - added Set-function to simplify Process
     77     
     78   * mgui/MCamEvent.[h,cc]:
     79     - changed GetPixelContent definition
     80     
     81   * mhist/MH.cc:
     82     - fixed Draw(TH1&, TH1&) and DrawCopy layout for newer root versions
     83
     84   * mimage/MImgCleanStd.cc:
     85     - fixed a bug in the access to ispixused-array (GetNeighbor
     86       could exceed maximum entries.
     87       
     88   * mmain/MStatusDisplay.[h,cc]:
     89     - preliminary fixes to support root's batch mode
     90     - removed adding MStatusDisplay to ListOfCleanups
     91     - changed code updating the Canvas'
     92     - exit now handled by Cleanups, so this can be deleted immediatly
     93     
     94   * mraw/MRawEvtData.[h,cc]:
     95     - changed definition of GetPixelContent
     96     - added code to GetPixelContent
     97
     98   * mraw/MRawEvtPixelIter.[h,cc]:
     99     - returns GetNumMaxHiGainSample
     100
     101   * mreflector/MRflEvtData.[h,cc]:
     102     - use static_cast in GetPhoton
     103     - added GetPixelContent
     104
     105   * mhist/MHTriggerLvl0.[h,cc], MHmhist/Camera.[h,cc],
     106     mhist/MHCamEvent.[h,cc]:
     107     - added
     108
     109   * manalysis/MSigmabar.cc:
     110     - unimportant simplification
     111     
     112   * manalysis/MSigmabarCalc.cc:
     113     - added a preliminary workaround to support files without MMcEvt
     114     - make use of FLT_MAX
     115     
     116   * mgeom/MGeomCam.[h,cc]:
     117     - Moved fPixels from pointer to an instance
     118     - removed destructor
     119     - use static_cast on operator[]
     120     - Use ForEach macro in CheckOuterRing
     121
     122   * mhist/MHSigmaTheta.cc:
     123     - added a preliminary workaround to support files without MMcEvt
     124
     125
    2126
    3127 2003/06/19: Thomas Bretz
  • trunk/MagicSoft/Mars/manalysis/MSigmabar.cc

    r2173 r2209  
    145145        }
    146146
    147         const MGeomPix    &gpix = geom[id];
    148         const MPedestalPix &pix =  ped[id];
     147        const MGeomPix &gpix = geom[id];
    149148
    150149        Int_t sector = (Int_t)(atan2(gpix.GetY(),gpix.GetX())*6 / (TMath::Pi()*2));
     
    153152
    154153        // count only those pixels which have a sigma != 0.0
    155         const Float_t sigma = pix.GetMeanRms();
     154        const Float_t sigma = ped[id].GetMeanRms();
    156155
    157156        if ( sigma <= 0 )
  • trunk/MagicSoft/Mars/manalysis/MSigmabarCalc.cc

    r2173 r2209  
    6565}
    6666
    67 MSigmabarCalc::~MSigmabarCalc()
    68 {
    69   // nothing special yet.
    70 }
    71 
    7267// --------------------------------------------------------------------------
    7368//
     
    7570//  if not create one and add them to the list
    7671//
    77 Bool_t MSigmabarCalc::PreProcess(MParList *pList)
     72Int_t MSigmabarCalc::PreProcess(MParList *pList)
    7873{
    7974    fCam = (MGeomCam*)pList->FindObject("MGeomCam");
     
    9186    }
    9287
    93     fSig = (MSigmabar*)pList->FindCreateObj("MSigmabar");
    94     if (!fSig)
    95     {
    96         *fLog << err << "MSigmabar not found... aborting." << endl;
    97         return kFALSE;
    98     }
    99 
    100     fSigParam = (MSigmabarParam*)pList->FindCreateObj("MSigmabarParam");
    101     if (!fSigParam)
    102     {
    103         *fLog << err << "MSigmabarParam not found... aborting." << endl;
    104         return kFALSE;
    105     }
    106 
    10788    fRun = (MRawRunHeader*)pList->FindObject("MRawRunHeader");
    10889    if (!fRun)
     
    11192        return kFALSE;
    11293    }
    113    
     94
    11495    // This is needed for determining min/max Theta
    11596    fMcEvt = (MMcEvt*)pList->FindObject("MMcEvt");
    11697    if (!fMcEvt)
    117       {
    118         *fLog << err << "MMcEvt not found... aborting." << endl;
    119         return kFALSE;
    120       }
     98    {
     99        *fLog << warn << "MMcEvt not found... aborting." << endl;
     100        fThetaMin =  0;
     101        fThetaMax = 90;
     102    }
    121103
    122104    fEvt = (MCerPhotEvt*)pList->FindObject("MCerPhotEvt");
     
    126108        return kFALSE;
    127109      }
     110
     111    fSig = (MSigmabar*)pList->FindCreateObj("MSigmabar");
     112    if (!fSig)
     113        return kFALSE;
     114
     115    fSigParam = (MSigmabarParam*)pList->FindCreateObj("MSigmabarParam");
     116    if (!fSigParam)
     117        return kFALSE;
     118
    128119
    129120    return kTRUE;
     
    137128// values. Preliminary.
    138129//
    139 Bool_t MSigmabarCalc::Process()
     130Int_t MSigmabarCalc::Process()
    140131{
    141132    const Double_t rc = fSig->Calc(*fCam, *fPed, *fEvt);
    142133
    143     fSigmabarMax = TMath::Max(rc, fSigmabarMax);
    144     fSigmabarMin = TMath::Min(rc, fSigmabarMin);
     134    if (rc>fSigmabarMax) fSigmabarMax=rc;
     135    if (rc<fSigmabarMin) fSigmabarMin=rc;
     136
     137    if (!fMcEvt)
     138        return kTRUE;
    145139
    146140    const Double_t theta = fMcEvt->GetTelescopeTheta()*kRad2Deg;
    147141
    148     fThetaMax = TMath::Max(theta, fThetaMax);
    149     fThetaMin = TMath::Min(theta, fThetaMin);
     142    if (theta>fSigmabarMax) fSigmabarMax=theta;
     143    if (theta<fSigmabarMax) fSigmabarMin=theta;
    150144
    151145    return kTRUE;
     
    169163void MSigmabarCalc::Reset()
    170164{
    171     fThetaMin = 200;    // there must be a function which gives me the hightest
    172     fThetaMax = 0;      // value allowed for a certain type!
    173     fSigmabarMin = 200;
     165    if (!fMcEvt)
     166        return;
     167
     168    fThetaMin    = FLT_MAX;
     169    fThetaMax    = 0;
     170    fSigmabarMin = FLT_MAX;
    174171    fSigmabarMax = 0;
    175172}
  • trunk/MagicSoft/Mars/manalysis/MSigmabarCalc.h

    r1951 r2209  
    4848    void Reset();
    4949
     50    Int_t PreProcess(MParList *pList);
     51    Int_t Process();
     52
     53    Bool_t ReInit(MParList *pList);
     54
    5055public:
    5156    MSigmabarCalc(const char *name=NULL, const char *title=NULL);
    52     ~MSigmabarCalc();
    53 
    54     Bool_t PreProcess(MParList *pList);
    55     Bool_t ReInit(MParList *pList);
    56     Bool_t Process();
    5757
    5858    ClassDef(MSigmabarCalc, 0) // task for calculating sigmabar
  • trunk/MagicSoft/Mars/mbase/MEvtLoop.cc

    r2206 r2209  
    180180}
    181181#endif
     182
     183void MEvtLoop::SetDisplay(MStatusDisplay *d)
     184{
     185    MParContainer::SetDisplay(d);
     186    if (!d)
     187    {
     188        fProgress=NULL;
     189        return;
     190    }
     191
     192    d->SetBit(kMustCleanup);
     193    if (fParList)
     194        fParList->SetDisplay(d);
     195}
    182196
    183197// --------------------------------------------------------------------------
     
    933947
    934948    if (obj==fDisplay)
    935     {
    936         if (fParList)
    937             fParList->SetDisplay(NULL);
    938949        SetDisplay(NULL);
    939         fProgress = NULL;
    940     }
    941950
    942951    if (obj==fLog)
  • trunk/MagicSoft/Mars/mbase/MEvtLoop.h

    r2206 r2209  
    5151
    5252    MStatusDisplay *GetDisplay() { return fDisplay; }
     53    void SetDisplay(MStatusDisplay *d);
    5354
    5455    void SetOwner(Bool_t enable=kTRUE);
  • trunk/MagicSoft/Mars/mgeom/MGeomCam.cc

    r2173 r2209  
    4646using namespace std;
    4747
     48MGeomCam::MGeomCam()
     49    : fNumPixels(0), fCamDist(0), fConvMm2Deg(0)
     50{
     51}
     52
     53
     54
    4855// --------------------------------------------------------------------------
    4956//
     
    5259//
    5360MGeomCam::MGeomCam(UInt_t npix, Float_t dist, const char *name, const char *title)
    54     : fNumPixels(npix), fCamDist(dist), fConvMm2Deg(kRad2Deg/(dist*1000))
     61    : fNumPixels(npix), fCamDist(dist), fConvMm2Deg(kRad2Deg/(dist*1000)), fPixels(npix)
    5562{
    5663    fName  = name  ? name  : "MGeomCam";
    5764    fTitle = title ? title : "Storage container for  a camera geometry";
    5865
    59     fPixels = new TObjArray(npix);
    60 
    6166    //
    6267    // make sure that the destructor delete all contained objects
    6368    //
    64     fPixels->SetOwner();
     69    fPixels.SetOwner();
    6570
    6671    for (UInt_t i=0; i<npix; i++)
    67         (*fPixels)[i] = new MGeomPix;
     72        fPixels[i] = new MGeomPix;
    6873
    6974    SetReadyToSave();
    7075}
    7176
    72 // --------------------------------------------------------------------------
    73 //
    74 //  Destructor delete the pixel array with all pixels
    75 //
    76 MGeomCam::~MGeomCam()
     77MGeomPix &MGeomCam::operator[](Int_t i)
    7778{
    78     delete fPixels;
     79    return *static_cast<MGeomPix*>(fPixels.UncheckedAt(i));
     80}
     81
     82MGeomPix &MGeomCam::operator[](Int_t i) const
     83{
     84    return *static_cast<MGeomPix*>(fPixels.UncheckedAt(i));
    7985}
    8086
     
    8692void MGeomCam::InitOuterRing()
    8793{
    88     for (UInt_t i=0; i<fNumPixels; i++)
    89         (*this)[i].CheckOuterRing(*this);
     94    fPixels.ForEach(MGeomPix, CheckOuterRing)(*this);
    9095}
    9196
     
    134139    *fLog << all << " Number of Pixels (" << GetTitle() << "): " << fNumPixels << endl;
    135140
    136     for (UInt_t i=0; i<fNumPixels; i++)
    137     {
    138         *fLog << " Pixel: " << i << "  ";
    139         (*this)[i].Print();
    140     }
     141    fPixels.Print();
    141142}
    142143
  • trunk/MagicSoft/Mars/mgeom/MGeomCam.h

    r2135 r2209  
    1414{
    1515private:
    16     UInt_t   fNumPixels;  // Number of pixels in this camera
    17     Float_t  fMaxRadius;  // maximum radius of the camera (eg. for GUI layout)
     16    UInt_t    fNumPixels;  // Number of pixels in this camera
     17    Float_t   fMaxRadius;  // maximum radius of the camera (eg. for GUI layout)
    1818
    19     Float_t  fCamDist;    // [m] Average distance of the camera from the mirror
    20     Float_t  fConvMm2Deg; // conversion factor to convert mm in the camera plain into degrees
     19    Float_t   fCamDist;    // [m] Average distance of the camera from the mirror
     20    Float_t   fConvMm2Deg; // conversion factor to convert mm in the camera plain into degrees
    2121
    22     TObjArray *fPixels;   // Array of singel pixels storing the geometry
     22    TObjArray fPixels;     // Array of singel pixels storing the geometry
    2323
    2424protected:
     
    2727
    2828public:
     29    MGeomCam();
    2930    MGeomCam(UInt_t npix, Float_t dist, const char *name=NULL, const char *title=NULL);
    30     virtual ~MGeomCam();
    3131
    3232    virtual TObject *Clone(const char *newname=NULL) const;
     
    3939    Float_t GetPixRatio(UInt_t i) const;
    4040
    41     MGeomPix &operator[](Int_t i)       { return *(MGeomPix*)fPixels->UncheckedAt(i); }
    42     MGeomPix &operator[](Int_t i) const { return *(MGeomPix*)fPixels->UncheckedAt(i); }
     41    MGeomPix &operator[](Int_t i);
     42    MGeomPix &operator[](Int_t i) const;
    4343
    4444    virtual void Print(Option_t *opt=NULL) const;
  • trunk/MagicSoft/Mars/mhist/MH.cc

    r2180 r2209  
    652652    // Rename first statistics box
    653653    //
    654     TPaveStats &s1 = *(TPaveStats*)gPad->FindObject("stats");
    655     const Double_t x1 = s1.GetX1NDC()-0.01;
    656     s1.SetName((TString)"Stat"+hist1.GetTitle());
    657     s1.SetX1NDC(x1-(s1.GetX2NDC()-s1.GetX1NDC()));
    658     s1.SetX2NDC(x1);
     654    TPaveStats *s1 = (TPaveStats*)gPad->FindObject("stats");
     655    if (!s1)
     656        s1 = (TPaveStats*)hist1.GetListOfFunctions()->FindObject("stats");
     657    else
     658        s1->SetName((TString)"Stat"+hist1.GetTitle());
     659
     660    if (s1 && s1->GetX2NDC()>0.95)
     661    {
     662        const Double_t x1 = s1->GetX1NDC()-0.01;
     663        s1->SetX1NDC(x1-(s1->GetX2NDC()-s1->GetX1NDC()));
     664        s1->SetX2NDC(x1);
     665    }
    659666
    660667    //
     
    667674    // Draw Legend
    668675    //
    669     TPaveStats &s2 = *(TPaveStats*)gPad->FindObject("stats");
    670     TLegend &l = *new TLegend(s2.GetX1NDC(),
    671                               s2.GetY1NDC()-0.015-(s2.GetY2NDC()-s2.GetY1NDC())/2,
    672                               s2.GetX2NDC(),
    673                               s2.GetY1NDC()-0.01
    674                              );
    675     l.AddEntry(h1, h1->GetTitle());
    676     l.AddEntry(h2, h2->GetTitle());
    677     l.SetTextSize(s2.GetTextSize());
    678     l.SetTextFont(s2.GetTextFont());
    679     l.SetBorderSize(s2.GetBorderSize());
    680     l.SetBit(kCanDelete);
    681     l.Draw();
     676    TPaveStats *s2 = (TPaveStats*)gPad->FindObject("stats");
     677    if (!s2)
     678        s2 = (TPaveStats*)hist2.GetListOfFunctions()->FindObject("stats");
     679
     680    if (s2)
     681    {
     682        TLegend &l = *new TLegend(s2->GetX1NDC(),
     683                                  s2->GetY1NDC()-0.015-(s2->GetY2NDC()-s2->GetY1NDC())/2,
     684                                  s2->GetX2NDC(),
     685                                  s2->GetY1NDC()-0.01
     686                                 );
     687        l.AddEntry(h1, h1->GetTitle());
     688        l.AddEntry(h2, h2->GetTitle());
     689        l.SetTextSize(s2->GetTextSize());
     690        l.SetTextFont(s2->GetTextFont());
     691        l.SetBorderSize(s2->GetBorderSize());
     692        l.SetBit(kCanDelete);
     693        l.Draw();
     694    }
    682695}
    683696
     
    740753        s1->SetName((TString)"Stat"+hist1.GetTitle());
    741754
    742     if (s1)
     755    if (s1 && s1->GetX2NDC()>0.95)
    743756    {
    744757        const Double_t x1 = s1->GetX1NDC()-0.01;
  • trunk/MagicSoft/Mars/mhist/MHSigmaTheta.cc

    r2173 r2209  
    115115    fMcEvt = (MMcEvt*)plist->FindObject("MMcEvt");
    116116    if (!fMcEvt)
    117     {
    118         *fLog << err << "MMcEvt not found... aborting." << endl;
    119         return kFALSE;
    120     }
     117        *fLog << warn << "MMcEvt not found... aborting." << endl;
    121118
    122119    fPed = (MPedestalCam*)plist->FindObject("MPedestalCam");
     
    193190Bool_t MHSigmaTheta::Fill(const MParContainer *par, const Stat_t w)
    194191{
    195     Double_t theta = fMcEvt->GetTelescopeTheta()*kRad2Deg;
     192    Double_t theta = fMcEvt ? fMcEvt->GetTelescopeTheta()*kRad2Deg : 0;
    196193    Double_t mysig = fSigmabar->Calc(*fCam, *fPed, *fEvt);
    197194
  • trunk/MagicSoft/Mars/mimage/MCameraSmooth.cc

    r2173 r2209  
    6666//  - get MGeomCam from the parameter list
    6767//
    68 Bool_t MCameraSmooth::PreProcess (MParList *pList)
     68Int_t MCameraSmooth::PreProcess (MParList *pList)
    6969{
    7070    fEvt = (MCerPhotEvt*)pList->FindObject("MCerPhotEvt");
     
    8989// Do the smoothing
    9090//
    91 Bool_t MCameraSmooth::Process()
     91Int_t MCameraSmooth::Process()
    9292{
    9393    const UShort_t entries = fEvt->GetNumPixels();
  • trunk/MagicSoft/Mars/mimage/MCameraSmooth.h

    r1940 r2209  
    2323    Bool_t fUseCentralPixel;  // use also the central pixel
    2424
     25    Int_t PreProcess(MParList *pList);
     26    Int_t Process();
     27
    2528public:
    2629    MCameraSmooth(Byte_t cnt=1, const char *name=NULL, const char *title=NULL);
    2730
    2831    void SetUseCetralPixel(Bool_t b=kTRUE) { fUseCentralPixel=kTRUE; }
    29 
    30     Bool_t PreProcess(MParList *pList);
    31     Bool_t Process();
    3232
    3333    ClassDef(MCameraSmooth, 0) // task to smooth the camera contants
  • trunk/MagicSoft/Mars/mimage/MHillasCalc.cc

    r2173 r2209  
    9090// MNewImagePar, too.
    9191//
    92 Bool_t MHillasCalc::PreProcess(MParList *pList)
     92Int_t MHillasCalc::PreProcess(MParList *pList)
    9393{
    9494    // necessary
     
    147147// If the calculation wasn't sucessfull skip this event
    148148//
    149 Bool_t MHillasCalc::Process()
     149Int_t MHillasCalc::Process()
    150150{
    151151    if (TestFlag(kCalcHillas))
     
    176176//  is calculated with respect to the number of executions of this task.
    177177//
    178 Bool_t MHillasCalc::PostProcess()
     178Int_t MHillasCalc::PostProcess()
    179179{
    180180    if (GetNumExecutions()==0)
  • trunk/MagicSoft/Mars/mimage/MHillasCalc.h

    r2100 r2209  
    3737    Int_t        fFlags;
    3838
    39     Bool_t PreProcess(MParList *pList);
    40     Bool_t Process();
    41     Bool_t PostProcess();
     39    Int_t PreProcess(MParList *pList);
     40    Int_t Process();
     41    Int_t PostProcess();
    4242
    4343public:
  • trunk/MagicSoft/Mars/mimage/MHillasSrcCalc.cc

    r2173 r2209  
    7272// -------------------------------------------------------------------------
    7373//
    74 Bool_t MHillasSrcCalc::PreProcess(MParList *pList)
     74Int_t MHillasSrcCalc::PreProcess(MParList *pList)
    7575{
    7676    fHillas = (MHillas*)pList->FindObject(fHillasInput, "MHillas");
     
    103103// -------------------------------------------------------------------------
    104104//
    105 Bool_t MHillasSrcCalc::Process()
     105Int_t MHillasSrcCalc::Process()
    106106{
    107107
     
    120120//  is calculated with respect to the number of executions of this task.
    121121//
    122 Bool_t MHillasSrcCalc::PostProcess()
     122Int_t MHillasSrcCalc::PostProcess()
    123123{
    124124    if (GetNumExecutions()==0)
  • trunk/MagicSoft/Mars/mimage/MHillasSrcCalc.h

    r2004 r2209  
    2525    void StreamPrimitive(ofstream &out) const;
    2626
    27     Bool_t PreProcess(MParList *plist);
    28     Bool_t Process();
    29     Bool_t PostProcess();
     27    Int_t PreProcess(MParList *plist);
     28    Int_t Process();
     29    Int_t PostProcess();
    3030
    3131public:
  • trunk/MagicSoft/Mars/mimage/MImgCleanStd.cc

    r2173 r2209  
    316316//  Returns the maximum Pixel Id (used for ispixused in CleanStep2)
    317317//
    318 Int_t MImgCleanStd::CleanStep1Std()
     318void MImgCleanStd::CleanStep1Std()
    319319{
    320320    const Int_t entries = fEvt->GetNumPixels();
    321 
    322     Int_t max = entries;
    323321
    324322    //
     
    339337        if (entry * ratio <= fCleanLvl1 * noise)
    340338            pix.SetPixelUnused();
    341 
    342         if (id>max)
    343             max = id;
    344     }
    345 
    346     return max;
     339    }
    347340}
    348341
     
    358351//  Returns the maximum Pixel Id (used for ispixused in CleanStep2)
    359352//
    360 Int_t MImgCleanStd::CleanStep1Dem()
     353void MImgCleanStd::CleanStep1Dem()
    361354{
    362355    const Int_t entries = fEvt->GetNumPixels();
    363 
    364     Int_t max = entries;
    365356
    366357    //
     
    380371        if (entry * ratio <= fCleanLvl1 * fInnerNoise)
    381372            pix.SetPixelUnused();
    382 
    383         if (id>max)
    384             max = id;
    385     }
    386     return max;
     373    }
    387374}
    388375
     
    394381// Returns the maximum Pixel Id (used for ispixused in CleanStep2)
    395382//
    396 Int_t MImgCleanStd::CleanStep1()
     383void MImgCleanStd::CleanStep1()
    397384{
    398385   switch (fCleaningMethod)
    399386    {
    400387    case kStandard:
    401         return CleanStep1Std();
     388        CleanStep1Std();
     389        return;
    402390    case kDemocratic:
    403         return CleanStep1Dem();
    404     }
    405 
    406     return 0;
     391        CleanStep1Dem();
     392        return;
     393    }
    407394}
    408395
     
    415402//  Takes the maximum pixel id from CleanStep1 as an argument
    416403//
    417 void MImgCleanStd::CleanStep2(Int_t max)
     404void MImgCleanStd::CleanStep2()
    418405{
    419406    const Int_t entries = fEvt->GetNumPixels();
     
    425412    // (MCerPhotEvt::IsPixelUsed) all the time.
    426413    //
    427     Byte_t *ispixused = new Byte_t[max+1];
     414    Byte_t *ispixused = new Byte_t[fCam->GetNumPixels()];
    428415
    429416    for (Int_t i=0; i<entries; i++)
     
    463450            }
    464451        }
    465        
     452
    466453        if (hasNeighbor == kFALSE)
    467454            pix.SetPixelUnused();
     
    640627//  if not create one and add them to the list
    641628//
    642 Bool_t MImgCleanStd::PreProcess (MParList *pList)
     629Int_t MImgCleanStd::PreProcess (MParList *pList)
    643630{
    644631    fCam = (MGeomCam*)pList->FindObject("MGeomCam");
     
    673660// Cleans the image.
    674661//
    675 Bool_t MImgCleanStd::Process()
     662Int_t MImgCleanStd::Process()
    676663{
    677664    if (fSgb)
    678665        fInnerNoise = fSgb->GetSigmabarInner();
    679666
    680     const Int_t max = CleanStep1();
    681     CleanStep2(max);
     667    CleanStep1();
     668    CleanStep2();
    682669    CleanStep3();
    683670
  • trunk/MagicSoft/Mars/mimage/MImgCleanStd.h

    r2052 r2209  
    3838    void StreamPrimitive(ofstream &out) const;
    3939
    40     Int_t  CleanStep1Dem();
    41     Int_t  CleanStep1Std();
     40    void   CleanStep1Dem();
     41    void   CleanStep1Std();
    4242    Bool_t CleanStep3Dem(const MCerPhotPix &pix);
    4343    Bool_t CleanStep3Std(const MCerPhotPix &pix);
     
    4545    void   CleanStep4(UShort_t r, MCerPhotPix &pix);
    4646
     47    void  CleanStep1();
     48    void  CleanStep2();
     49    void  CleanStep3();
     50
     51    Int_t PreProcess(MParList *pList);
     52    Int_t Process();
     53
    4754public:
    4855    MImgCleanStd(const Float_t lvl1=3.0, const Float_t lvl2=2.5,
    4956              const char *name=NULL, const char *title=NULL);
    50 
    51     Int_t CleanStep1();
    52     void  CleanStep2(Int_t max);
    53     void  CleanStep3();
    54 
    55     Bool_t PreProcess(MParList *pList);
    56     Bool_t Process();
    57 
    5857    void Print(Option_t *o="") const;
    5958
  • trunk/MagicSoft/Mars/mimage/MNewImageParCalc.cc

    r2026 r2209  
    7272// -------------------------------------------------------------------------
    7373//
    74 Bool_t MNewImageParCalc::PreProcess(MParList *pList)
     74Int_t MNewImageParCalc::PreProcess(MParList *pList)
    7575{
    7676    fHillas = (MHillas*)pList->FindObject(fHillasInput, "MHillas");
     
    113113// -------------------------------------------------------------------------
    114114//
    115 Bool_t MNewImageParCalc::Process()
     115Int_t MNewImageParCalc::Process()
    116116{
    117117
  • trunk/MagicSoft/Mars/mimage/MNewImageParCalc.h

    r2026 r2209  
    2828    //Int_t       fErrors;
    2929
    30     Bool_t PreProcess(MParList *plist);
    31     Bool_t Process();
     30    Int_t PreProcess(MParList *plist);
     31    Int_t Process();
    3232    //Bool_t PostProcess();
    3333
Note: See TracChangeset for help on using the changeset viewer.