Ignore:
Timestamp:
11/04/02 10:06:08 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhist
Files:
2 added
36 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhist/HistLinkDef.h

    r1557 r1574  
    88
    99#pragma link C++ class MH+;
     10#pragma link C++ class MHArray+;
    1011#pragma link C++ class MH3+;
    1112
  • trunk/MagicSoft/Mars/mhist/MFillH.cc

    r1502 r1574  
    7171#include <fstream.h>
    7272
     73#include <TClass.h>
     74
     75#include "MDataChain.h"
     76
    7377#include "MLog.h"
    7478#include "MLogManip.h"
    7579
    7680#include "MH.h"
     81#include "MHArray.h"
     82
    7783#include "MParList.h"
    7884
    7985ClassImp(MFillH);
     86
     87//////////////////////////////////////////////////////////////////////////////
     88//
     89// MMap
     90//
     91// This class maps a key-value to a given value. In its simple versions it
     92// maps a key to an index.
     93//
     94//////////////////////////////////////////////////////////////////////////////
     95#include <TArrayI.h>
     96
     97class MMap
     98{
     99private:
     100    TArrayI fKeys;
     101    TArrayI fValues;
     102
     103    Int_t K(Int_t i) const { return ((TArrayI)fKeys)[i]; }
     104    Int_t V(Int_t i) const { return ((TArrayI)fValues)[i]; }
     105
     106public:
     107    // --------------------------------------------------------------------------
     108    //
     109    // Get the value which corresponds to the given key-value
     110    //
     111    Int_t GetValue(Int_t key) const
     112    {
     113        const Int_t n = fKeys.GetSize();
     114        for (int i=0; i<n; i++)
     115        {
     116            if (K(i)==key)
     117                return V(i);
     118        }
     119        return -1;
     120    }
     121
     122    // --------------------------------------------------------------------------
     123    //
     124    // Adds a new pair key-value. While the key is the key to the value.
     125    // if the key already exists the pair is ignored.
     126    //
     127    void Add(Int_t key, Int_t value)
     128    {
     129        if (GetValue(key)>=0)
     130            return;
     131
     132        const Int_t n = fKeys.GetSize();
     133
     134        fKeys.Set(n+1);
     135        fValues.Set(n+1);
     136
     137        fKeys[n] = key;
     138        fValues[n] = value;
     139    }
     140
     141    // --------------------------------------------------------------------------
     142    //
     143    // Adds a new pair key-value. While the key is the key to the value.
     144    // In this case the value is an automatically sequential created index.
     145    // if the key already exists the pair is ignored.
     146    //
     147    Int_t Add(Int_t key)
     148    {
     149        const Int_t k = GetValue(key);
     150        if (k>=0)
     151            return k;
     152
     153        const Int_t n = fKeys.GetSize();
     154
     155        fKeys.Set(n+1);
     156        fValues.Set(n+1);
     157
     158        fKeys[n] = key;
     159        fValues[n] = n;
     160
     161        return n;
     162    }
     163};
    80164
    81165// --------------------------------------------------------------------------
     
    91175    fH            = NULL;
    92176    fParContainer = NULL;
     177
     178    fIndex  = NULL;
     179    fMapIdx = new MMap;
    93180}
    94181
     
    194281    fParContainerName = par;
    195282
     283    AddToBranchList(fH->GetDataMember());
     284
    196285    if (title)
    197286        return;
     
    222311    fParContainerName = par->GetName();
    223312
     313    AddToBranchList(fH->GetDataMember());
     314
    224315    if (!title)
    225316        fTitle = (TString)"Fill " + hist->GetDescriptor() + " from " + par->GetDescriptor();
    226317}
    227318
     319// --------------------------------------------------------------------------
     320//
     321// Destructor. Delete fData if existing and kCanDelete is set.
     322//
     323MFillH::~MFillH()
     324{
     325    if (fIndex)
     326        if (fIndex->TestBit(kCanDelete))
     327            delete fIndex;
     328
     329    delete fMapIdx;
     330}
     331
     332// --------------------------------------------------------------------------
     333//
     334// If the histogram to be filles is a MHArray you can specify a 'rule'
     335// This rule is used to create an MDataChain. The return value of the chain
     336// is casted to int. Each int acts as a key. For each (new) key a new
     337// histogram is created in the array. (eg for the rule
     338// "MRawEvtHeader::fRunNumber" you would get one histogram per run-number)
     339//
     340void MFillH::SetRuleForIdx(const TString rule)
     341{
     342    fIndex = new MDataChain(rule);
     343    fIndex->SetBit(kCanDelete);
     344}
     345
     346// --------------------------------------------------------------------------
     347//
     348// If the histogram to be filles is a MHArray you can specify a MData-object
     349// The return value of the object is casted to int. Each int acts as a key.
     350// For each (new) key a new histogram is created in the array. (eg for
     351// MDataMember("MRawEvtHeader::fRunNumber") you would get one histogram per
     352// run-number)
     353//
     354void MFillH::SetRuleForIdx(MData *data)
     355{
     356    fIndex = data;
     357}
     358
     359// --------------------------------------------------------------------------
     360//
     361// Extracts the name of the histogram from the MFillH argument
     362//
    228363TString MFillH::ExtractName(const char *name) const
    229364{
     
    239374}
    240375
     376// --------------------------------------------------------------------------
     377//
     378// Extracts the class-name of the histogram from the MFillH argument
     379//
    241380TString MFillH::ExtractClass(const char *name) const
    242381{
     
    265404Bool_t MFillH::PreProcess(MParList *pList)
    266405{
     406    if (fIndex)
     407    {
     408        if (!fIndex->PreProcess(pList))
     409        {
     410            *fLog << all << "PreProcessing of Index rule failed... aborting." << endl;
     411            return kFALSE;
     412        }
     413
     414        if (!fIndex->IsValid())
     415        {
     416            *fLog << all << "Given Index rule invalid... aborting." << endl;
     417            return kFALSE;
     418        }
     419    }
     420
    267421    //
    268422    // Try to get the histogram container with name fHName from list
     
    293447        // 'type'.
    294448        //
    295         if (!obj->InheritsFrom(MH::Class()))
     449        TClass *tcls = fIndex ? MHArray::Class() : MH::Class();
     450        if (!obj->InheritsFrom(tcls))
    296451        {
    297452            *fLog << err << dbginf << obj->GetName() << " doesn't inherit ";
    298             *fLog << "from MH - cannot be used for MFillH... aborting." << endl;
     453            *fLog << "from " << tcls->GetName() << " - cannot be used for MFillH...";
     454            *fLog << "aborting." << endl;
    299455            return kFALSE;
    300456        }
     
    343499Bool_t MFillH::Process()
    344500{
     501    if (fIndex)
     502    {
     503        const Int_t key = (Int_t)fIndex->GetValue();
     504        const Int_t idx = fMapIdx->Add(key);
     505        ((MHArray*)fH)->SetIndex(idx);
     506    }
     507
    345508    return fH->Fill(fParContainer);
    346509}
     
    396559
    397560    out << ");" << endl;
    398 }
     561
     562    if (!fIndex)
     563        return;
     564
     565    out << "   " << GetUniqueName() << ".SetRuleForIdx(\"";
     566    out << fIndex->GetRule() << "\");" << endl;
     567}
  • trunk/MagicSoft/Mars/mhist/MFillH.h

    r1477 r1574  
    77
    88class MH;
     9class MData;
    910class MParList;
     11
     12class MMap;
    1013
    1114class MFillH : public MTask
     
    1518    TString fParContainerName;
    1619
    17     MH* fH;                   
     20    MH* fH;
    1821    TString fHName;
     22
     23    MData *fIndex;    // MData object describing the 'key' to an automatic index for an MHArray
     24    MMap  *fMapIdx;   //! Map to map key-index-pair for an MHArray (MMap see MFillH.cc)
    1925
    2026    TString ExtractName(const char *name) const;
     
    3238    MFillH(MH *hist,         MParContainer *par,   const char *name=NULL, const char *title=NULL);
    3339
     40    ~MFillH();
     41
     42    void SetRuleForIdx(const TString rule);
     43    void SetRuleForIdx(MData *rule);
     44
    3445    Bool_t PreProcess(MParList *pList);
    3546    Bool_t Process();
  • trunk/MagicSoft/Mars/mhist/MH.cc

    r1572 r1574  
    4545//  the histogram(s) by the data of a corresponding parameter container.    //
    4646//                                                                          //
     47//  Remark: the static member function (eg MakeDefCanvas) can be called     //
     48//          from everywhere using: MH::MakeDefCanvas(...)                   //
     49//                                                                          //
    4750//////////////////////////////////////////////////////////////////////////////
    4851
     
    9396Bool_t MH::Fill(const MParContainer *par)
    9497{
    95     *fLog << GetDescriptor() << ": Fill not overloaded! Can't be used!" << endl;
     98    *fLog << warn << GetDescriptor() << ": Fill not overloaded! Can't be used!" << endl;
    9699    return kFALSE;
     100}
     101
     102// --------------------------------------------------------------------------
     103//
     104// This virtual function is ment as a generalized interface to retrieve
     105// a pointer to a root histogram from the MH-derived class.
     106//
     107TH1 *MH::GetHistByName(const TString name)
     108{
     109    *fLog << warn << GetDescriptor() << ": GetHistByName not overloaded! Can't be used!" << endl;
     110    return NULL;
    97111}
    98112
     
    665679    l.Draw();
    666680}
     681
  • trunk/MagicSoft/Mars/mhist/MH.h

    r1504 r1574  
    2424    virtual Bool_t Fill(const MParContainer *par);
    2525    virtual Bool_t Finalize() { return kTRUE; }
     26
     27    virtual TString GetDataMember() const { return ""; }
     28
     29    virtual TH1 *GetHistByName(const TString name);
    2630
    2731    static TCanvas *MakeDefCanvas(TString name="", const char *title="",
  • trunk/MagicSoft/Mars/mhist/MH3.cc

    r1555 r1574  
    8383static const TString gsDefTitle = "Container for a %dD Mars Histogram";
    8484
     85// --------------------------------------------------------------------------
     86//
     87// Default constructor.
     88//
    8589MH3::MH3() : fDimension(0), fHist(NULL)
    8690{
     
    179183        if (fData[i])
    180184            delete fData[i];
     185}
     186
     187// --------------------------------------------------------------------------
     188//
     189// Return the data members used by the data chain to be used in
     190// MTask::AddBranchToList
     191//
     192TString MH3::GetDataMember() const
     193{
     194    TString str=fData[0]->GetDataMember();
     195    if (fData[1])
     196    {
     197        str += ";";
     198        str += fData[1]->GetDataMember();
     199    }
     200    if (fData[2])
     201    {
     202        str += ";";
     203        str += fData[2]->GetDataMember();
     204    }
     205    return str;
    181206}
    182207
     
    526551    }
    527552}
     553
     554// --------------------------------------------------------------------------
     555//
     556// Used to rebuild a MH3 object of the same type (data members,
     557// dimension, ...)
     558//
     559MParContainer *MH3::New() const
     560{
     561    MH3 *h = NULL;
     562    switch (fDimension)
     563    {
     564    case 1:
     565        h=new MH3(fData[0]->GetRule());
     566        break;
     567    case 2:
     568        h=new MH3(fData[0]->GetRule(), fData[1]->GetRule());
     569        break;
     570    case 3:
     571        h=new MH3(fData[0]->GetRule(), fData[1]->GetRule(), fData[2]->GetRule());
     572        break;
     573    }
     574    switch (fDimension)
     575    {
     576    case 3:
     577        h->SetScaleZ(fScale[2]);
     578    case 2:
     579        h->SetScaleY(fScale[1]);
     580    case 1:
     581        h->SetScaleX(fScale[0]);
     582    }
     583    return h;
     584}
  • trunk/MagicSoft/Mars/mhist/MH3.h

    r1524 r1574  
    5151    Bool_t Fill(const MParContainer *par);
    5252
     53    TString GetDataMember() const;
     54
    5355    TH1 &GetHist() { return *fHist; }
    5456    const TH1 &GetHist() const { return *fHist; }
     57
     58    TH1 *GetHistByName(const TString name) { return fHist; }
    5559
    5660    void SetColors() const;
     
    5862    TObject *DrawClone(Option_t *opt=NULL) const;
    5963
     64    MParContainer *New() const;
     65
    6066    ClassDef(MH3, 1) // Generalized 1/2/3D-histogram for Mars variables
    6167};
  • trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTheta.h

    r1415 r1574  
    3939    const TH3D *GetHist() const { return &fHist; }
    4040
     41    TH1 *GetHistByName(const TString name) { return &fHist; }
     42
    4143    void Draw(Option_t *option="");
    4244    TObject *DrawClone(Option_t *option="") const;
  • trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTime.h

    r1414 r1574  
    2929    TH3D    fHist;
    3030
    31 
    3231public:
    3332    MHAlphaEnergyTime(const char *name=NULL, const char *title=NULL);
     
    3837    const TH3D *GetHist()       { return &fHist; }
    3938    const TH3D *GetHist() const { return &fHist; }
     39
     40    TH1 *GetHistByName(const TString name) { return &fHist; }
    4041
    4142    void Draw(Option_t *option="");
  • trunk/MagicSoft/Mars/mhist/MHEnergyTheta.h

    r1213 r1574  
    3232    const TH2D *GetHist() const { return &fHist; }
    3333
     34    TH1 *GetHistByName(const TString name) { return &fHist; }
     35
    3436    void Divide(const TH2D *h1, const TH2D *h2);
    3537    void Divide(const MHEnergyTheta *h1, const MHEnergyTheta *h2)
  • trunk/MagicSoft/Mars/mhist/MHEnergyTime.h

    r1213 r1574  
    3333    const TH2D *GetHist() const { return &fHist; }
    3434
     35    TH1 *GetHistByName(const TString name) { return &fHist; }
     36
    3537    void Divide(const TH2D *h1, const TH2D *h2);
    3638    void Divide(const MHEnergyTime *h1, const MHEnergyTime *h2)
  • trunk/MagicSoft/Mars/mhist/MHHadronness.cc

    r1557 r1574  
    4343//    - red:   histogram of all hadronesses for non gammas
    4444//  * Upper Right Corner:
    45 //    - black: acceptance of gammas vs. the hadroness
    46 //    - red:   acceptance of non gammas vs. the hadroness
     45//    - black: acceptance of gammas (Ag) vs. the hadroness
     46//    - red:   acceptance of non gammas (Ah) vs. the hadroness
    4747//    - blue:  2D distance of (acceptance_hadrons, acceptances_gammas)
    4848//             to optimum (0, 1)
     
    221221    }
    222222
    223     return val1y - (val2y-val1y)/(val2x-val1x) * (0.5-val1x);
     223    return val1y - (val2y-val1y)/(val2x-val1x) * (val1x-0.5);
    224224}
    225225
     
    265265    }
    266266
    267     fQfac->SetMaximum(max+1);
     267    fQfac->SetMaximum(max*1.05);
    268268
    269269    return kTRUE;
     
    342342    *fLog << "Hadronness histograms:" << endl;
    343343    *fLog << "---------------------" << endl;
     344
     345    if (fGraph->GetN()==0)
     346    {
     347        *fLog << " <No Entries>" << endl;
     348        return;
     349    }
     350
    344351    *fLog << "Used " << fGhness->GetEntries() << " Gammas and " << fPhness->GetEntries() << " Hadrons." << endl;
    345352    *fLog << "Acc Gammas @  1% Hadron-acc: " << Form("%3.0f", GetGammaAcceptance(0.01)*100) << "%" << endl;
     
    368375TObject *MHHadronness::DrawClone(Option_t *opt) const
    369376{
     377    if (fGraph->GetN()==0)
     378        return NULL;
     379
    370380    TCanvas &c = *MakeDefCanvas("Hadronness", fTitle);
    371381    c.Divide(2, 2);
     
    435445void MHHadronness::Draw(Option_t *)
    436446{
    437     if (!gPad)
     447   if (fGraph->GetN()==0)
     448        return;
     449
     450   if (!gPad)
    438451        MakeDefCanvas("Hadronness", fTitle);
    439452
  • trunk/MagicSoft/Mars/mhist/MHHadronness.h

    r1557 r1574  
    1818    const MHadronness *fHadronness;    //!
    1919
    20     TH1D* fPhness;        // Hadrons Hadronness
    21     TH1D* fGhness;        // Gammas Hadronness
    22     TH1D* fIntPhness;     // Hadrons Acceptance
    23     TH1D* fIntGhness;     // Gammas Acceptance
    24     TH1D* fMinDist;       // Minimum Distance to optimum acceptance
     20    TH1D* fPhness;        //-> Hadrons Hadronness
     21    TH1D* fGhness;        //-> Gammas Hadronness
     22    TH1D* fIntPhness;     //-> Hadrons Acceptance
     23    TH1D* fIntGhness;     //-> Gammas Acceptance
     24    TH1D* fMinDist;       //-> Minimum Distance to optimum acceptance
    2525
    26     TGraph *fQfac;        // Quality factor
    27     TGraph *fGraph;       // gamma acceptance vs. hadron acceptance
     26    TGraph *fQfac;        //-> Quality factor
     27    TGraph *fGraph;       //-> gamma acceptance vs. hadron acceptance
    2828
    2929public:
  • trunk/MagicSoft/Mars/mhist/MHHillas.cc

    r1524 r1574  
    365365    gPad->Update();
    366366}
     367
     368TH1 *MHHillas::GetHistByName(const TString name)
     369{
     370    if (name.Contains("Width", TString::kIgnoreCase))
     371        return fWidth;
     372    if (name.Contains("Length", TString::kIgnoreCase))
     373        return fLength;
     374    if (name.Contains("Size", TString::kIgnoreCase))
     375        return fSize;
     376    if (name.Contains("Core", TString::kIgnoreCase))
     377        return fCorePix;
     378    if (name.Contains("Used", TString::kIgnoreCase))
     379        return fUsedPix;
     380    if (name.Contains("Delta", TString::kIgnoreCase))
     381        return fDelta;
     382    if (name.Contains("DistC", TString::kIgnoreCase))
     383        return fDistC;
     384    if (name.Contains("Center", TString::kIgnoreCase))
     385        return fCenter;
     386
     387    return NULL;
     388}
  • trunk/MagicSoft/Mars/mhist/MHHillas.h

    r1490 r1574  
    4141    Bool_t Fill(const MParContainer *par);
    4242
     43    TH1 *GetHistByName(const TString name);
     44
    4345    TH1F *GetHistLength() { return fLength; }
    4446    TH1F *GetHistWidth()  { return fWidth; }
  • trunk/MagicSoft/Mars/mhist/MHHillasExt.cc

    r1504 r1574  
    312312    gPad->Update();
    313313}
     314
     315TH1 *MHHillasExt::GetHistByName(const TString name)
     316{
     317    if (name.Contains("Conc", TString::kIgnoreCase))
     318        return &fHConc;
     319    if (name.Contains("Conc1", TString::kIgnoreCase))
     320        return &fHConc1;
     321    if (name.Contains("Asym", TString::kIgnoreCase))
     322        return &fHAsym;
     323    if (name.Contains("M3Long", TString::kIgnoreCase))
     324        return &fHM3Long;
     325    if (name.Contains("M3Trans", TString::kIgnoreCase))
     326        return &fHM3Trans;
     327
     328    return NULL;
     329}
  • trunk/MagicSoft/Mars/mhist/MHHillasExt.h

    r1490 r1574  
    3535    Bool_t Fill(const MParContainer *par);
    3636
     37    TH1 *GetHistByName(const TString name);
     38
    3739    void Draw(Option_t *opt=NULL);
    3840    TObject *DrawClone(Option_t *opt=NULL) const;
  • trunk/MagicSoft/Mars/mhist/MHHillasSrc.cc

    r1540 r1574  
    271271    gPad->Update();
    272272}
     273
     274TH1 *MHHillasSrc::GetHistByName(const TString name)
     275{
     276    if (name.Contains("Alpha", TString::kIgnoreCase))
     277        return fAlpha;
     278    if (name.Contains("Dist", TString::kIgnoreCase))
     279        return fDist;
     280    if (name.Contains("HeadTail", TString::kIgnoreCase))
     281        return fHeadTail;
     282    if (name.Contains("CosDA", TString::kIgnoreCase))
     283        return fCosDA;
     284
     285    return NULL;
     286}
  • trunk/MagicSoft/Mars/mhist/MHHillasSrc.h

    r1463 r1574  
    3030    Bool_t Fill(const MParContainer *par);
    3131
     32    TH1 *GetHistByName(const TString name);
     33
    3234    TH1F *GetHistAlpha()         { return fAlpha; }
    3335    TH1F *GetHistDist()          { return fDist; }
  • trunk/MagicSoft/Mars/mhist/MHMatrix.cc

    r1567 r1574  
    487487}
    488488
     489// --------------------------------------------------------------------------
     490//
     491// Implementation of SavePrimitive. Used to write the call to a constructor
     492// to a macro. In the original root implementation it is used to write
     493// gui elements to a macro-file.
     494//
    489495void MHMatrix::StreamPrimitive(ofstream &out) const
    490496{
     
    583589    return kTRUE;
    584590}
     591
     592// --------------------------------------------------------------------------
     593//
     594// Return a comma seperated list of all data members used in the matrix.
     595// This is mainly used in MTask::AddToBranchList
     596//
     597TString MHMatrix::GetDataMember() const
     598{
     599    return fData ? fData->GetDataMember() : TString("");
     600}
  • trunk/MagicSoft/Mars/mhist/MHMatrix.h

    r1524 r1574  
    8787    Bool_t Fill(MParList *plist, MTask *read);
    8888
     89    TString GetDataMember() const;
     90
    8991    ClassDef(MHMatrix, 1) // Multidimensional Matrix to store events
    9092};
  • trunk/MagicSoft/Mars/mhist/MHMcDifRate.h

    r1306 r1574  
    3131    const TH1D *GetHist() const { return &fHist; }
    3232
     33    TH1 *GetHistByName(const TString name) { return &fHist; }
     34
    3335    void Draw(Option_t* option = "");
    3436    TObject *DrawClone(Option_t* option = "") const;
  • trunk/MagicSoft/Mars/mhist/MHMcEfficiency.h

    r1306 r1574  
    3030    const TH2D *GetHist() const { return &fHist; }
    3131
     32    TH1 *GetHistByName(const TString name) { return &fHist; }
     33
    3234    void Draw(Option_t* option = "");
    3335    TObject *DrawClone(Option_t* option = "") const;
  • trunk/MagicSoft/Mars/mhist/MHMcEfficiencyEnergy.h

    r1306 r1574  
    3030    const TH1D *GetHist() const { return &fHist; }
    3131
     32    TH1 *GetHistByName(const TString name) { return &fHist; }
     33
    3234    void Draw(Option_t* option = "");
    3335    TObject *DrawClone(Option_t* option = "") const;
  • trunk/MagicSoft/Mars/mhist/MHMcEfficiencyImpact.h

    r1306 r1574  
    3030    const TH1D *GetHist() const { return &fHist; }
    3131
     32    TH1 *GetHistByName(const TString name) { return &fHist; }
     33
    3234    void Draw(Option_t* option = "");
    3335    TObject *DrawClone(Option_t* option = "") const;
  • trunk/MagicSoft/Mars/mhist/MHMcEnergy.cc

    r1082 r1574  
    260260}
    261261
     262TH1 *MHMcEnergy::GetHistByName(const TString name)
     263{
     264    return fHist;
     265}
  • trunk/MagicSoft/Mars/mhist/MHMcEnergy.h

    r1015 r1574  
    66#endif
    77
     8class TH1;
    89class TH1F;
    910class TF1;
     
    4546    void SetNumBins(Int_t nbins = 100);
    4647
     48    TH1 *GetHistByName(const TString name);
     49
    4750    void Draw(Option_t* option = "");
    4851    TObject *DrawClone(Option_t* option = "") const;
     52
    4953    void Print(Option_t* option = NULL) const;
    5054
  • trunk/MagicSoft/Mars/mhist/MHMcEnergyImpact.h

    r1306 r1574  
    2929    const TH2D *GetHist() const { return &fHist; }
    3030
     31    TH1 *GetHistByName(const TString name) { return &fHist; }
     32
    3133    void Draw(Option_t* option = "");
    3234    TObject *DrawClone(Option_t* option = "") const;
  • trunk/MagicSoft/Mars/mhist/MHMcEnergyMigration.h

    r1322 r1574  
    2323    MMcEvt      *fMcEvt;
    2424    MEnergyEst  *fEnergy;
     25
    2526    TH3D        fHist;
    2627
     
    3334    const TH3D *GetHist() { return &fHist; }
    3435    const TH3D *GetHist() const { return &fHist; }
     36
     37    TH1 *GetHistByName(const TString name) { return &fHist; }
    3538
    3639    void Draw(Option_t *option="");
  • trunk/MagicSoft/Mars/mhist/MHMcIntRate.h

    r1228 r1574  
    2929    const TH1D *GetHist() const { return &fHist; }
    3030
     31    TH1 *GetHistByName(const TString name) { return &fHist; }
     32
    3133    void Draw(Option_t* option = "");
    3234    TObject *DrawClone(Option_t* option = "") const;
  • trunk/MagicSoft/Mars/mhist/MHStarMap.h

    r1283 r1574  
    3333    Bool_t Fill(const MParContainer *par);
    3434
     35    TH1 *GetHistByName(const TString name) { return fStarMap; }
     36
    3537    TH2F *GetHist() { return fStarMap; }
    3638
  • trunk/MagicSoft/Mars/mhist/MHThetabarTheta.h

    r1322 r1574  
    3131    const TProfile *GetHist() const { return &fHist; }
    3232
     33    TH1 *GetHistByName(const TString name) { return &fHist; }
     34
    3335    void Draw(Option_t *option="");
    3436    TObject *DrawClone(Option_t *option="") const;
  • trunk/MagicSoft/Mars/mhist/MHThetabarTime.h

    r1321 r1574  
    3434    const TProfile *GetHist() const { return &fHist; }
    3535
     36    TH1 *GetHistByName(const TString name) { return &fHist; }
     37
    3638    void Draw(Option_t *option="");
    3739    TObject *DrawClone(Option_t *option="") const;
  • trunk/MagicSoft/Mars/mhist/MHTimeDiffTheta.h

    r1295 r1574  
    3232    const TH2D *GetHist() const { return &fHist; }
    3333
     34    TH1 *GetHistByName(const TString name) { return &fHist; }
     35
    3436    void Draw(Option_t *option="");
    3537    TObject *DrawClone(Option_t *option="") const;
  • trunk/MagicSoft/Mars/mhist/MHTimeDiffTime.h

    r1295 r1574  
    3030    const TH2D *GetHist() const { return &fHist; }
    3131
     32    TH1 *GetHistByName(const TString name) { return &fHist; }
     33
    3234    void Draw(Option_t *option="");
    3335    TObject *DrawClone(Option_t *option="") const;
  • trunk/MagicSoft/Mars/mhist/Makefile

    r1557 r1574  
    3232           MBinning.cc \
    3333           MH.cc \
     34           MHArray.cc \
    3435           MH3.cc \
    3536           MHMatrix.cc \
Note: See TracChangeset for help on using the changeset viewer.