Ignore:
Timestamp:
09/26/01 12:22:51 (23 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mmain/MDataCheck.cc

    r749 r947  
    4141: MBrowser(main, p, w, h)
    4242{
     43    TGTextButton *pedadc = new TGTextButton(fTop2, "ADC Spectra of Pedestals", M_BUTTON_PEDADC);
     44    TGTextButton *cradc  = new TGTextButton(fTop2, "ADC Specta of Cosmics",    M_BUTTON_CRADC);
     45    TGTextButton *pedtdc = new TGTextButton(fTop3, "TDC Spectra of Pedestals", M_BUTTON_PEDTDC);
     46    TGTextButton *crtdc  = new TGTextButton(fTop3, "TDC Specta of Cosmics",    M_BUTTON_CRTDC);
    4347
    44     fButPedADC = new TGTextButton(fTop2, "ADC Spectra of Pedestals", M_BUTTON_PEDADC );
    45     fButPedADC->Associate(this) ;
    46     fTop2->AddFrame (fButPedADC, new TGLayoutHints(kLHintsTop | kLHintsLeft, 10, 10, 5, 5) );
     48    pedadc->Associate(this);
     49    cradc ->Associate(this);
     50    pedtdc->Associate(this);
     51    crtdc ->Associate(this);
    4752
    48     fButCrADC = new TGTextButton(fTop2, "ADC Specta of Cosmics", M_BUTTON_CRADC );
    49     fButCrADC->Associate(this) ;
    50     fTop2->AddFrame (fButCrADC, new TGLayoutHints(kLHintsTop | kLHintsLeft, 10, 10, 5, 5) );
     53    fList->Add(pedadc);
     54    fList->Add(cradc);
     55    fList->Add(pedtdc);
     56    fList->Add(crtdc);
    5157
    52     fButPedTDC = new TGTextButton(fTop3, "TDC Spectra of Pedestals", M_BUTTON_PEDTDC );
    53     fButPedTDC->Associate(this) ;
    54     fTop3->AddFrame (fButPedTDC, new TGLayoutHints(kLHintsTop | kLHintsLeft, 10, 10, 5, 5) );
     58    TGLayoutHints *laybut = new TGLayoutHints(kLHintsTop|kLHintsLeft, 10, 10, 5, 5);
     59    fList->Add(laybut);
    5560
    56     fButCrTDC = new TGTextButton(fTop3, "TDC Specta of Cosmics", M_BUTTON_CRTDC );
    57     fButCrTDC->Associate(this) ;
    58     fTop3->AddFrame (fButCrTDC, new TGLayoutHints(kLHintsTop | kLHintsLeft, 10, 10, 5, 5) );
     61    fTop2->AddFrame(pedadc, laybut);
     62    fTop2->AddFrame(cradc,  laybut);
     63
     64    fTop3->AddFrame(pedtdc, laybut);
     65    fTop3->AddFrame(crtdc,  laybut);
    5966
    6067    MapSubwindows();
     
    6875}
    6976
    70 MDataCheck::~MDataCheck()
    71 {
    72     delete fButPedADC;
    73     delete fButCrADC;
    74     delete fButPedTDC;
    75     delete fButCrTDC;
    76 }
    77 
    7877// ======================================================================
    7978
    8079Bool_t MDataCheck::ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
    81 {     
    82   // Process events generated by the buttons in the frame.
    83  
     80{
     81    // Process events generated by the buttons in the frame.
     82
    8483    if (GET_MSG(msg)!=kC_COMMAND || GET_SUBMSG(msg)!=kCM_BUTTON)
    8584        return MBrowser::ProcessMessage(msg, parm1, parm2);
     
    9291    case M_BUTTON_CRTDC:
    9392        if (!InputFileSelected())
    94         {     
     93        {
    9594            DisplError("No Input (root) File selected!");
    9695            return kTRUE;
     
    10099        {
    101100        case M_BUTTON_PEDADC:
    102             fViewAdc.AdcSpectra(fInputFile, "PedEvents" ) ;
     101            fViewAdc.AdcSpectra(fInputFile, "PedEvents");
    103102            return kTRUE;
    104103
    105104        case M_BUTTON_CRADC:
    106             fViewAdc.AdcSpectra(fInputFile, "Events" ) ;
     105            fViewAdc.AdcSpectra(fInputFile, "Events");
    107106            return kTRUE;
    108107
     
    118117
    119118    return MBrowser::ProcessMessage(msg, parm1, parm2);
    120 } 
     119}
Note: See TracChangeset for help on using the changeset viewer.