Changeset 8442


Ignore:
Timestamp:
04/24/07 15:28:08 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8437 r8442  
    1919                                                 -*-*- END OF LINE -*-*-
    2020
     21 2007/04/24 Thomas Bretz
     22
     23   * callisto_Dec04Jan05.rc, callisto_MarApr05.rc, callisto_mux.rc:
     24     - fixed typos in examples for movie encoding
     25
     26   * mjobs/MJCalib.h, mjobs/MJPedestal.cc:
     27     - missing commit from yesterday :-(
     28
     29   * mmovie/MMovieWrite.cc:
     30     - changed resource Filename according to the other resources
     31       to FileName
     32
     33   * ganymed.cc:
     34     - enable dataset mc-mode if "-mc" is specified
     35     - removed obsolete call to EnableMonteCarloMode
     36     - removed EnableWobbleMode but use the setting of the dataset
     37       instead
     38
     39   * mjobs/MDataSet.[h,cc]:
     40     - renamed fIsWobbleMode to fWobbleMode
     41     - added setter for fWobbleMode
     42     - added fMonteCarlo which determins the default paths to be used
     43       if not overwritten
     44     - replaced the static variables for the paths by member functions
     45       which depend on the new fWobbleMode data member
     46     - some simple reordering inthe constructor was necessary
     47     - increased class version number accordingly to 2
     48
     49   * mjobs/MJCut.[h,cc]:
     50     - repaired On-only mode
     51     - removed data member fIsMonteCarlo, use the data-set getter instead
     52     - removed data member fIsWobbleMode, use the data-set getter instead
     53
     54   * sponde.cc:
     55     - print a warning if MC dataset doens't contain "MonteCarlo: Yes"
     56
     57
     58
    2159 2007/04/23 Thomas Bretz
    2260
  • trunk/MagicSoft/Mars/NEWS

    r8436 r8442  
    5656     helps to get rid of artefacts in histograms. For the signal this
    5757     is not necessray because it is displayed in log-scale anyhow
     58
     59   - ganymed: If the dataset file containes "MonteCarlo: Yes" the "-mc"
     60     option can now be omitted.
     61
     62   - ganymed: If either the dataset file containes "MonteCarlo: Yes"
     63     or the option "-mc" is specified as default the monte carlo datacenter
     64     paths (/magic/montecarlo/...) are used if not overwritten in the
     65     dataset file.
    5866
    5967   - ganymed: The output files now contain run- and event-number for all
  • trunk/MagicSoft/Mars/ganymed.cc

    r8441 r8442  
    203203    if (!seq.IsMonteCarlo())
    204204        seq.SetMonteCarlo(kIsMc);
     205    if (kWobbleModeOn || kWobbleModeOff)
     206        seq.SetWobbleMode(kWobbleModeOn);
    205207    if (kNumAnalysis>=0)
    206208        seq.SetNumAnalysis(kNumAnalysis);
     
    230232        return 1;
    231233    }
    232 
    233     Bool_t iswobble = seq.IsWobbleMode();
    234     if (kWobbleModeOn)
    235         iswobble = kTRUE;
    236     if (kWobbleModeOff)
    237         iswobble = kFALSE;
    238234
    239235    //
     
    266262    //job.SetNameResultFile(kNameResult);
    267263    job.EnableWriteOnly(kWriteOnly);
    268     job.EnableWobbleMode(iswobble);
    269264    //if (kFullDisplay)
    270265    //    job.EnableFullDisplay(kFullDisplay);
  • trunk/MagicSoft/Mars/mjobs/MDataSet.h

    r8441 r8442  
    120120    // Setter
    121121    void SetMonteCarlo(Bool_t ismc=kTRUE) { fMonteCarlo=ismc; }
     122    void SetWobbleMode(Bool_t wobm=kTRUE)  { fWobbleMode=wobm; }
    122123
    123124    static Bool_t AddSequencesFromList(const TList &list, MDirIter &files);
  • trunk/MagicSoft/Mars/mjobs/MJCut.cc

    r8441 r8442  
    1818!   Author(s): Thomas Bretz, 1/2005 <mailto:tbretz@astro.uni-wuerzburg.de>
    1919!
    20 !   Copyright: MAGIC Software Development, 2000-2005
     20!   Copyright: MAGIC Software Development, 2000-2007
    2121!
    2222!
     
    2626//
    2727//  MJCut
    28 //
    29 // FIXME: Preparation for wobble mode missing
    3028//
    3129/////////////////////////////////////////////////////////////////////////////
     
    8684//
    8785// Default constructor.  Set defaults for fStoreSummary, fStoreresult,
    88 // fWriteOnly, fIsWobble and fFullDisplay to kFALSE and initialize
     86// fWriteOnly, fFullDisplay to kFALSE and initialize
    8987// /*fEstimateEnergy and*/ fCalcHadronness with NULL.
    9088//
    9189MJCut::MJCut(const char *name, const char *title)
    9290    : fStoreSummary(kFALSE), fStoreResult(kTRUE), fWriteOnly(kFALSE),
    93     fIsWobble(kFALSE), fFullDisplay(kTRUE),
     91    fFullDisplay(kTRUE),
    9492    fRndmSrcPos(kFALSE), fNameHist("MHThetaSq"), fCalcHadronness(0), fCalcDisp(0)
    9593{
     
    330328    EnableStorageOfSummary(GetEnv("SummaryFile", fStoreSummary));
    331329    EnableStorageOfResult(GetEnv("ResultFile", fStoreResult));
    332     EnableWobbleMode(GetEnv("WobbleMode", fIsWobble));
    333330    EnableFullDisplay(GetEnv("FullDisplay", fFullDisplay));
    334331    EnableRandomSrcPos(GetEnv("RandomSourcePosition", fRndmSrcPos));
     
    551548    MParList plist;
    552549
    553     MHSrcPosCam hsrcpos(fIsWobble);
    554     if (!fIsWobble && source.IsInitialized() && fRndmSrcPos)
     550    MHSrcPosCam hsrcpos(set.IsWobbleMode());
     551    if (!set.IsWobbleMode() && source.IsInitialized() && fRndmSrcPos)
    555552    {
    556553        if (!FillSrcPosCam(set, source, hsrcpos))
     
    614611    MAlphaFitter fit;
    615612    plist.AddToList(&fit);
    616     if (fIsWobble)
     613    if (set.IsWobbleMode())
    617614        fit.SetScaleMode(MAlphaFitter::kNone);
    618615
     
    643640
    644641    MRead &readoff = set.IsMonteCarlo() ? (MRead&)readoffmc : (MRead&)readoffdata;
    645     const Bool_t setrc = fIsWobble ? set.AddFilesOn(readoff) : set.AddFilesOff(readoff);
     642    const Bool_t setrc = set.IsWobbleMode() ? set.AddFilesOn(readoff) : set.AddFilesOff(readoff);
    646643    if (!setrc && set.HasOffSequences())
    647644    {
    648         *fLog << err << "MDataSet::AddFiles" << (fIsWobble?"On":"Off") << " failed." << endl;
     645        *fLog << err << "MDataSet::AddFiles" << (set.IsWobbleMode()?"On":"Off") << " failed." << endl;
    649646        return kFALSE;
    650647    }
     
    699696    // How to get source position from off- and on-data?
    700697    MSrcPosCalc scalc;
    701     scalc.SetMode(fIsWobble?MSrcPosCalc::kWobble:MSrcPosCalc::kOffData); /********************/
     698    scalc.SetMode(set.IsWobbleMode()?MSrcPosCalc::kWobble:MSrcPosCalc::kOffData); /********************/
    702699
    703700    MSrcPosCorrect scor;
     
    716713    tlist2.AddToList(&scor);
    717714    tlist2.AddToList(&srcrndm);
    718     //if (fRndmSrcPos && !fIsWobble)
     715    //if (fRndmSrcPos && !set.IsWobbleMode())
    719716    //   tlist2.AddToList(&fill0a);
    720717    tlist2.AddToList(&hcalc);
    721     if (fIsWobble)
     718    if (set.IsWobbleMode())
    722719        tlist2.AddToList(&hcalc2);
    723720    //tlist2.AddToList(&taskenv1);
     
    732729        tlist2.AddToList(&fill1a);
    733730    tlist2.AddToList(&cont1);
    734     if (!fWriteOnly && (!fIsWobble || !fNameHistFS.IsNull()))
     731    if (!fWriteOnly && (!set.IsWobbleMode() || !fNameHistFS.IsNull()))
    735732        tlist2.AddToList(&ffs);
    736733    tlist2.AddToList(&cont2);
     
    796793        return kFALSE;
    797794
    798     if (set.HasOffSequences() || fIsWobble)
     795    if (set.HasOffSequences() || set.IsWobbleMode())
    799796    {
    800797        // Execute first analysis
     
    852849    fill7b.SetNameTab("NewPar");
    853850    //fill9b.SetNameTab("EffOnT");
    854     fill1b.SetDrawOption(set.HasOffSequences()||fIsWobble?"same":"");
    855     fill2b.SetDrawOption(set.HasOffSequences()||fIsWobble?"same":"");
    856     fill3b.SetDrawOption(set.HasOffSequences()||fIsWobble?"same":"");
    857     fill4b.SetDrawOption(set.HasOffSequences()||fIsWobble?"same":"");
    858     fill5b.SetDrawOption(set.HasOffSequences()||fIsWobble?"same":"");
    859     fill6b.SetDrawOption(set.HasOffSequences()||fIsWobble?"same":"");
    860     fill7b.SetDrawOption(set.HasOffSequences()||fIsWobble?"same":"");
     851    fill1b.SetDrawOption(set.HasOffSequences()||set.IsWobbleMode()?"same":"");
     852    fill2b.SetDrawOption(set.HasOffSequences()||set.IsWobbleMode()?"same":"");
     853    fill3b.SetDrawOption(set.HasOffSequences()||set.IsWobbleMode()?"same":"");
     854    fill4b.SetDrawOption(set.HasOffSequences()||set.IsWobbleMode()?"same":"");
     855    fill5b.SetDrawOption(set.HasOffSequences()||set.IsWobbleMode()?"same":"");
     856    fill6b.SetDrawOption(set.HasOffSequences()||set.IsWobbleMode()?"same":"");
     857    fill7b.SetDrawOption(set.HasOffSequences()||set.IsWobbleMode()?"same":"");
    861858
    862859    //fill9b.SetFilter(&fbin);
     
    903900
    904901    tlist.Replace(&readon);
    905     if (fRndmSrcPos && !fIsWobble)
     902    if (fRndmSrcPos && !set.IsWobbleMode())
    906903    {
    907904//        tlist2.RemoveFromList(&fill0a);
     
    911908    MFillH fillsrc(&hsrcpos, "MSrcPosCam", "FillSrcPosCam");
    912909    fillsrc.SetNameTab("SrcPos");
    913     if (fIsWobble)
     910    if (set.IsWobbleMode())
    914911        tlist2.AddToListBefore(&fillsrc, &hcalc);
    915912
     
    936933        //if (!fIsMonteCarlo)
    937934        //    tlist2.Replace(&fill9b);
    938         if (!fIsWobble || !fNameHist.IsNull())
     935        if (!set.IsWobbleMode() || !fNameHist.IsNull())
    939936            tlist2.Replace(&ffs2);
    940         if (fIsWobble)
     937        if (set.IsWobbleMode())
    941938        {
    942939            tlist2.AddToListAfter(&fillphi, &falpha2);
  • trunk/MagicSoft/Mars/mjobs/MJCut.h

    r8441 r8442  
    2121    Bool_t  fStoreResult;
    2222    Bool_t  fWriteOnly;
    23     Bool_t  fIsWobble;
    2423    Bool_t  fFullDisplay;
    2524    Bool_t  fRndmSrcPos;
     
    5958    void EnableStorageOfResult(Bool_t b=kTRUE)   { fStoreResult  = b; } // See SetNameResult
    6059    void EnableWriteOnly(Bool_t b=kTRUE)         { fWriteOnly    = b; }
    61     void EnableWobbleMode(Bool_t b=kTRUE)        { fIsWobble     = b; }
    6260    void EnableFullDisplay(Bool_t b=kTRUE)       { fFullDisplay  = b; }
    6361    void EnableRandomSrcPos(Bool_t b=kTRUE)      { fRndmSrcPos   = b; }
  • trunk/MagicSoft/Mars/sponde.cc

    r8013 r8442  
    175175    if (!seq.IsValid())
    176176    {
    177         gLog << err << "Sequences read but not valid!" << endl << endl;
    178         return 2;
    179     }
     177        gLog << err << "Dataset read but not valid (maybe analysis number not set)!" << endl << endl;
     178        return 2;
     179    }
     180
     181    if (!seq.IsMonteCarlo())
     182        gLog << warn << "Dataset file seems not to be a Monte Carlo dataset." << endl << endl;
     183
    180184
    181185    //
Note: See TracChangeset for help on using the changeset viewer.