CREAM TEA -- ROOT MCP

McpTargetDisplay.h

00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 #ifndef TARGETDISPLAY_H
00011 #define TARGETDISPLAY_H
00012 
00013 //Includes
00014 #include "TChain.h"
00015 //#include "McpTargetDisplayConventions.h"
00016 
00017 #include "McpTarget.h" //The interface class
00018 #include "TargetData.h" //The data class
00019 #include "RawTargetData.h" //The data class
00020 
00021 class TCanvas;
00022 class TPad;
00023 class TButton;
00024 class TTreeIndex;
00025 class TFile;
00026 class TThread;
00027 class TPaveText;
00028 
00029 class McpTargetDisplay 
00030 {
00031  public:
00032   
00033   McpTargetDisplay(int offlineMode=0,TFile *inputFile=0);
00034   ~McpTargetDisplay();
00035   
00036   static McpTargetDisplay* Instance();
00037 
00038 
00039   //Event playback mode
00040   void startEventPlaying();
00041   void stopEventPlaying();
00042 
00043   //Waveform event display stuff
00044   void setOfflineMode(TFile *inputFile);
00045   void startEventDisplay(); //these are 
00046   int displayNextEvent(); // all the
00047   void refreshEventDisplay(); // same
00048   void toggleView(Int_t view) {fView=view;}
00049   int getEventDisplayPlayMode() {return fInEventPlayMode;}
00050   void setEventDisplayPlayMode(int mode) { fInEventPlayMode=mode;}
00051   int getEventDisplayPlaySleep() {return fEventPlaySleepMs;}
00052   void drawEventButtons();
00053 
00054   McpTarget *getMcpTargetPointer() {return &(fTheMcpTarget);}
00055 
00056  protected:
00057    static McpTargetDisplay *fgInstance;  
00058    // protect against multiple instances
00059 
00060  private:
00061    TCanvas *fMcpTargetCanvas; //The main canvas
00062    TPad *fMcpTargetMainPad;
00063    TPad *fMcpTargetEventInfoPad;
00064 
00065    TPaveText *fFarLeftPave;
00066    TPaveText *fMidLeftPave;
00067    TPaveText *fMidMidPave;
00068    TPaveText *fMidRightPave;
00069    TPaveText *fFarRightPave;
00070 
00071 
00072    TButton *fWaveformButton;
00073    TButton *fPowerButton;
00074 
00075    Int_t fInEventPlayMode;
00076    Int_t fEventPlaySleepMs;
00077    Int_t fView; //1 is waveforms, 2 is FFTs
00078 
00079    McpTarget fTheMcpTarget;
00080    TargetData *fTheTargetDataPtr;
00081    RawTargetData *fTheRawTargetDataPtr;
00082    TFile *fTheOfflineFile;
00083    TTree *fTheOfflineTree;
00084    Int_t fOfflineMode;
00085    Long64_t fTheOfflineEntry;
00086 };
00087 
00088 
00089 #endif //TARGETDISPLAY_H

Generated on Tue Nov 24 19:05:00 2009 for CREAM TEA -- MCP/TARGET Readout by doxygen 1.3.9.1