Changeset 7560


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

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7559 r7560  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20 2006/03/02 Thomas Bretz
     21
     22   * callisto.cc:
     23     - get result value from pulse pos check
     24
     25   * mjobs/MJCut.[h,cc]:
     26     - added the usage of the new class MSrcPosRndm
     27     - added new resource to switch random source position on
     28
     29   * mjobs/MJPedestal.[h,cc]:
     30     - changed return code of Process to int to be able to return
     31       the pulse pos check result.
     32
     33   * mpointing/PointingLinkDef.h, mpointing/Makefile:
     34     - added MSrcPosRndm
     35
     36   * mpointing/MSrcPosRndm.[h,cc]:
     37     - added
     38
     39
     40
    2041 2006/03/02 Daniela Dorner
    2142
  • trunk/MagicSoft/Mars/callisto.cc

    r7432 r7560  
    541541        // Please check the Changelog of 2005/04/20 about further deatils of the next comment
    542542        //if (job1.GetExtractor().InheritsFrom("MExtractTimeAndCharge"))
    543         if (!job2.Process())
    544         {
     543        const Int_t rc = job2.Process();
     544        if (rc<=0)
     545        {
     546            // rc==0:  Error
     547            // rc==-1: too much to the left
     548            // rc==-2: too much to the right
     549            // rc==-3: too much to the right (beyond limits)
     550
    545551            gLog << err << "Calculation of pedestal from extrtactor (random) failed." << endl << endl;
    546552            return 2;
  • 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); }
  • trunk/MagicSoft/Mars/mpointing/Makefile

    r7553 r7560  
    3232           MSrcPosCam.cc \
    3333           MSrcPosCalc.cc \
     34           MSrcPosRndm.cc \
    3435           MSrcPosCorrect.cc \
    3536           MSrcPosFromModel.cc
  • trunk/MagicSoft/Mars/mpointing/PointingLinkDef.h

    r7553 r7560  
    1919#pragma link C++ class MSrcPosCam+;
    2020#pragma link C++ class MSrcPosCalc+;
     21#pragma link C++ class MSrcPosRndm+;
    2122#pragma link C++ class MSrcPosCorrect+;
    2223#pragma link C++ class MSrcPosFromModel+;
Note: See TracChangeset for help on using the changeset viewer.