Changeset 2415 for trunk/MagicSoft


Ignore:
Timestamp:
10/20/03 18:39:05 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhist
Files:
2 edited

Legend:

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

    r2405 r2415  
    104104    fSum = new MHCamera(*cam, name+";avg", fTitle);
    105105    fSum->SetYTitle("a.u.");
    106 
     106    fSum->SetBit(MHCamera::kProfile);
    107107    return kTRUE;
    108108}
     
    131131Bool_t MHCamEvent::Finalize()
    132132{
     133    fSum->ResetBit(MHCamera::kProfile);
    133134    if (fSum->GetEntries()>0)
    134135        fSum->Scale(1./fSum->GetEntries());
     
    170171}
    171172
    172 void MHCamEvent::Draw(Option_t *)
    173 {
    174     TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this);
     173void MHCamEvent::DrawTS(TVirtualPad *p, Option_t *)
     174{
     175    if (!fSum)
     176    {
     177        *fLog << warn << "MHCamEvent::Draw - fSum==NULL not initialized." << endl;
     178        return;
     179    }
     180
     181    TVirtualPad *pad = p ? p : MakeDefCanvas(this);
    175182    pad->SetBorderMode(0);
    176183
    177184    pad->Divide(1,2);
    178185
    179     pad->cd(1);
    180     gPad->SetBorderMode(0);
    181     gPad->Divide(1,1);
    182     gPad->cd(1);
    183     gPad->SetBorderMode(0);
    184     fSum->Draw();
    185 
    186     pad->cd(2);
    187     gPad->SetBorderMode(0);
    188     fSum->Draw("EPhist");
    189 }
     186    p = pad->GetPad(1);
     187    p->SetBorderMode(0);
     188
     189    // fSum doesn't derive from MParContainer
     190    MParContainer::DrawTS(fSum, p);
     191
     192    p = pad->GetPad(2);
     193    p->SetBorderMode(0);
     194
     195    // fSum doesn't derive from MParContainer
     196    MParContainer::DrawTS(fSum, p, "EPhist");
     197
     198    // fSum doesn't derive from MParContainer
     199    //MParContainer::DrawTS(fSum, pad);
     200}
  • trunk/MagicSoft/Mars/mhist/MHCamEvent.h

    r2405 r2415  
    3232    TH1 *GetHistByName(const TString name="");
    3333
    34     void Draw(Option_t *o="");
     34    void DrawTS(TVirtualPad *pad=NULL, Option_t *o="");
    3535
    3636    void PrintOutliers(Float_t sigma) const;
Note: See TracChangeset for help on using the changeset viewer.