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

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mraw/MRawEvtData.cc

    r2372 r2414  
    215215//     <index>      The pixel with the given index is drawn
    216216//
    217 void MRawEvtData::Draw(Option_t *opt)
     217// Rem: DrawTS is the thread-safe version of Draw. In most cases
     218//      you can use Draw instead
     219//
     220void MRawEvtData::DrawTS(TVirtualPad *pad=NULL, Option_t *opt="")
    218221{
    219222    if (GetNumPixels()==0)
    220223    {
    221224        *fLog << warn << "Sorry, no pixel to draw!" << endl;
     225        return;
     226    }
     227    if (!pad)
     228    {
     229        *fLog << warn << "MRawEvtData::DrawTS - No pad available..." << endl;
    222230        return;
    223231    }
     
    238246    if (!pix.Jump(id))
    239247    {
    240         *fLog << warn << "Pixel Idx #" << id << " doesn't exist!" << endl;
     248        *fLog << warn << "Pixel Idx #" << dec << id << " doesn't exist!" << endl;
    241249        return;
    242250    }
     
    255263    if (str.BeginsWith("graph"))
    256264    {
    257         *fLog << inf << "Drawing Graph: Pixel Idx #" << pix.GetPixelId();
     265        *fLog << inf << "Drawing Graph: Pixel Idx #" << dec << pix.GetPixelId();
    258266        *fLog << " of " << (int)GetNumPixels() << "Pixels" << endl;
    259267
     
    267275
    268276        graphhi->SetBit(kCanDelete);
    269         graphhi->Draw(same ? "C*" : "AC*");
     277        MParContainer::DrawTS(graphhi, pad, same ? "C*" : "AC*");
    270278
    271279        TH1F *histhi = graphhi->GetHistogram();
     
    286294
    287295            graphlo->SetBit(kCanDelete);
    288             graphlo->Draw("C*");
     296            MParContainer::DrawTS(graphlo, pad, "C*");
    289297
    290298            TH1F *histlo = graphlo->GetHistogram();
     
    300308    {
    301309        // FIXME: Add Legend
    302         *fLog << inf << "Drawing Histogram of Pixel with Idx #" << pix.GetPixelId() << endl;
     310        *fLog << inf << "Drawing Histogram of Pixel with Idx #";
     311        *fLog << dec << pix.GetPixelId() << endl;
    303312
    304313        TH1F *histh = new TH1F(name, "FADC Samples", nh, -0.5, nh-.5);
     
    309318            histh->Fill(i, higains[i]);
    310319        histh->SetBit(kCanDelete);
    311         histh->Draw(same ? "same" : "");
     320        MParContainer::DrawTS(histh, pad, same ? "same" : "");
    312321
    313322        if (nl>0)
     
    319328                histl->Fill(i, logains[i]);
    320329            histl->SetBit(kCanDelete);
    321             histl->Draw("same");
     330            MParContainer::DrawTS(histl, pad, "same");
    322331        }
    323332        return;
     
    516525    return kTRUE;
    517526}
     527
     528void MRawEvtData::Copy(TObject &named)
     529#if ROOT_VERSION_CODE > ROOT_VERSION(3,04,01)
     530const
     531#endif
     532{
     533    MRawEvtData &evt = (MRawEvtData &)named;
     534
     535    *evt.fHiGainPixId = *fHiGainPixId;
     536    *evt.fLoGainPixId = *fLoGainPixId;
     537
     538    *evt.fHiGainFadcSamples = *fHiGainFadcSamples;
     539    *evt.fLoGainFadcSamples = *fLoGainFadcSamples;
     540
     541    evt.fPosInArray      = fPosInArray;
     542    evt.fConnectedPixels = fConnectedPixels;
     543    evt.fArraySize       = fArraySize;
     544}
     545
  • trunk/MagicSoft/Mars/mraw/MRawEvtData.h

    r2207 r2414  
    2424    // FIXME: COMMENT ABOUT ORDERING
    2525
    26     MArrayS *fHiGainPixId;        // list of pixel IDs of hi gain channel
    27     MArrayB *fHiGainFadcSamples;  // list of hi gain samples of all pixels (ordering: see fHiGainPixId)
     26    MArrayS *fHiGainPixId;        //-> list of pixel IDs of hi gain channel
     27    MArrayB *fHiGainFadcSamples;  //-> list of hi gain samples of all pixels (ordering: see fHiGainPixId)
    2828
    29     MArrayS *fLoGainPixId;        // list of pixel IDs of lo gain channel
    30     MArrayB *fLoGainFadcSamples;  // list of lo gain samples of all pixels (ordering: see fLoGainPixId)
     29    MArrayS *fLoGainPixId;        //-> list of pixel IDs of lo gain channel
     30    MArrayB *fLoGainFadcSamples;  //-> list of lo gain samples of all pixels (ordering: see fLoGainPixId)
    3131
    3232    Int_t fPosInArray;        //!
     
    5252    void Clear(Option_t * = NULL);
    5353    void Print(Option_t * = NULL) const;
    54     void Draw (Option_t * = NULL);
     54    void DrawTS(TVirtualPad *pad=NULL, Option_t *option="");
     55    void Copy(TObject &named)
     56#if ROOT_VERSION_CODE > ROOT_VERSION(3,04,01)
     57const
     58#endif
     59        ;
    5560
    5661    void DeletePixels(Bool_t flag=kFALSE);
     
    6570
    6671    Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
    67     void   DrawPixelContent(Int_t num) const
     72    void   DrawPixelContent(Int_t num, TVirtualPad *pad=NULL) const
    6873    {
    6974        TString s("HIST");
    7075        s += num;
    71         const_cast<MRawEvtData*>(this)->Draw(s);
     76        const_cast<MRawEvtData*>(this)->DrawTS(pad, s);
     77        //const_cast<MRawEvtData*>(this)->Draw(s);
    7278    }
    7379
Note: See TracChangeset for help on using the changeset viewer.