Ignore:
Timestamp:
11/23/03 21:18:30 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhist
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhist/MHCamEvent.cc

    r2550 r2563  
    124124    if (!evt)
    125125    {
    126         *fLog << err << dbginf << "No MCamEvent found..." << endl;
     126        *fLog << err << dbginf << "Got no MCamEvent as argument of Fill()..." << endl;
    127127        return kFALSE;
    128128    }
    129129    fSum->AddCamContent(*evt, fType);
    130 
     130    fRms->SetCamContent(*fSum, 1);
    131131    return kTRUE;
    132132}
     
    138138Bool_t MHCamEvent::Finalize()
    139139{
    140     fRms->AddCamContent(*fSum, 1);
     140    //fRms->AddCamContent(*fSum, 1);
    141141    return kTRUE;
    142142}
  • trunk/MagicSoft/Mars/mhist/MHCamera.cc

    r2557 r2563  
    299299{
    300300    if (fMinimum != -1111)
    301         return Profile(fMinimum);
     301        return fMinimum;
    302302
    303303    if (fNcells<=1)
     
    329329{
    330330    if (fMaximum!=-1111)
    331         return Profile(fMaximum);
     331        return fMaximum;
    332332
    333333    if (fNcells<=1)
     
    359359// To draw a camera into its own pad do something like:
    360360//
    361 // MGeomCamMagic m;
    362 // MHCamera *d=new MHCamera(m);
    363 //
    364 // TCanvas *c = new TCanvas;
    365 // c->Divide(2,1);
    366 // c->cd(1);
    367 //
    368 // d->FillRandom();
    369 // d->Draw();
    370 // d->SetBit(kCanDelete);
     361//   MGeomCamMagic m;
     362//   MHCamera *d=new MHCamera(m);
     363//
     364//   TCanvas *c = new TCanvas;
     365//   c->Divide(2,1);
     366//   c->cd(1);
     367//
     368//   d->FillRandom();
     369//   d->Draw();
     370//   d->SetBit(kCanDelete);
     371//
     372// There are several drawing options:
     373//   'hist'        Draw as a standard TH1 histogram (value vs. pixel index)
     374//   'box'         Draw hexagons which size is in respect to its contents
     375//   'nocol'       Leave the 'boxed' hexagons empty
     376//   'pixelindex'  Display the pixel index in each pixel
     377//   'sectorindex' Display the sector index in each pixel
     378//   'content'     Display the relative content aligned to GetMaximum() and
     379//                 GeMinimum() ((val-min)/(max-min))
    371380//
    372381void MHCamera::Draw(Option_t *option)
     
    570579
    571580    if (opt.Contains("pixelindex"))
    572         PaintIndices(kFALSE);
     581        PaintIndices(0);
    573582    if (opt.Contains("sectorindex"))
    574         PaintIndices(kTRUE);
     583        PaintIndices(1);
     584    if (opt.Contains("content"))
     585        PaintIndices(2);
    575586}
    576587
     
    632643}
    633644
    634 void MHCamera::PaintIndices(Bool_t sector)
     645void MHCamera::PaintIndices(Int_t type)
    635646{
    636647    if (fNcells<=1)
     648        return;
     649
     650    const Double_t min = GetMinimum();
     651    const Double_t max = GetMaximum();
     652
     653    if (type==2 && max==min)
    637654        return;
    638655
     
    646663
    647664        TString num;
    648         num += sector ? h.GetSector() : i;
     665        switch (type)
     666        {
     667        case 0: num += i; break;
     668        case 1: num += h.GetSector(); break;
     669        case 2: num += (Int_t)((fArray[i+1]-min)/(max-min)); break;
     670        }
    649671
    650672        txt.SetTextSize(0.3*h.GetD()/fGeomCam->GetMaxRadius()/1.05);
  • trunk/MagicSoft/Mars/mhist/MHCamera.h

    r2557 r2563  
    3030public:
    3131    enum {
    32         kProfile  = BIT(18),
     32        kProfile  = BIT(18), // FIXME: When changing change max/min!
    3333        kFreezed  = BIT(19),
    3434        kNoLegend = BIT(20)
     
    5959    Int_t GetColor(Float_t val, Float_t min, Float_t max, Bool_t islog);
    6060
    61     void  PaintIndices(Bool_t sector);
     61    void  PaintIndices(Int_t type);
    6262    void  Update(Bool_t islog, Bool_t isbox, Bool_t iscol);
    6363    void  UpdateLegend(Float_t min, Float_t max, Bool_t islog);
  • trunk/MagicSoft/Mars/mhist/MHEvent.cc

    r2529 r2563  
    200200    {
    201201        s += "Run #";
    202         s += fRawRunHeader->GetNumEvents();
     202        s += fRawRunHeader->GetRunNumber();
    203203    }
    204204
  • trunk/MagicSoft/Mars/mhist/MHTriggerLvl0.cc

    r2550 r2563  
    126126    if (!evt)
    127127    {
    128         *fLog << err << dbginf << "No MCamEvent found..." << endl;
     128        *fLog << err << dbginf << "Got no MCamEvent as argument of Fill()..." << endl;
    129129        return kFALSE;
    130130    }
Note: See TracChangeset for help on using the changeset viewer.