Changeset 4761


Ignore:
Timestamp:
08/27/04 15:18:46 (20 years ago)
Author:
rico
Message:
Changelog
Location:
trunk/MagicSoft/Mars/mtemp/mifae/library
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mtemp/mifae/library/MDisplay.cc

    r4528 r4761  
    5151#include "MGeomCam.h"
    5252#include "MHCamera.h"
     53#include "MRawRunHeader.h"
     54#include "MRawEvtHeader.h"
    5355
    5456#include "MLog.h"
     
    107109  fDisplay->Draw();
    108110
     111  //look for the run and event headers
     112  fEvtHeader = (MRawEvtHeader*)pList->FindObject("MRawEvtHeader");
     113  if (!fEvtHeader)
     114    {
     115      *fLog << err << "MRawEvtHeader not found... aborting." << endl;
     116      return kFALSE;
     117    }
     118 
     119  fRunHeader = (MRawRunHeader*)pList->FindObject(AddSerialNumber("MRawRunHeader"));
     120  if (!fRunHeader)
     121    {
     122      *fLog << err << AddSerialNumber("MRawRunHeader") << " not found... aborting." << endl;
     123      return kFALSE;
     124    }
     125
    109126  return kTRUE;
    110127}
     
    126143  fCanvas->GetPad(1)->Modified();
    127144  fCanvas->GetPad(1)->Update();
     145 
     146  *fLog << all << "Run: " << fRunHeader->GetRunNumber() << ", Event: " << fEvtHeader->GetDAQEvtNumber() << endl;
    128147
    129148  // pause execution
    130149  if(fPause)
    131150    {
    132       cout << "Type 'q' to exit, <return> to go on: ";     
     151      cout << "Type 'q' to exit, 'p' to print event into ps file, <return> to go on: ";     
    133152      TString input;
    134153      input =cin.get();
     
    136155      if (input=='q')
    137156        return kFALSE;
     157      if(input=='p')
     158        {
     159          Char_t psfile[200];
     160          sprintf(psfile,"Run%06dEvent%07d.ps", fRunHeader->GetRunNumber(), fEvtHeader->GetDAQEvtNumber());
     161          fCanvas->Print(psfile);
     162        }
    138163    }
    139164
  • trunk/MagicSoft/Mars/mtemp/mifae/library/MDisplay.h

    r4139 r4761  
    66#endif
    77
     8class MRawRunHeader;
     9class MRawEvtHeader;
    810class MHCamera;
    911class MCamEvent;
     
    1517{
    1618 private:
    17   MHCamera*     fDisplay;      // pointer to the camera display
    18   MGeomCam*     fGeomCam;      // pointer to the camera geometry
    19   MCamEvent*    fCamEvent;     // pointer to camera event
    20   TCanvas*      fCanvas;       // pointer to the canvas
    21   TPostScript*  fPSFile;       // pointer to ps file
    22   TString       fPSFileName;   // name for ps file
    23   Int_t         fDisplayType;  // display type (see MHCamera)
    24   Bool_t        fCreatePSFile; // flag to produce a ps file with events
    25   Bool_t        fPause;        // flag to pause execution between events
     19  MRawEvtHeader*  fEvtHeader;    // event header
     20  MRawRunHeader*  fRunHeader;    // run header
     21  MHCamera*       fDisplay;      // pointer to the camera display
     22  MGeomCam*       fGeomCam;      // pointer to the camera geometry
     23  MCamEvent*      fCamEvent;     // pointer to camera event
     24  TCanvas*        fCanvas;       // pointer to the canvas
     25  TPostScript*    fPSFile;       // pointer to ps file
     26  TString         fPSFileName;   // name for ps file
     27  Int_t           fDisplayType;  // display type (see MHCamera)
     28  Bool_t          fCreatePSFile; // flag to produce a ps file with events
     29  Bool_t          fPause;        // flag to pause execution between events
    2630 
    2731
Note: See TracChangeset for help on using the changeset viewer.