Ignore:
Timestamp:
08/13/10 11:42:15 (14 years ago)
Author:
tbretz
Message:
Implemented TProfile3D in MH3 and MHn and the possibility to skip the reset of the histograms in the SetupFill.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mhbase/MHn.cc

    r9821 r9858  
    254254// --------------------------------------------------------------------------
    255255//
     256// Add a new 3D-MH3 histogram. An internal pointer is set to it, so that
     257// InitName and InitTitle can be used for this histogram until a new
     258// histogram is added using AddHist
     259//
     260//  e.g. AddHist("MHillas.fWidth", "MHillas.fLength", "MHillas.fSize", "MWeight.fVal")
     261//
     262Bool_t MHn::AddHist(const char *memberx, const char *membery, const char *memberz, const char *weight)
     263{
     264    if (fNum==8)
     265    {
     266        *fLog << err << "ERROR - MHn doesn't support more than six histograms... AddHist ignored." << endl;
     267        return kFALSE;
     268    }
     269
     270    fHist[fNum] = new MH3(memberx, membery, memberz, weight);
     271
     272    InitHist();
     273
     274    return kTRUE;
     275}
     276
     277// --------------------------------------------------------------------------
     278//
    256279// Set the draw option of the n-th MH3. See MH3 for more details of the
    257280// meaning of it.
     
    500523{
    501524    for (int i=0; i<fNum; i++)
     525    {
     526        TestBit(kDoNotReset) ? fHist[i]->SetBit(kDoNotReset) : fHist[i]->ResetBit(kDoNotReset);
     527
    502528        if (!fHist[i]->SetupFill(plist))
    503529            return kFALSE;
     530    }
    504531
    505532    return kTRUE;
     
    581608            break;
    582609        case 13:  // 3
     610            pad->Divide(2,2, 1e-5, 1e-5);
     611            pad->GetPad(1)->SetPad(0.01, 0.505, 0.33, 0.99);
     612            pad->GetPad(2)->SetPad(0.01, 0.01,  0.33, 0.495);
     613            pad->GetPad(3)->SetPad(0.34, 0.01,  0.99, 0.99);
     614            delete pad->GetPad(4);
    583615            break;
    584616        case 14:  // 4
Note: See TracChangeset for help on using the changeset viewer.