Ignore:
Timestamp:
03/02/06 13:24:28 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mjobs
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mjobs/MJCut.cc

    r7555 r7560  
    5555#include "MTaskEnv.h"
    5656#include "MPointingDevCalc.h"
     57#include "MSrcPosRndm.h"
    5758#include "MSrcPosCalc.h"
    5859#include "MSrcPosCorrect.h"
     
    7273#include "MPointingPos.h"
    7374#include "MObservatory.h"
     75#include "MHSrcPosCam.h"
    7476
    7577ClassImp(MJCut);
     
    427429}
    428430
    429 Bool_t MJCut::FillSrcPosCam(const MDataSet &set, MPointingPos &source)
     431Bool_t MJCut::FillSrcPosCam(const MDataSet &set, MPointingPos &source, MHSrcPosCam &hsrcpos)
    430432{
    431433    *fLog << inf;
     
    467469    set.AddFilesOn(read);
    468470
    469     MFillH fill("MHSrcPosCam", "MSrcPosCam", "FillSrcPosCam");
     471    MFillH fill(&hsrcpos, "MSrcPosCam", "FillSrcPosCam");
    470472    fill.SetNameTab("SrcPos");
    471473
    472474    // How to get source position from off- and on-data?
    473475    MSrcPosCorrect scor;
    474     MSrcPosCalc scalc;
     476    MSrcPosCalc    scalc;
    475477    scalc.SetMode(MSrcPosCalc::kDefault);
    476478
     
    538540        *fLog << all << "No source position applied..." << endl;
    539541
     542    MParList plist;
     543
     544    MHSrcPosCam hsrcpos;
    540545    if (!fIsWobble && source.IsInitialized() && fRndmSrcPos)
    541         if (!FillSrcPosCam(set, source))
     546    {
     547        if (!FillSrcPosCam(set, source, hsrcpos))
    542548            return kFALSE;
     549        plist.AddToList(&hsrcpos);
     550    }
    543551
    544552    // --------------------------------------------------------------------------------
     
    552560
    553561    // Setup Parlist
    554     MParList plist;
    555562    plist.AddToList(this); // take care of fDisplay!
    556563
     
    679686    hcalc2.SetNameSrcPosCam("MSrcPosAnti");
    680687
     688    MSrcPosRndm srcrndm;
     689
    681690    MTaskList tlist2;
    682691    tlist2.AddToList(&scalc);
    683692    tlist2.AddToList(&scor);
     693    tlist2.AddToList(&srcrndm);
    684694    tlist2.AddToList(&hcalc);
    685695    if (fIsWobble)
  • trunk/MagicSoft/Mars/mjobs/MJCut.h

    r7555 r7560  
    1313class MWriteRootFile;
    1414class MPointingPos;
     15class MHSrcPosCam;
    1516
    1617class MJCut : public MJob
     
    4849    Bool_t   CanStoreResult() const  { return !fPathOut.IsNull() && fStoreResult;  }
    4950
    50     Bool_t   FillSrcPosCam(const MDataSet &set, MPointingPos &source);
     51    Bool_t   FillSrcPosCam(const MDataSet &set, MPointingPos &source, MHSrcPosCam &srcpos);
    5152
    5253public:
  • trunk/MagicSoft/Mars/mjobs/MJPedestal.cc

    r7425 r7560  
    843843}
    844844
    845 Bool_t MJPedestal::PulsePosCheck(const MParList &plist) const
     845Int_t MJPedestal::PulsePosCheck(const MParList &plist) const
    846846{
    847847    if (fIsPixelCheck)
     
    951951    {
    952952        *fLog << err << "Pulse is too much to the left, cannot go below 0!" << endl;
    953         return kFALSE;
     953        return -1;
    954954
    955955    }
     
    959959        *fLog << numhigainsamples << "+" << numlogainsamples << "-1" << endl;
    960960        *fLog << " Cannot extract at all!" << endl;
    961         return kFALSE;
     961        return -3;
    962962    }
    963963    if (newlast+wslogain > numlogainsamples)
     
    970970        *fLog << "(ATTENTION, you will lose late cosmics pulses!)" << endl;
    971971        *fLog << endl;
    972         return kFALSE;
     972        return -2;
    973973    }
    974974
     
    986986}
    987987
    988 Bool_t MJPedestal::Process()
     988Int_t MJPedestal::Process()
    989989{
    990990    if (!fSequence.IsValid())
     
    12711271        return kFALSE;
    12721272
    1273     if (!PulsePosCheck(plist))
    1274         return kFALSE;
     1273    const Int_t rc = PulsePosCheck(plist);
     1274    if (rc<1)
     1275        return rc;
    12751276
    12761277    *fLog << all << GetDescriptor() << ": Done." << endl;
  • trunk/MagicSoft/Mars/mjobs/MJPedestal.h

    r7125 r7560  
    104104    const Bool_t IsUseData() const { return fExtractType == kUseData; }
    105105
    106     Bool_t Process();
     106    Int_t Process();
    107107
    108108    void SetBadPixels(const MBadPixelsCam &bad) { bad.Copy(fBadPixels); }
Note: See TracChangeset for help on using the changeset viewer.