Changeset 2098


Ignore:
Timestamp:
05/08/03 18:00:03 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r2097 r2098  
    11                                                 -*-*- END OF LINE -*-*-
    22
     3 2003/05/08: Thomas Bretz
     4
     5   * Makefile.rules:
     6     - fixed the rmhtml bug
     7
     8   * macros/collarea.C:
     9     - changed to use MStatusDisplay
     10     
     11   * manalysis/MCT1SupercutsCalc.cc:
     12     - fixed a typo
     13     
     14   * mbase/MEvtLoop.[h,cc], mbase/MTaskList.[h,cc]:
     15     - added FindTask member functions
     16     
     17   * mbase/MLog.cc:
     18     - do not crop logging to GUI to 1000 lines anymore
     19
     20   * mdata/MDataChain.cc:
     21     - use GetRule() in the constructor instead of Print()
     22     
     23   * mdata/MDataElement.cc, mfilter/MFDataChain.cc:
     24     - do not return str+"something"
     25     
     26   * mhist/MH.[h,cc]:
     27     - fixed a bug in DrawCopy(TH1*,TH1*)
     28     - overwrite Clone function and do not add TH1 to gDirectory
     29       when cloning MH classes
     30     
     31   * mimage/MHHillas.cc, mimage/MHHillasSrc.cc:
     32     - adde a sanity check to Fill
     33     
     34   * mimage/MHHillasSrc.cc:
     35     - do not set the log scale before we have entries in the histogram
     36
     37
     38
    339 2003/05/08: Abelardo Moralejo
     40
     41   * mimage/MImgCleanStd.cc
     42     - extended comment on standard cleaning.
    443
    544   * mhistmc/MHMcCollectionAreaCalc.cc
    645     - Changed binning of histograms, so that the collection area
    746       can be calculated also between 5 and 10 GeV (for pulsar studies)
    8 
    9  2003/05/08: Thomas Bretz
    10 
    11    * Makefile.rules:
    12      - fixed the rmhtml bug
    13 
    14 
    15 
    16  2003/05/08: Abelardo Moralejo
    17 
    18    * mimage/MImgCleanStd.cc
    19      - extended comment on standard cleaning.
    2047
    2148
  • trunk/MagicSoft/Mars/macros/collarea.C

    r1660 r2098  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz, 12/2000 <mailto:tbretz@astro.uni-wuerzburg.de>
    1919!
    20 !   Copyright: MAGIC Software Development, 2000-2001
     20!   Copyright: MAGIC Software Development, 2000-2003
    2121!
    2222!
     
    2525
    2626void collarea(TString filename="camera.root", TString outname="")
    27 {
     27{
     28    MStatusDisplay *d = new MStatusDisplay;
     29    // redirect logging output to GUI, kFALSE to disable stream to stdout
     30    d->SetLogStream(&gLog, kTRUE);
     31
    2832    //
    2933    // first we have to create our empty lists
     
    5458    // Start to loop over all events
    5559    //
    56     MProgressBar bar;
    57     magic.SetProgressBar(&bar);
     60    magic.SetDisplay(d);
    5861    if (!magic.Eventloop())
    5962        return;
     
    6568    // filled and can be displayed
    6669    //
    67     parlist.FindObject("MHMcCollectionArea")->DrawClone();
     70    if ((d = magic.GetDisplay()))
     71        d->AddTab("Collection Area");
     72    else
     73        new TCanvas("CollArea", "Result of the collection area calculation");
     74
     75    parlist.FindObject("MHMcCollectionArea")->DrawClone("nonew");
    6876
    6977
  • trunk/MagicSoft/Mars/manalysis/MCT1SupercutsCalc.cc

    r2038 r2098  
    1616!
    1717!
    18 !   Author(s): Wolfgang Wittek  04/2003 <mailto:wittek@mppmu.mpg.de>
    19 
     18!   Author(s): Wolfgang Wittek, 04/2003 <mailto:wittek@mppmu.mpg.de>
     19!
    2020!   Copyright: MAGIC Software Development, 2000-2003
    2121!
  • trunk/MagicSoft/Mars/mbase/MEvtLoop.cc

    r2080 r2098  
    120120    if (TestBit(kIsOwner) && fParList)
    121121        delete fParList;
     122}
     123
     124// --------------------------------------------------------------------------
     125//
     126// If the evntloop knows its tasklist search for the task there,
     127// otherwise return NULL.
     128//
     129MTask *MEvtLoop::FindTask(const char *name) const
     130{
     131    return fTaskList ? fTaskList->FindTask(name) : NULL;
     132}
     133
     134// --------------------------------------------------------------------------
     135//
     136// If the evntloop knows its tasklist search for the task there,
     137// otherwise return NULL.
     138//
     139MTask *MEvtLoop::FindTask(const MTask *obj) const
     140{
     141    return fTaskList ? fTaskList->FindTask(obj) : NULL;
    122142}
    123143
  • trunk/MagicSoft/Mars/mbase/MEvtLoop.h

    r1965 r2098  
    1414#endif
    1515
     16class MTask;
    1617class MParList;
    1718class MTaskList;
     
    4546    MParList  *GetParList() const       { return fParList; }
    4647    MTaskList *GetTaskList() const      { return fTaskList; }
     48
     49    MTask *FindTask(const char *name) const;
     50    MTask *FindTask(const MTask *obj) const;
    4751
    4852    MStatusDisplay *GetDisplay() { return fDisplay; }
  • trunk/MagicSoft/Mars/mbase/MLog.cc

    r2079 r2098  
    209209        switch (fOutputLevel)
    210210        {
    211         case 0:  out << MLog::kReset;   break;  // all
     211        case 0:  out << MLog::kReset;   break;  // all // maybe not necessary?
    212212        case 1:  out << MLog::kRed;     break;  // err
    213213        case 2:  out << MLog::kYellow;  break;  // warn
     
    284284}
    285285
    286 #include <TVirtualX.h>
    287286void MLog::UpdateGui()
    288287{
     
    308307
    309308    // cut text box top 1000 lines
    310     while (txt.RowCount()>1000)
    311         txt.DelLine(0);
     309    //    while (txt.RowCount()>1000)
     310    //        txt.DelLine(1);
    312311
    313312    // show last entry
  • trunk/MagicSoft/Mars/mbase/MTaskList.h

    r2015 r2098  
    5252    TObject *FindObject(const TObject *obj) const;
    5353
     54    MTask *FindTask(const char *name) const
     55    {
     56        return (MTask*)FindObject(name);
     57    }
     58    MTask *FindTask(const MTask *obj) const
     59    {
     60        return (MTask*)FindObject(obj);
     61    }
     62
    5463    Bool_t ReInit(MParList *pList=NULL);
    5564
  • trunk/MagicSoft/Mars/mdata/MDataChain.cc

    r1853 r2098  
    150150        return;
    151151    }
    152     *fLog << inf << "found: " << flush;
    153     fMember->Print();
    154     *fLog << endl;
     152    *fLog << inf << "found: " << GetRule() << endl;
    155153}
    156154
  • trunk/MagicSoft/Mars/mdata/MDataElement.cc

    r1574 r2098  
    115115    TString rule = fMatrixName + "[";
    116116    rule += fNumCol;
    117     return rule+"]";
     117    rule += "]";
     118    return rule;
    118119}
  • trunk/MagicSoft/Mars/mfilter/MFDataChain.cc

    r1668 r2098  
    119119    str += fValue;
    120120
    121     return ret+str.Strip(TString::kBoth);
     121    ret += str.Strip(TString::kBoth);
     122    return ret;
    122123}
    123124
  • trunk/MagicSoft/Mars/mhist/MH.cc

    r2052 r2098  
    630630    // Draw second histogram
    631631    //
    632     ((TH1&)hist2).DrawCopy("sames");
     632    TH1 *h2 = ((TH1&)hist2).DrawCopy("sames");
    633633    gPad->Update();
    634634
     
    642642                              s2.GetY1NDC()-0.01
    643643                             );
    644     l.AddEntry((TH1*)&hist1, hist1.GetTitle());
    645     l.AddEntry((TH1*)&hist2, hist2.GetTitle());
     644    l.AddEntry(h1, h1->GetTitle());
     645    l.AddEntry(h2, h2->GetTitle());
    646646    l.SetTextSize(s2.GetTextSize());
    647647    l.SetTextFont(s2.GetTextFont());
     
    749749// --------------------------------------------------------------------------
    750750//
     751// Encapsulate the TObject::Clone such, that a cloned TH1 (or derived)
     752// object is not added to the current directory, when cloned.
     753//
     754TObject *MH::Clone(const char *name) const
     755{
     756    Bool_t store = TH1::AddDirectoryStatus();
     757    TH1::AddDirectory(kFALSE);
     758
     759    TObject *o = MParContainer::Clone(name);
     760
     761    TH1::AddDirectory(store);
     762
     763    return o;
     764}
     765
     766// --------------------------------------------------------------------------
     767//
    751768// If the opt string contains 'nonew' or gPad is not given a new canvas
    752769// with size w/h is created. Otherwise the object is cloned and drawn
     
    763780    gROOT->SetSelectedPad(NULL);
    764781
    765     Bool_t store = TH1::AddDirectoryStatus();
    766     TH1::AddDirectory(kFALSE);
    767 
    768782    TObject *o = MParContainer::DrawClone(opt);
    769783    o->SetBit(kCanDelete);
    770 
    771     TH1::AddDirectory(store);
    772 
    773784    return o;
    774785}
  • trunk/MagicSoft/Mars/mhist/MH.h

    r2043 r2098  
    6161    static void Draw(TH1 &hist1, TH1 &hist2, const TString title);
    6262
     63    TObject *Clone(const char *name="") const;
     64
    6365    void Draw(Option_t *o="") { MParContainer::Draw(o); }
    6466    TObject *DrawClone(Option_t *opt, Int_t w, Int_t h) const;
  • trunk/MagicSoft/Mars/mimage/MHHillas.cc

    r2062 r2098  
    242242Bool_t MHHillas::Fill(const MParContainer *par, const Stat_t w)
    243243{
     244    if (!par)
     245    {
     246        *fLog << err << "MHHillas::Fill: Pointer (!=NULL) expected." << endl;
     247        return kFALSE;
     248    }
     249
    244250    const MHillas &h = *(MHillas*)par;
    245251
     
    247253    const Double_t scale = fUseMmScale ? 1 : fMm2Deg;
    248254
    249     fLength ->Fill(scale*h.GetLength(), w);
    250     fWidth  ->Fill(scale*h.GetWidth(), w);
    251     fDistC  ->Fill(scale*d, w);
    252     fCenter ->Fill(scale*h.GetMeanX(), scale*h.GetMeanY(), w);
    253     fDelta  ->Fill(kRad2Deg*h.GetDelta(), w);
    254     fSize   ->Fill(h.GetSize(), w);
     255    fLength->Fill(scale*h.GetLength(), w);
     256    fWidth ->Fill(scale*h.GetWidth(), w);
     257    fDistC ->Fill(scale*d, w);
     258    fCenter->Fill(scale*h.GetMeanX(), scale*h.GetMeanY(), w);
     259    fDelta ->Fill(kRad2Deg*h.GetDelta(), w);
     260    fSize  ->Fill(h.GetSize(), w);
    255261
    256262    return kTRUE;
  • trunk/MagicSoft/Mars/mimage/MHHillasSrc.cc

    r2043 r2098  
    130130Bool_t MHHillasSrc::Fill(const MParContainer *par, const Stat_t w)
    131131{
     132    if (!par)
     133    {
     134        *fLog << err << "MHHillasSrc::Fill: Pointer (!=NULL) expected." << endl;
     135        return kFALSE;
     136    }
     137
    132138    const MHillasSrc &h = *(MHillasSrc*)par;
    133139
     
    211217    pad->cd(4);
    212218    gPad->SetBorderMode(0);
    213     gPad->SetLogy();
     219    //gPad->SetLogy();
    214220    fCosDA->Draw();
    215221
    216222    pad->Modified();
    217223    pad->Update();
     224}
     225
     226void MHHillasSrc::Paint(Option_t *opt)
     227{
     228    if (fCosDA->GetEntries()==0)
     229        return;
     230
     231    TVirtualPad *savepad = gPad;
     232    gPad->cd(4);
     233    gPad->SetLogy();
     234    gPad = savepad;
    218235}
    219236
Note: See TracChangeset for help on using the changeset viewer.