Changeset 2572 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
11/26/03 16:10:09 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r2571 r2572  
    88   * mhist/MHVsTime.[h,cc]:
    99     - implemented usage of Event number
     10
     11   * mhist/MHPixVsTime.[h,cc]:
     12     - implemented usage of time (untested - may not work)
    1013
    1114
  • trunk/MagicSoft/Mars/mhist/MHPixVsTime.cc

    r2244 r2572  
    4343#include "MGeomCam.h"
    4444
     45#include "MRawEvtHeader.h"
     46#include "MTime.h"
     47
    4548ClassImp(MHPixVsTime);
    4649
     
    6366    TString t("Pixel Index #");
    6467    t += idx;
    65     t += " vs. time";
     68    t += " vs ";
     69    t += fUseEventTime ? "Time" : "Event Number";
    6670
    6771    fGraph.SetName("MCamEvent");
     
    104108    }
    105109
     110    if (fUseEventTime)
     111    {
     112        fTime = (MTime*)plist->FindObject("MTime");
     113        if (!fTime)
     114        {
     115            *fLog << err << "MTime not found... abort." << endl;
     116            return kFALSE;
     117        }
     118    }
     119    else
     120    {
     121        fHeader = (MRawEvtHeader*)plist->FindObject("MRawEvtHeader");
     122        if (!fHeader)
     123        {
     124            *fLog << err << "MRawEvtHeader not found... abort." << endl;
     125            return kFALSE;
     126        }
     127    }
     128
    106129    return kTRUE;
    107130}
     
    125148        return kCONTINUE;
    126149
    127     fGraph.SetPoint(fGraph.GetN(), fGraph.GetN(), val);
     150    Double_t t = 0;
     151    if (fUseEventTime)
     152        t = (*fTime);
     153    else
     154        t = fHeader ? fHeader->GetDAQEvtNumber() : fGraph.GetN();
     155
     156    fGraph.SetPoint(fGraph.GetN(), t, val);
    128157    return kTRUE;
    129158}
  • trunk/MagicSoft/Mars/mhist/MHPixVsTime.h

    r2244 r2572  
    1414class MGeomCam;
    1515
     16class MRawEvtHeader;
     17class MTime;
     18
    1619class MHPixVsTime : public MH
    1720{
     
    2326    MGeomCam  *fCam; //! the camera geometry
    2427
     28    MRawEvtHeader *fHeader; //!
     29    MTime         *fTime;   //!
     30
    2531    TString fNameEvt;
    2632
    2733    Int_t fType;
    2834    Int_t fTypeErr;
     35
     36    Bool_t fUseEventTime;
    2937
    3038    Bool_t SetupFill(const MParList *pList);
     
    4250    TGraph &GetGraph() { return fGraph; }
    4351
     52    void SetUseEventTime(Bool_t use = kTRUE) { fUseEventTime = use; }
     53
    4454    void Draw(Option_t *o="");
    4555
Note: See TracChangeset for help on using the changeset viewer.