Ignore:
Timestamp:
08/23/07 11:26:38 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhbase/MH3.cc

    r8695 r8698  
    8888// Class Version 3:
    8989// ----------------
    90 //   - Byte_t fStyleBits
     90//   - Byte_t   fStyleBits
     91//   + MBinning fBins[3]
    9192//
    9293/////////////////////////////////////////////////////////////////////////////
     
    145146    fData[2] = NULL;
    146147
     148    fBins[0] = NULL;
     149    fBins[1] = NULL;
     150    fBins[2] = NULL;
     151
    147152    fName  = gsDefName;
    148153    fTitle = gsDefTitle;
     
    172177    fData[1] = NULL;
    173178    fData[2] = NULL;
     179
     180    fBins[0] = NULL;
     181    fBins[1] = NULL;
     182    fBins[2] = NULL;
    174183
    175184    fName  = gsDefName;
     
    197206    fData[2] = NULL;
    198207
     208    fBins[0] = NULL;
     209    fBins[1] = NULL;
     210    fBins[2] = NULL;
     211
    199212    switch (fDimension)
    200213    {
     
    233246    fData[2] = NULL;
    234247
     248    fBins[0] = NULL;
     249    fBins[1] = NULL;
     250    fBins[2] = NULL;
     251
    235252    fName  = gsDefName;
    236253    fTitle = gsDefTitle;
     
    260277    fData[2] = new MDataPhrase(memberz);
    261278
     279    fBins[0] = NULL;
     280    fBins[1] = NULL;
     281    fBins[2] = NULL;
     282
    262283    fName  = gsDefName;
    263284    fTitle = gsDefTitle;
     
    339360    {
    340361    case 3:
    341         binsz = (MBinning*)plist->FindObject(bz, "MBinning");
     362        binsz = fBins[2] ? fBins[2] : (MBinning*)plist->FindObject(bz, "MBinning");
    342363        if (!binsz)
    343364        {
     
    354375            fHist->SetBit(kIsLogz);
    355376    case 2:
    356         binsy = (MBinning*)plist->FindObject(by, "MBinning");
     377        binsy = fBins[1] ? fBins[1] : (MBinning*)plist->FindObject(by, "MBinning");
    357378        if (!binsy)
    358379        {
     
    369390            fHist->SetBit(kIsLogy);
    370391    case 1:
    371         binsx = (MBinning*)plist->FindObject(bx, "MBinning");
     392        binsx = fBins[0] ? fBins[0] : (MBinning*)plist->FindObject(bx, "MBinning");
    372393        if (!binsx)
    373394        {
     
    507528    {
    508529        GetRangeX(*fHist, lo, hi);
    509         cout << "====> " << GetName() << " " << fHist->GetName() << ": " << lo << " " << hi <<" " << fHist->GetNbinsX() <<  endl;
    510530        fHist->GetXaxis()->SetRange(lo-2, hi+1);
    511531    }
     
    525545}
    526546
    527 // --------------------------------------------------------------------------
    528 //
    529 // Setup a inversed deep blue sea palette for the fCenter histogram.
    530 //
    531 void MH3::SetColors() const
    532 {
    533     // FIXME: This must be redone each time the canvas is repainted....
    534     gStyle->SetPalette(51, NULL);
    535     Int_t c[50];
    536     for (int i=0; i<50; i++)
    537         c[49-i] = gStyle->GetColorPalette(i);
    538     gStyle->SetPalette(50, c);
    539 }
    540 
    541547void MH3::Paint(Option_t *o)
    542548{
    543549    TProfile *p=0;
     550
     551    if (fDimension==2)
     552        MH::SetPalette("pretty");
    544553
    545554    const TString pfx(Form("%sProfX", fHist->GetName()));
Note: See TracChangeset for help on using the changeset viewer.