| 1 | #ifndef MGFADCDISP_H
|
|---|
| 2 | #define MGFADCDISP_H
|
|---|
| 3 |
|
|---|
| 4 | #ifndef MAGIC_H
|
|---|
| 5 | #include "MAGIC.h"
|
|---|
| 6 | #endif
|
|---|
| 7 |
|
|---|
| 8 | #ifndef ROOT_TGFrame
|
|---|
| 9 | #include <TGFrame.h>
|
|---|
| 10 | #endif
|
|---|
| 11 |
|
|---|
| 12 | class MParList ;
|
|---|
| 13 | class MRawRunHeader ;
|
|---|
| 14 | class MRawEvtHeader ;
|
|---|
| 15 | class MTime ;
|
|---|
| 16 | class MRawEvtData ;
|
|---|
| 17 | class MRawCrateArray ;
|
|---|
| 18 |
|
|---|
| 19 | class MReadTree ;
|
|---|
| 20 |
|
|---|
| 21 | class TGHorizontal3DLine;
|
|---|
| 22 | class TGLabel ;
|
|---|
| 23 | class TGTextButton ;
|
|---|
| 24 | class TGTab ;
|
|---|
| 25 | class TGListBox ;
|
|---|
| 26 | class TGVSlider;
|
|---|
| 27 | class TRootEmbeddedCanvas ;
|
|---|
| 28 | class TCanvas ;
|
|---|
| 29 | class TGTextEntry ;
|
|---|
| 30 | class TGTextBuffer ;
|
|---|
| 31 |
|
|---|
| 32 | enum MGFadcDispCommand {
|
|---|
| 33 |
|
|---|
| 34 | M_PIXELLIST = 4201 ,
|
|---|
| 35 | M_PREVEVT,
|
|---|
| 36 | M_NEXTEVT,
|
|---|
| 37 | M_EVTNUMBER,
|
|---|
| 38 |
|
|---|
| 39 | M_PREVPIXEL,
|
|---|
| 40 | M_NEXTPIXEL,
|
|---|
| 41 |
|
|---|
| 42 | M_PRINT,
|
|---|
| 43 | M_CLOSE
|
|---|
| 44 |
|
|---|
| 45 |
|
|---|
| 46 | };
|
|---|
| 47 |
|
|---|
| 48 | //
|
|---|
| 49 | //
|
|---|
| 50 |
|
|---|
| 51 | class MGFadcDisp : public TGTransientFrame {
|
|---|
| 52 |
|
|---|
| 53 | private:
|
|---|
| 54 |
|
|---|
| 55 | //
|
|---|
| 56 | // members to read in the file
|
|---|
| 57 | //
|
|---|
| 58 |
|
|---|
| 59 | MParList *pList ;
|
|---|
| 60 | MRawRunHeader *fRunHeader ;
|
|---|
| 61 | MRawEvtHeader *fEvtHeader ;
|
|---|
| 62 | MTime *fEvtTime ;
|
|---|
| 63 | MRawEvtData *fEvtData ;
|
|---|
| 64 | MRawCrateArray *fEvtCrate ;
|
|---|
| 65 |
|
|---|
| 66 | MReadTree *fReadTree ;
|
|---|
| 67 |
|
|---|
| 68 | //
|
|---|
| 69 | // members for the gui
|
|---|
| 70 | //
|
|---|
| 71 |
|
|---|
| 72 | // divide the whole frame in three subframes
|
|---|
| 73 |
|
|---|
| 74 | TGVerticalFrame *fFrameTop ;
|
|---|
| 75 | TGHorizontalFrame *fFrameMid, *fFrameLow ;
|
|---|
| 76 | TGHorizontal3DLine *fLineSep1, *fLineSep2 ;
|
|---|
| 77 |
|
|---|
| 78 | // members in the top frame
|
|---|
| 79 |
|
|---|
| 80 | TGHorizontalFrame *fTop1, *fTop2 ;
|
|---|
| 81 | TGLabel *fLabelFile, *fNameFile, *fLabelTree, *fNameTree ;
|
|---|
| 82 | TGTextButton *fButtonPrevEvt, *fButtonNextEvt ;
|
|---|
| 83 | TGLabel *fLabelEvtNr, *fLabelTotNr ;
|
|---|
| 84 | TGTextEntry *fTxtEvtNr ;
|
|---|
| 85 | TGTextBuffer *fTxtBufEvtNr ; //! no output for this member
|
|---|
| 86 | // neccessary to compile H.K.
|
|---|
| 87 |
|
|---|
| 88 | // members in the mid frame
|
|---|
| 89 |
|
|---|
| 90 | TGTab *fTabControl ;
|
|---|
| 91 | TGListBox *fPixelList ;
|
|---|
| 92 | TGVerticalFrame *fMid1 ;
|
|---|
| 93 | TGTextButton *fButtonPrevPix, *fButtonNextPix ;
|
|---|
| 94 | TGVSlider *fPixSlider ;
|
|---|
| 95 |
|
|---|
| 96 | TGTab *fTabDisplay ;
|
|---|
| 97 | TRootEmbeddedCanvas *fECanDigScope ;
|
|---|
| 98 |
|
|---|
| 99 | TCanvas *fCan ;
|
|---|
| 100 |
|
|---|
| 101 | // members in the low frame
|
|---|
| 102 |
|
|---|
| 103 | TGTextButton *fButtonPrint, *fButtonClose ;
|
|---|
| 104 |
|
|---|
| 105 | public:
|
|---|
| 106 |
|
|---|
| 107 | MGFadcDisp(char *filename, char *treename,
|
|---|
| 108 | const TGWindow *p, const TGWindow *main, UInt_t w, UInt_t h ) ;
|
|---|
| 109 |
|
|---|
| 110 | ~MGFadcDisp() ;
|
|---|
| 111 |
|
|---|
| 112 | void CloseWindow() ;
|
|---|
| 113 |
|
|---|
| 114 | void CreatePixelList(Int_t lastsel=-1) ;
|
|---|
| 115 | void UpdateEventCounter() ;
|
|---|
| 116 | void ReadinEvent(UInt_t iEvt) ;
|
|---|
| 117 |
|
|---|
| 118 | virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
|
|---|
| 119 |
|
|---|
| 120 | ClassDef(MGFadcDisp, 0)
|
|---|
| 121 | };
|
|---|
| 122 |
|
|---|
| 123 | #endif
|
|---|
| 124 |
|
|---|
| 125 |
|
|---|