ROOT logo
#include "hedgui.h"
#include "hedhelpers.h"

#include "TObject.h"

#include "TRootBrowser.h"
#include "TString.h"
#include "TSystem.h"
#include "TROOT.h"

#include "TEveManager.h"
#include "TEveBrowser.h"
#include "TEveScene.h"
#include "TEveViewer.h"

#include "TColor.h"
#include "TGFrame.h"
#include "TGButton.h"
#include "TGeoVolume.h"
#include "TGeoNode.h"
#include "TEveGeoNode.h"
#include "TColor.h"


#include <iostream>
using namespace std;

ClassImp(HEDColorDef)
ClassImp(HEDNumberLabeled)
ClassImp(HEDSetup)



//----------------------------------------------------------------
HEDColorDef*     HEDColorDef::gEDColorDef = 0;
TEveGeoTopNode*  HEDColorDef::gGeoTopNode = 0;
Int_t HEDColorDef::colMDC[4] = {kRed,kRed,kRed,kRed};
Int_t HEDColorDef::colTOF    = kGreen;
Int_t HEDColorDef::colRPC    = kBlue;
Int_t HEDColorDef::colSHOWER = kMagenta;
Int_t HEDColorDef::colRICH   = kGray;
Int_t HEDColorDef::colFRAMES = kYellow;
Int_t HEDColorDef::colCOILS  = kGray;
Int_t HEDColorDef::colWALL   = kGray;

Int_t HEDColorDef::transMDC[4] = {60,60,60,60};
Int_t HEDColorDef::transTOF    = 60;
Int_t HEDColorDef::transRPC    = 85;
Int_t HEDColorDef::transSHOWER = 60;
Int_t HEDColorDef::transRICH   = 60;
Int_t HEDColorDef::transFRAMES = 60;
Int_t HEDColorDef::transCOILS  = 60;
Int_t HEDColorDef::transWALL   = 60;

void HEDColorDef::showSec(Bool_t show, Int_t sec){
    TString name = Form("SEC%i",sec+1);
    TString volname;
    for(Int_t i=0; i<volSEC.GetEntries(); i++){
        TGeoVolume* vol = (TGeoVolume*) volSEC[i];
        volname = vol->GetName();
	if(volname.CompareTo(name.Data())==0) {
	    vol->SetVisibility(show);
	    vol->SetVisDaughters(show);
	}
    }
}

void HEDColorDef::showCoils(Bool_t show){
    for(Int_t i=0; i<volCOILS.GetEntries(); i++){
        TGeoVolume* vol = (TGeoVolume*) volCOILS[i];
	vol->SetVisibility(show);
    }
}

void HEDColorDef::showFrames(Bool_t show){
    for(Int_t i=0; i<volFRAMES.GetEntries(); i++){
        TGeoVolume* vol = (TGeoVolume*) volFRAMES[i];
	vol->SetVisibility(show);
    }
}

void HEDColorDef::showWall(Bool_t show){
    for(Int_t i=0; i<volWALL.GetEntries(); i++){
        TGeoVolume* vol = (TGeoVolume*) volWALL[i];
	vol->SetVisibility(show);
    }
}

void HEDColorDef::showRich(Bool_t show){
    for(Int_t i=0; i<volRICH.GetEntries(); i++){
        TGeoVolume* vol = (TGeoVolume*) volRICH[i];
	vol->SetVisibility(show);
    }
}

void HEDColorDef::showMdc(Bool_t show, Int_t sec, Int_t mod){
    for(Int_t i=0; i<nodesMDC.GetEntries(); i++){
	TGeoNode* vol = (TGeoNode*) nodesMDC[i];
        TString name = vol->GetName();
	if(sec < 0 || name.CompareTo(Form("DR%iM_%i",mod+1,sec+1)) == 0){
	    vol->SetVisibility(show);
	    vol->SetVisDaughters(show);
	}

    }
}

void HEDColorDef::showTof(Bool_t show, Int_t sec){
    for(Int_t i=0; i<nodesTOF.GetEntries(); i++){
        TGeoNode* vol = (TGeoNode*) nodesTOF[i];
        TString name = vol->GetName();
	if(sec < 0 || name.Contains(Form("_%i",sec+1))){
	    vol->SetVisibility(show);
	    vol->SetVisDaughters(show);
	}
    }
}

void HEDColorDef::showRpc(Bool_t show, Int_t sec){
    for(Int_t i=0; i<nodesRPC.GetEntries(); i++){
        TGeoNode* vol = (TGeoNode*) nodesRPC[i];
        TString name = vol->GetName();
	if(sec < 0 || name.CompareTo(Form("EBOX_%i",sec+1)) == 0){
	    vol->SetVisibility(show);
	    vol->SetVisDaughters(show);
	}
    }
}

void HEDColorDef::showShower(Bool_t show, Int_t sec){
    for(Int_t i=0; i<nodesSHOWER.GetEntries(); i++){
	TGeoNode* vol = (TGeoNode*) nodesSHOWER[i];
	TString name = vol->GetName();
	if(sec < 0 ||
	   name.CompareTo(Form("SHK%i_1",sec+1)) == 0 ||
	   name.CompareTo(Form("GMOM_%i",sec+1)) == 0
	  ){
	    vol->SetVisibility(show);
	    vol->SetVisDaughters(show);
	}
    }
}


void HEDColorDef::colRich(Pixel_t pixel, Int_t trans){
    for(Int_t i=0; i<volRICH.GetEntries(); i++){
	TGeoVolume* vol = (TGeoVolume*) volRICH[i];
	vol->SetLineColor(TColor::GetColor(pixel));
        if(trans != -1) vol->SetTransparency(trans);
    }
}
void HEDColorDef::colMdc(Pixel_t pixel, Int_t trans,Int_t mod){

    Int_t istart,imax;
    if(mod == -1) { istart = 0; imax = 4;}
    else          { istart = mod; imax = mod + 1; }
    for(Int_t i = istart; i<imax&&i<volMDC.GetEntries(); i++){
	TGeoVolume* vol = (TGeoVolume*) volMDC[i];
	vol->SetLineColor(TColor::GetColor(pixel));
	if(trans != -1) vol->SetTransparency(trans);
    }
}
void HEDColorDef::colTof(Pixel_t pixel, Int_t trans){
    for(Int_t i=0; i<volTOF.GetEntries(); i++){
	TGeoVolume* vol = (TGeoVolume*) volTOF[i];
	vol->SetLineColor(TColor::GetColor(pixel));
	if(trans != -1) vol->SetTransparency(trans);
    }
}
void HEDColorDef::colRpc(Pixel_t pixel, Int_t trans){
    for(Int_t i=0; i<volRPC.GetEntries(); i++){
	TGeoVolume* vol = (TGeoVolume*) volRPC[i];
	vol->SetLineColor(TColor::GetColor(pixel));
	if(trans != -1) vol->SetTransparency(trans);
    }
}
void HEDColorDef::colShower(Pixel_t pixel, Int_t trans){
    for(Int_t i=0; i<volSHOWER.GetEntries(); i++){
	TGeoVolume* vol = (TGeoVolume*) volSHOWER[i];
	vol->SetLineColor(TColor::GetColor(pixel));
	if(trans != -1) vol->SetTransparency(trans);
    }
}
void HEDColorDef::colWall(Pixel_t pixel, Int_t trans){
    for(Int_t i=0; i<volWALL.GetEntries(); i++){
	TGeoVolume* vol = (TGeoVolume*) volWALL[i];
	vol->SetLineColor(TColor::GetColor(pixel));
	if(trans != -1) vol->SetTransparency(trans);
    }
}
void HEDColorDef::colFrames(Pixel_t pixel, Int_t trans){
    for(Int_t i=0; i<volFRAMES.GetEntries(); i++){
	TGeoVolume* vol = (TGeoVolume*) volFRAMES[i];
	vol->SetLineColor(TColor::GetColor(pixel));
	if(trans != -1) vol->SetTransparency(trans);
    }
}
void HEDColorDef::colCoils(Pixel_t pixel, Int_t trans){
    for(Int_t i=0; i<volCOILS.GetEntries(); i++){
	TGeoVolume* vol = (TGeoVolume*) volCOILS[i];
	vol->SetLineColor(TColor::GetColor(pixel));
	if(trans != -1) vol->SetTransparency(trans);
    }
}
//----------------------------------------------------------------






//----------------------------------------------------------------
HEDSetup* HEDSetup::gEDSetup = 0;

HEDSetup::HEDSetup(const TGWindow *p, UInt_t w, UInt_t h)
    : TGMainFrame(p, w, h)
{

    Int_t width  = 300;
    Int_t height = 100;

    SetCleanup(kDeepCleanup);
    DontCallClose();

    HEDColorDef* colorDef = HEDColorDef::getEDColorDef();

    TGVerticalFrame *fHLMaster = new TGVerticalFrame(this,width,height,kLHintsTop|kLHintsLeft);


    //-------------------------------------------------------------
    // sector check boxes
    TGHorizontalFrame *fHL2 = new TGHorizontalFrame(fHLMaster, 1, 1,kLHintsTop);
    TGGroupFrame* fButtonGroupSec = new TGGroupFrame(fHL2, "Sector setup",kVerticalFrame);

    fCheckSector[0] = new TGCheckButton(fButtonGroupSec, new TGHotString("S 0"), IDs.GetUnID());
    fButtonGroupSec->AddFrame(fCheckSector[0], new TGLayoutHints(kLHintsLeft, 0, 2, 1, 1));

    fCheckSector[1] = new TGCheckButton(fButtonGroupSec, new TGHotString("S 1"), IDs.GetUnID());
    fButtonGroupSec->AddFrame(fCheckSector[1], new TGLayoutHints(kLHintsLeft, 0, 2, 1, 1));

    fCheckSector[2] = new TGCheckButton(fButtonGroupSec, new TGHotString("S 2"), IDs.GetUnID());
    fButtonGroupSec->AddFrame(fCheckSector[2], new TGLayoutHints(kLHintsLeft, 0, 2, 1, 1));

    fCheckSector[3] = new TGCheckButton(fButtonGroupSec, new TGHotString("S 3"), IDs.GetUnID());
    fButtonGroupSec->AddFrame(fCheckSector[3], new TGLayoutHints(kLHintsLeft, 0, 2, 1, 1));

    fCheckSector[4] = new TGCheckButton(fButtonGroupSec, new TGHotString("S 4"), IDs.GetUnID());
    fButtonGroupSec->AddFrame(fCheckSector[4], new TGLayoutHints(kLHintsLeft, 0, 2, 1, 1));

    fCheckSector[5] = new TGCheckButton(fButtonGroupSec, new TGHotString("S 5"), IDs.GetUnID());
    fButtonGroupSec->AddFrame(fCheckSector[5], new TGLayoutHints(kLHintsLeft | kLHintsTop, 0, 2, 1, 1));

    fHL2->AddFrame(fButtonGroupSec, new TGLayoutHints(kLHintsLeft | kLHintsTop, 1, 1, 1, 1));
    //-------------------------------------------------------------

    //-------------------------------------------------------------
    // volume check boxes
    TGGroupFrame* fButtonGroupVol = new TGGroupFrame(fHL2, "Volumes setup",kVerticalFrame);
    TColor* col;

    TGHorizontalFrame *fH = new TGHorizontalFrame(fButtonGroupVol, 1, 1,kLHintsTop);
    col = gROOT->GetColor(colorDef->colRICH);
    colRICH = new TGColorSelect(fH,col->GetPixel(), 0);
    fH->AddFrame(colRICH, new TGLayoutHints(kLHintsTop | kLHintsLeft, 2, 0, 2, 2));
    transRICH = new TGNumberEntry(fH, colorDef->transRICH, 3, -1, TGNumberFormat::kNESInteger);
    transRICH->SetLimits(TGNumberFormat::kNELLimitMinMax,0,100);
    fH->AddFrame(transRICH, new TGLayoutHints(kLHintsTop | kLHintsLeft, 2, 0, 2, 2));
    fCheckRICH   = new TGCheckButton(fH, new TGHotString("RICH"),   IDs.GetUnID());
    fH->AddFrame(fCheckRICH, new TGLayoutHints(kLHintsLeft, 0, 2, 1, 1));
    fButtonGroupVol->AddFrame(fH, new TGLayoutHints(kLHintsExpandX, 0, 2, 1, 1));


    //---------------------MDC-------------------------------------
    // MDC0
    fH = new TGHorizontalFrame(fButtonGroupVol, 1, 1,kLHintsTop);
    col = gROOT->GetColor(colorDef->colMDC[0]);
    colMDC[0] = new TGColorSelect(fH,col->GetPixel(), 0);
    fH->AddFrame(colMDC[0], new TGLayoutHints(kLHintsTop | kLHintsLeft, 2, 0, 2, 2));
    transMDC[0] = new TGNumberEntry(fH, colorDef->transMDC[0], 3, -1, TGNumberFormat::kNESInteger);
    transMDC[0]->SetLimits(TGNumberFormat::kNELLimitMinMax,0,100);
    fH->AddFrame(transMDC[0], new TGLayoutHints(kLHintsTop | kLHintsLeft, 2, 0, 2, 2));
    fCheckMDC[0]    = new TGCheckButton(fH, new TGHotString("MDC0"),    IDs.GetUnID());
    fH->AddFrame(fCheckMDC[0], new TGLayoutHints(kLHintsLeft, 0, 2, 1, 1));
    fButtonGroupVol->AddFrame(fH, new TGLayoutHints(kLHintsExpandX, 0, 2, 1, 1));
    // MDC1
    fH = new TGHorizontalFrame(fButtonGroupVol, 1, 1,kLHintsTop);
    col = gROOT->GetColor(colorDef->colMDC[1]);
    colMDC[1] = new TGColorSelect(fH,col->GetPixel(), 0);
    fH->AddFrame(colMDC[1], new TGLayoutHints(kLHintsTop | kLHintsLeft, 2, 0, 2, 2));
    transMDC[1] = new TGNumberEntry(fH, colorDef->transMDC[1], 3, -1, TGNumberFormat::kNESInteger);
    transMDC[1]->SetLimits(TGNumberFormat::kNELLimitMinMax,0,100);
    fH->AddFrame(transMDC[1], new TGLayoutHints(kLHintsTop | kLHintsLeft, 2, 0, 2, 2));
    fCheckMDC[1]    = new TGCheckButton(fH, new TGHotString("MDC1"),    IDs.GetUnID());
    fH->AddFrame(fCheckMDC[1], new TGLayoutHints(kLHintsLeft, 0, 2, 1, 1));
    fButtonGroupVol->AddFrame(fH, new TGLayoutHints(kLHintsExpandX, 0, 2, 1, 1));
    // MDC2
    fH = new TGHorizontalFrame(fButtonGroupVol, 1, 1,kLHintsTop);
    col = gROOT->GetColor(colorDef->colMDC[2]);
    colMDC[2] = new TGColorSelect(fH,col->GetPixel(), 0);
    fH->AddFrame(colMDC[2], new TGLayoutHints(kLHintsTop | kLHintsLeft, 2, 0, 2, 2));
    transMDC[2] = new TGNumberEntry(fH, colorDef->transMDC[2], 3, -1, TGNumberFormat::kNESInteger);
    transMDC[2]->SetLimits(TGNumberFormat::kNELLimitMinMax,0,100);
    fH->AddFrame(transMDC[2], new TGLayoutHints(kLHintsTop | kLHintsLeft, 2, 0, 2, 2));
    fCheckMDC[2]    = new TGCheckButton(fH, new TGHotString("MDC2"),    IDs.GetUnID());
    fH->AddFrame(fCheckMDC[2], new TGLayoutHints(kLHintsLeft, 0, 2, 1, 1));
    fButtonGroupVol->AddFrame(fH, new TGLayoutHints(kLHintsExpandX, 0, 2, 1, 1));
    // MDC3
    fH = new TGHorizontalFrame(fButtonGroupVol, 1, 1,kLHintsTop);
    col = gROOT->GetColor(colorDef->colMDC[3]);
    colMDC[3] = new TGColorSelect(fH,col->GetPixel(), 0);
    fH->AddFrame(colMDC[3], new TGLayoutHints(kLHintsTop | kLHintsLeft, 2, 0, 2, 2));
    transMDC[3] = new TGNumberEntry(fH, colorDef->transMDC[3], 3, -1, TGNumberFormat::kNESInteger);
    transMDC[3]->SetLimits(TGNumberFormat::kNELLimitMinMax,0,100);
    fH->AddFrame(transMDC[3], new TGLayoutHints(kLHintsTop | kLHintsLeft, 2, 0, 2, 2));
    fCheckMDC[3]    = new TGCheckButton(fH, new TGHotString("MDC3"),    IDs.GetUnID());
    fH->AddFrame(fCheckMDC[3], new TGLayoutHints(kLHintsLeft, 0, 2, 1, 1));
    fButtonGroupVol->AddFrame(fH, new TGLayoutHints(kLHintsExpandX, 0, 2, 1, 1));
    //--------------------------------------------------------------




    fH = new TGHorizontalFrame(fButtonGroupVol, 1, 1,kLHintsTop);
    col = gROOT->GetColor(colorDef->colTOF);
    colTOF = new TGColorSelect(fH, col->GetPixel(), 0);
    fH->AddFrame(colTOF, new TGLayoutHints(kLHintsTop | kLHintsLeft, 2, 0, 2, 2));
    transTOF = new TGNumberEntry(fH, colorDef->transTOF, 3, -1, TGNumberFormat::kNESInteger);
    transTOF->SetLimits(TGNumberFormat::kNELLimitMinMax,0,100);
    fH->AddFrame(transTOF, new TGLayoutHints(kLHintsTop | kLHintsLeft, 2, 0, 2, 2));
    fCheckTOF    = new TGCheckButton(fH, new TGHotString("TOF"),    IDs.GetUnID());
    fH->AddFrame(fCheckTOF, new TGLayoutHints(kLHintsLeft, 0, 2, 1, 1));
    fButtonGroupVol->AddFrame(fH, new TGLayoutHints(kLHintsExpandX, 0, 2, 1, 1));


    fH = new TGHorizontalFrame(fButtonGroupVol, 1, 1,kLHintsTop);
    col = gROOT->GetColor(colorDef->colRPC);
    colRPC = new TGColorSelect(fH, col->GetPixel(), 0);
    fH->AddFrame(colRPC, new TGLayoutHints(kLHintsTop | kLHintsLeft, 2, 0, 2, 2));
    transRPC = new TGNumberEntry(fH, colorDef->transRPC, 3, -1, TGNumberFormat::kNESInteger);
    transRPC->SetLimits(TGNumberFormat::kNELLimitMinMax,0,100);
    fH->AddFrame(transRPC, new TGLayoutHints(kLHintsTop | kLHintsLeft, 2, 0, 2, 2));
    fCheckRPC    = new TGCheckButton(fH, new TGHotString("RPC"),    IDs.GetUnID());
    fH->AddFrame(fCheckRPC, new TGLayoutHints(kLHintsLeft, 0, 2, 1, 1));
    fButtonGroupVol->AddFrame(fH, new TGLayoutHints(kLHintsExpandX, 0, 2, 1, 1));

    fH = new TGHorizontalFrame(fButtonGroupVol, 1, 1,kLHintsTop);
    col = gROOT->GetColor(colorDef->colWALL);
    colWALL = new TGColorSelect(fH, col->GetPixel(), 0);
    fH->AddFrame(colWALL, new TGLayoutHints(kLHintsTop | kLHintsLeft, 2, 0, 2, 2));
    transWALL = new TGNumberEntry(fH, colorDef->transWALL, 3, -1, TGNumberFormat::kNESInteger);
    transWALL->SetLimits(TGNumberFormat::kNELLimitMinMax,0,100);
    fH->AddFrame(transWALL, new TGLayoutHints(kLHintsTop | kLHintsLeft, 2, 0, 2, 2));
    fCheckWALL    = new TGCheckButton(fH, new TGHotString("WALL"),    IDs.GetUnID());
    fH->AddFrame(fCheckWALL, new TGLayoutHints(kLHintsLeft, 0, 2, 1, 1));
    fButtonGroupVol->AddFrame(fH, new TGLayoutHints(kLHintsExpandX, 0, 2, 1, 1));


    fH = new TGHorizontalFrame(fButtonGroupVol, 1, 1,kLHintsTop);
    col = gROOT->GetColor(colorDef->colSHOWER);
    colSHOWER = new TGColorSelect(fH, col->GetPixel(), 0);
    fH->AddFrame(colSHOWER, new TGLayoutHints(kLHintsTop | kLHintsLeft, 2, 0, 2, 2));
    transSHOWER = new TGNumberEntry(fH, colorDef->transSHOWER, 3, -1, TGNumberFormat::kNESInteger);
    transSHOWER->SetLimits(TGNumberFormat::kNELLimitMinMax,0,100);
    fH->AddFrame(transSHOWER, new TGLayoutHints(kLHintsTop | kLHintsLeft, 2, 0, 2, 2));
    if(!HEDTransform::isEmc()) fCheckSHOWER = new TGCheckButton(fH, new TGHotString("SHOWER"), IDs.GetUnID());
    else                       fCheckSHOWER = new TGCheckButton(fH, new TGHotString("ECAL"), IDs.GetUnID());
    fH->AddFrame(fCheckSHOWER, new TGLayoutHints(kLHintsLeft, 0, 2, 1, 1));
    fButtonGroupVol->AddFrame(fH, new TGLayoutHints(kLHintsExpandX, 0, 2, 1, 1));


    fH = new TGHorizontalFrame(fButtonGroupVol, 1, 1,kLHintsTop);
    col = gROOT->GetColor(colorDef->colFRAMES);
    colFRAMES = new TGColorSelect(fH, col->GetPixel(), 0);
    fH->AddFrame(colFRAMES, new TGLayoutHints(kLHintsTop | kLHintsLeft, 2, 0, 2, 2));
    transFRAMES = new TGNumberEntry(fH, colorDef->transFRAMES, 3, -1, TGNumberFormat::kNESInteger);
    transFRAMES->SetLimits(TGNumberFormat::kNELLimitMinMax,0,100);
    fH->AddFrame(transFRAMES, new TGLayoutHints(kLHintsTop | kLHintsLeft, 2, 0, 2, 2));
    fCheckFRAMES = new TGCheckButton(fH, new TGHotString("FRAMES"), IDs.GetUnID());
    fH->AddFrame(fCheckFRAMES, new TGLayoutHints(kLHintsLeft, 0, 2, 1, 1));
    fButtonGroupVol->AddFrame(fH, new TGLayoutHints(kLHintsExpandX, 0, 2, 1, 1));


    fH = new TGHorizontalFrame(fButtonGroupVol, 1, 1,kLHintsTop);
    col = gROOT->GetColor(colorDef->colCOILS);
    colCOILS = new TGColorSelect(fH, col->GetPixel(), 0);
    fH->AddFrame(colCOILS, new TGLayoutHints(kLHintsTop | kLHintsLeft, 2, 0, 2, 2));
    transCOILS = new TGNumberEntry(fH, colorDef->transCOILS, 3, -1, TGNumberFormat::kNESInteger);
    transCOILS->SetLimits(TGNumberFormat::kNELLimitMinMax,0,100);
    fH->AddFrame(transCOILS, new TGLayoutHints(kLHintsTop | kLHintsLeft, 2, 0, 2, 2));
    fCheckCOILS  = new TGCheckButton(fH, new TGHotString("COILS"),  IDs.GetUnID());
    fH->AddFrame(fCheckCOILS, new TGLayoutHints(kLHintsLeft | kLHintsTop, 0, 2, 1, 1));
    fButtonGroupVol->AddFrame(fH, new TGLayoutHints(kLHintsExpandX, 0, 2, 1, 1));


    fHL2->AddFrame(fButtonGroupVol, new TGLayoutHints(kLHintsRight | kLHintsTop, 1, 1, 1, 1));
    //-------------------------------------------------------------

    fHLMaster->AddFrame(fHL2);
    //-------------------------------------------------------------


    //-------------------------------------------------------------
    // timed check boxes
    TGHorizontalFrame *fHL3 = new TGHorizontalFrame(fHLMaster, width, height);
    TGGroupFrame *grouploop = new TGGroupFrame(fHL3, "run loop",kHorizontalFrame);
    grouploop->SetTitlePos(TGGroupFrame::kCenter);

    fCheckTimed = new TGCheckButton(grouploop, new TGHotString("run loop"),   IDs.GetUnID());
    grouploop->AddFrame(fCheckTimed, new TGLayoutHints(kLHintsLeft, 0, 2, 1, 1));
    fNumberLoopTime = new HEDNumberLabeled(grouploop, "seconds");
    grouploop->AddFrame(fNumberLoopTime, new TGLayoutHints(kLHintsRight, 0, 2, 1, 1));

    fHL3->AddFrame(grouploop, new TGLayoutHints(kLHintsExpandX, 1, 1, 1, 1));
    fHLMaster->AddFrame(fHL3);
    //-------------------------------------------------------------


    //-------------------------------------------------------------
    TGHorizontalFrame *fHL5 = new TGHorizontalFrame(fHLMaster, width, height);
    TGGroupFrame *groupMDC  = new TGGroupFrame(fHL5, "MDC modules");
    groupMDC->SetTitlePos(TGGroupFrame::kCenter);

    TGMatrixLayout* matrix = new TGMatrixLayout(groupMDC,6,4);
    groupMDC->SetLayoutManager(matrix);
    for(Int_t s = 0; s < 6; s ++){
	for(Int_t m = 0; m < 4; m ++){
	    fCheckMDCMod[s][m] = new TGCheckButton(groupMDC, new TGHotString(Form("S%iM%i",s,m)),IDs.GetUnID());
	    groupMDC->AddFrame(fCheckMDCMod[s][m]);
	}
    }
    fHL5->AddFrame(groupMDC, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
    fHLMaster->AddFrame(fHL5);
    //-------------------------------------------------------------

    //-------------------------------------------------------------
    TGHorizontalFrame *fHL6 = new TGHorizontalFrame(fHLMaster, width, height);
    TGGroupFrame *groupTOF  = new TGGroupFrame(fHL6, "TOF sectors",kHorizontalFrame);
    groupTOF->SetTitlePos(TGGroupFrame::kCenter);

    for(Int_t s = 0; s < 6; s ++){
	fCheckTOFSec[s] = new TGCheckButton(groupTOF, new TGHotString(Form("S%i",s)),IDs.GetUnID());
	groupTOF->AddFrame(fCheckTOFSec[s]);
    }
    fHL6->AddFrame(groupTOF, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
    fHLMaster->AddFrame(fHL6);
    //-------------------------------------------------------------

    //-------------------------------------------------------------
    TGHorizontalFrame *fHL7 = new TGHorizontalFrame(fHLMaster, width, height);
    TGGroupFrame *groupRPC  = new TGGroupFrame(fHL7, "RPC sectors",kHorizontalFrame);
    groupRPC->SetTitlePos(TGGroupFrame::kCenter);

    for(Int_t s = 0; s < 6; s ++){
	fCheckRPCSec[s] = new TGCheckButton(groupRPC, new TGHotString(Form("S%i",s)),IDs.GetUnID());
	groupRPC->AddFrame(fCheckRPCSec[s]);
    }
    fHL7->AddFrame(groupRPC, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
    fHLMaster->AddFrame(fHL7);
    //-------------------------------------------------------------

    //-------------------------------------------------------------
    TString namegroup = "SHOWER sectors";
    if(HEDTransform::isEmc()) namegroup ="ECAL sectors";

    TGHorizontalFrame *fHL8 = new TGHorizontalFrame(fHLMaster, width, height);
    TGGroupFrame *groupSHOWER  = new TGGroupFrame(fHL8, namegroup.Data(),kHorizontalFrame);
    groupSHOWER->SetTitlePos(TGGroupFrame::kCenter);

    for(Int_t s = 0; s < 6; s ++){
	fCheckSHOWERSec[s] = new TGCheckButton(groupSHOWER, new TGHotString(Form("S%i",s)),IDs.GetUnID());
	groupSHOWER->AddFrame(fCheckSHOWERSec[s]);
    }
    fHL8->AddFrame(groupSHOWER, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
    fHLMaster->AddFrame(fHL8);
    //-------------------------------------------------------------


    //-------------------------------------------------------------
    // redraw event button
    TGHorizontalFrame *fHL4 = new TGHorizontalFrame(fHLMaster, width, height, kFixedWidth);


    fRedraw = new TGTextButton   (fHL4,"Redraw", IDs.GetUnID());
    fRedraw->SetToolTipText("Click here to redraw display after option change");
    fRedraw->Connect("Clicked()", "HEDSetup", this , "reDraw()");
    fHL4->AddFrame(fRedraw, new TGLayoutHints(kLHintsExpandX));
    fHLMaster->AddFrame(fHL4, new TGLayoutHints(kLHintsCenterX, 1, 1, 1, 1));
    //-------------------------------------------------------------


    AddFrame(fHLMaster);


    //-------------------------------------------------------------
    //Default state

    for(Int_t i=0;i<6;i++){  fCheckSector[i]->SetOn(); } // default on
    for(Int_t s=0;s<6;s++){
	fCheckTOFSec[s]   ->SetOn();
	fCheckRPCSec[s]   ->SetOn();
	fCheckSHOWERSec[s]->SetOn();
	for(Int_t m=0;m<4;m++){
	    fCheckMDCMod[s][m]->SetOn();
	}
    } // default on
    fCheckRICH  ->SetOn();
    for(Int_t i=0;i<4;i++){ fCheckMDC[i]->SetOn();}
    fCheckTOF   ->SetOn();
    fCheckRPC   ->SetOn();
    fCheckSHOWER->SetOn();
    fCheckWALL  ->SetOn();
    fCheckFRAMES->SetOn();
    fCheckCOILS ->SetOn();

    fCheckTimed    ->SetOn(kFALSE);
    fNumberLoopTime->GetTGNumberEntry()->SetIntNumber(5);
    fNumberLoopTime->GetTGNumberEntry()->SetLimits(TGNumberFormat::kNELLimitMinMax,1,100);

    SetWindowName("Display Setup");
    MapSubwindows();
    Resize(GetDefaultSize()); //
    MapWindow();
    //-------------------------------------------------------------

}

HEDSetup::~HEDSetup()
{
    // Destructor.
    cout<<"CLEANUP"<<endl;
    Cleanup();
}

void HEDSetup::reDraw(){
    HEDColorDef* colorDef = HEDColorDef::getEDColorDef();

    Bool_t isOn = kFALSE;

    isOn = fCheckRICH->IsOn();
    colorDef->showRich(isOn);

    isOn = fCheckWALL->IsOn();
    colorDef->showWall(isOn);

    for(Int_t i=0;i<4;i++){
	isOn = fCheckMDC[i]->IsOn();
	for(Int_t s = 0; s < 6; s++){
	    colorDef->showMdc(isOn,s,i);
	}
    }

    isOn = fCheckTOF->IsOn();
    colorDef->showTof(isOn,-1);

    isOn = fCheckRPC->IsOn();
    colorDef->showRpc(isOn,-1);

    isOn = fCheckSHOWER->IsOn();
    colorDef->showShower(isOn,-1);

    isOn = fCheckCOILS->IsOn();
    colorDef->showCoils(isOn);

    isOn = fCheckFRAMES->IsOn();
    colorDef->showFrames(isOn);


    for(Int_t s = 0; s < 6; s++){
	isOn = fCheckSector[s]->IsOn();
        colorDef->showSec(isOn,s);
    }

    for(Int_t s = 0; s < 6; s++){
	for(Int_t m = 0; m < 4; m++){

	    if(fCheckMDC[m]->IsOn()       &&  // MDC    has priority
	       fCheckSector[s]->IsOn()        // sector has priority
	      ) {
		isOn = fCheckMDCMod[s][m]->IsOn();
		colorDef->showMdc(isOn,s,m);
	    }
	}
    }

    for(Int_t s = 0; s < 6; s++){
	if(fCheckTOF->IsOn()       &&  // TOF    has priority
	   fCheckSector[s]->IsOn()     // sector has priority
	  ) {
	    isOn = fCheckTOFSec[s]->IsOn();
	    colorDef->showTof(isOn,s);
	}
    }

    for(Int_t s = 0; s < 6; s++){
	if(fCheckRPC->IsOn()       &&  // RPC    has priority
	   fCheckSector[s]->IsOn()     // sector has priority
	  ) {
	    isOn = fCheckRPCSec[s]->IsOn();
	    colorDef->showRpc(isOn,s);
	}
    }

    for(Int_t s = 0; s < 6; s++){
	if(fCheckSHOWER->IsOn()       &&  // SHOWER has priority
	   fCheckSector[s]->IsOn()        // sector has priority
	  ) {
	    isOn = fCheckSHOWERSec[s]->IsOn();
	    colorDef->showShower(isOn,s);
	}
    }
    colorDef->colRich  (colRICH  ->GetColor(),transRICH  ->GetIntNumber());
    for(Int_t m = 0; m < 4; m++){
	colorDef->colMdc(colMDC[m]->GetColor(),transMDC[m]->GetIntNumber(),m);
    }
    colorDef->colTof   (colTOF   ->GetColor(),transTOF   ->GetIntNumber());
    colorDef->colRpc   (colRPC   ->GetColor(),transRPC   ->GetIntNumber());
    colorDef->colShower(colSHOWER->GetColor(),transSHOWER->GetIntNumber());
    colorDef->colWall  (colWALL  ->GetColor(),transWALL  ->GetIntNumber());
    colorDef->colFrames(colFRAMES->GetColor(),transFRAMES->GetIntNumber());
    colorDef->colCoils (colCOILS ->GetColor(),transCOILS ->GetIntNumber());


    gEve->GetGlobalScene()->Changed();
    gEve->DoRedraw3D();
}
//----------------------------------------------------------------



 hedgui.cc:1
 hedgui.cc:2
 hedgui.cc:3
 hedgui.cc:4
 hedgui.cc:5
 hedgui.cc:6
 hedgui.cc:7
 hedgui.cc:8
 hedgui.cc:9
 hedgui.cc:10
 hedgui.cc:11
 hedgui.cc:12
 hedgui.cc:13
 hedgui.cc:14
 hedgui.cc:15
 hedgui.cc:16
 hedgui.cc:17
 hedgui.cc:18
 hedgui.cc:19
 hedgui.cc:20
 hedgui.cc:21
 hedgui.cc:22
 hedgui.cc:23
 hedgui.cc:24
 hedgui.cc:25
 hedgui.cc:26
 hedgui.cc:27
 hedgui.cc:28
 hedgui.cc:29
 hedgui.cc:30
 hedgui.cc:31
 hedgui.cc:32
 hedgui.cc:33
 hedgui.cc:34
 hedgui.cc:35
 hedgui.cc:36
 hedgui.cc:37
 hedgui.cc:38
 hedgui.cc:39
 hedgui.cc:40
 hedgui.cc:41
 hedgui.cc:42
 hedgui.cc:43
 hedgui.cc:44
 hedgui.cc:45
 hedgui.cc:46
 hedgui.cc:47
 hedgui.cc:48
 hedgui.cc:49
 hedgui.cc:50
 hedgui.cc:51
 hedgui.cc:52
 hedgui.cc:53
 hedgui.cc:54
 hedgui.cc:55
 hedgui.cc:56
 hedgui.cc:57
 hedgui.cc:58
 hedgui.cc:59
 hedgui.cc:60
 hedgui.cc:61
 hedgui.cc:62
 hedgui.cc:63
 hedgui.cc:64
 hedgui.cc:65
 hedgui.cc:66
 hedgui.cc:67
 hedgui.cc:68
 hedgui.cc:69
 hedgui.cc:70
 hedgui.cc:71
 hedgui.cc:72
 hedgui.cc:73
 hedgui.cc:74
 hedgui.cc:75
 hedgui.cc:76
 hedgui.cc:77
 hedgui.cc:78
 hedgui.cc:79
 hedgui.cc:80
 hedgui.cc:81
 hedgui.cc:82
 hedgui.cc:83
 hedgui.cc:84
 hedgui.cc:85
 hedgui.cc:86
 hedgui.cc:87
 hedgui.cc:88
 hedgui.cc:89
 hedgui.cc:90
 hedgui.cc:91
 hedgui.cc:92
 hedgui.cc:93
 hedgui.cc:94
 hedgui.cc:95
 hedgui.cc:96
 hedgui.cc:97
 hedgui.cc:98
 hedgui.cc:99
 hedgui.cc:100
 hedgui.cc:101
 hedgui.cc:102
 hedgui.cc:103
 hedgui.cc:104
 hedgui.cc:105
 hedgui.cc:106
 hedgui.cc:107
 hedgui.cc:108
 hedgui.cc:109
 hedgui.cc:110
 hedgui.cc:111
 hedgui.cc:112
 hedgui.cc:113
 hedgui.cc:114
 hedgui.cc:115
 hedgui.cc:116
 hedgui.cc:117
 hedgui.cc:118
 hedgui.cc:119
 hedgui.cc:120
 hedgui.cc:121
 hedgui.cc:122
 hedgui.cc:123
 hedgui.cc:124
 hedgui.cc:125
 hedgui.cc:126
 hedgui.cc:127
 hedgui.cc:128
 hedgui.cc:129
 hedgui.cc:130
 hedgui.cc:131
 hedgui.cc:132
 hedgui.cc:133
 hedgui.cc:134
 hedgui.cc:135
 hedgui.cc:136
 hedgui.cc:137
 hedgui.cc:138
 hedgui.cc:139
 hedgui.cc:140
 hedgui.cc:141
 hedgui.cc:142
 hedgui.cc:143
 hedgui.cc:144
 hedgui.cc:145
 hedgui.cc:146
 hedgui.cc:147
 hedgui.cc:148
 hedgui.cc:149
 hedgui.cc:150
 hedgui.cc:151
 hedgui.cc:152
 hedgui.cc:153
 hedgui.cc:154
 hedgui.cc:155
 hedgui.cc:156
 hedgui.cc:157
 hedgui.cc:158
 hedgui.cc:159
 hedgui.cc:160
 hedgui.cc:161
 hedgui.cc:162
 hedgui.cc:163
 hedgui.cc:164
 hedgui.cc:165
 hedgui.cc:166
 hedgui.cc:167
 hedgui.cc:168
 hedgui.cc:169
 hedgui.cc:170
 hedgui.cc:171
 hedgui.cc:172
 hedgui.cc:173
 hedgui.cc:174
 hedgui.cc:175
 hedgui.cc:176
 hedgui.cc:177
 hedgui.cc:178
 hedgui.cc:179
 hedgui.cc:180
 hedgui.cc:181
 hedgui.cc:182
 hedgui.cc:183
 hedgui.cc:184
 hedgui.cc:185
 hedgui.cc:186
 hedgui.cc:187
 hedgui.cc:188
 hedgui.cc:189
 hedgui.cc:190
 hedgui.cc:191
 hedgui.cc:192
 hedgui.cc:193
 hedgui.cc:194
 hedgui.cc:195
 hedgui.cc:196
 hedgui.cc:197
 hedgui.cc:198
 hedgui.cc:199
 hedgui.cc:200
 hedgui.cc:201
 hedgui.cc:202
 hedgui.cc:203
 hedgui.cc:204
 hedgui.cc:205
 hedgui.cc:206
 hedgui.cc:207
 hedgui.cc:208
 hedgui.cc:209
 hedgui.cc:210
 hedgui.cc:211
 hedgui.cc:212
 hedgui.cc:213
 hedgui.cc:214
 hedgui.cc:215
 hedgui.cc:216
 hedgui.cc:217
 hedgui.cc:218
 hedgui.cc:219
 hedgui.cc:220
 hedgui.cc:221
 hedgui.cc:222
 hedgui.cc:223
 hedgui.cc:224
 hedgui.cc:225
 hedgui.cc:226
 hedgui.cc:227
 hedgui.cc:228
 hedgui.cc:229
 hedgui.cc:230
 hedgui.cc:231
 hedgui.cc:232
 hedgui.cc:233
 hedgui.cc:234
 hedgui.cc:235
 hedgui.cc:236
 hedgui.cc:237
 hedgui.cc:238
 hedgui.cc:239
 hedgui.cc:240
 hedgui.cc:241
 hedgui.cc:242
 hedgui.cc:243
 hedgui.cc:244
 hedgui.cc:245
 hedgui.cc:246
 hedgui.cc:247
 hedgui.cc:248
 hedgui.cc:249
 hedgui.cc:250
 hedgui.cc:251
 hedgui.cc:252
 hedgui.cc:253
 hedgui.cc:254
 hedgui.cc:255
 hedgui.cc:256
 hedgui.cc:257
 hedgui.cc:258
 hedgui.cc:259
 hedgui.cc:260
 hedgui.cc:261
 hedgui.cc:262
 hedgui.cc:263
 hedgui.cc:264
 hedgui.cc:265
 hedgui.cc:266
 hedgui.cc:267
 hedgui.cc:268
 hedgui.cc:269
 hedgui.cc:270
 hedgui.cc:271
 hedgui.cc:272
 hedgui.cc:273
 hedgui.cc:274
 hedgui.cc:275
 hedgui.cc:276
 hedgui.cc:277
 hedgui.cc:278
 hedgui.cc:279
 hedgui.cc:280
 hedgui.cc:281
 hedgui.cc:282
 hedgui.cc:283
 hedgui.cc:284
 hedgui.cc:285
 hedgui.cc:286
 hedgui.cc:287
 hedgui.cc:288
 hedgui.cc:289
 hedgui.cc:290
 hedgui.cc:291
 hedgui.cc:292
 hedgui.cc:293
 hedgui.cc:294
 hedgui.cc:295
 hedgui.cc:296
 hedgui.cc:297
 hedgui.cc:298
 hedgui.cc:299
 hedgui.cc:300
 hedgui.cc:301
 hedgui.cc:302
 hedgui.cc:303
 hedgui.cc:304
 hedgui.cc:305
 hedgui.cc:306
 hedgui.cc:307
 hedgui.cc:308
 hedgui.cc:309
 hedgui.cc:310
 hedgui.cc:311
 hedgui.cc:312
 hedgui.cc:313
 hedgui.cc:314
 hedgui.cc:315
 hedgui.cc:316
 hedgui.cc:317
 hedgui.cc:318
 hedgui.cc:319
 hedgui.cc:320
 hedgui.cc:321
 hedgui.cc:322
 hedgui.cc:323
 hedgui.cc:324
 hedgui.cc:325
 hedgui.cc:326
 hedgui.cc:327
 hedgui.cc:328
 hedgui.cc:329
 hedgui.cc:330
 hedgui.cc:331
 hedgui.cc:332
 hedgui.cc:333
 hedgui.cc:334
 hedgui.cc:335
 hedgui.cc:336
 hedgui.cc:337
 hedgui.cc:338
 hedgui.cc:339
 hedgui.cc:340
 hedgui.cc:341
 hedgui.cc:342
 hedgui.cc:343
 hedgui.cc:344
 hedgui.cc:345
 hedgui.cc:346
 hedgui.cc:347
 hedgui.cc:348
 hedgui.cc:349
 hedgui.cc:350
 hedgui.cc:351
 hedgui.cc:352
 hedgui.cc:353
 hedgui.cc:354
 hedgui.cc:355
 hedgui.cc:356
 hedgui.cc:357
 hedgui.cc:358
 hedgui.cc:359
 hedgui.cc:360
 hedgui.cc:361
 hedgui.cc:362
 hedgui.cc:363
 hedgui.cc:364
 hedgui.cc:365
 hedgui.cc:366
 hedgui.cc:367
 hedgui.cc:368
 hedgui.cc:369
 hedgui.cc:370
 hedgui.cc:371
 hedgui.cc:372
 hedgui.cc:373
 hedgui.cc:374
 hedgui.cc:375
 hedgui.cc:376
 hedgui.cc:377
 hedgui.cc:378
 hedgui.cc:379
 hedgui.cc:380
 hedgui.cc:381
 hedgui.cc:382
 hedgui.cc:383
 hedgui.cc:384
 hedgui.cc:385
 hedgui.cc:386
 hedgui.cc:387
 hedgui.cc:388
 hedgui.cc:389
 hedgui.cc:390
 hedgui.cc:391
 hedgui.cc:392
 hedgui.cc:393
 hedgui.cc:394
 hedgui.cc:395
 hedgui.cc:396
 hedgui.cc:397
 hedgui.cc:398
 hedgui.cc:399
 hedgui.cc:400
 hedgui.cc:401
 hedgui.cc:402
 hedgui.cc:403
 hedgui.cc:404
 hedgui.cc:405
 hedgui.cc:406
 hedgui.cc:407
 hedgui.cc:408
 hedgui.cc:409
 hedgui.cc:410
 hedgui.cc:411
 hedgui.cc:412
 hedgui.cc:413
 hedgui.cc:414
 hedgui.cc:415
 hedgui.cc:416
 hedgui.cc:417
 hedgui.cc:418
 hedgui.cc:419
 hedgui.cc:420
 hedgui.cc:421
 hedgui.cc:422
 hedgui.cc:423
 hedgui.cc:424
 hedgui.cc:425
 hedgui.cc:426
 hedgui.cc:427
 hedgui.cc:428
 hedgui.cc:429
 hedgui.cc:430
 hedgui.cc:431
 hedgui.cc:432
 hedgui.cc:433
 hedgui.cc:434
 hedgui.cc:435
 hedgui.cc:436
 hedgui.cc:437
 hedgui.cc:438
 hedgui.cc:439
 hedgui.cc:440
 hedgui.cc:441
 hedgui.cc:442
 hedgui.cc:443
 hedgui.cc:444
 hedgui.cc:445
 hedgui.cc:446
 hedgui.cc:447
 hedgui.cc:448
 hedgui.cc:449
 hedgui.cc:450
 hedgui.cc:451
 hedgui.cc:452
 hedgui.cc:453
 hedgui.cc:454
 hedgui.cc:455
 hedgui.cc:456
 hedgui.cc:457
 hedgui.cc:458
 hedgui.cc:459
 hedgui.cc:460
 hedgui.cc:461
 hedgui.cc:462
 hedgui.cc:463
 hedgui.cc:464
 hedgui.cc:465
 hedgui.cc:466
 hedgui.cc:467
 hedgui.cc:468
 hedgui.cc:469
 hedgui.cc:470
 hedgui.cc:471
 hedgui.cc:472
 hedgui.cc:473
 hedgui.cc:474
 hedgui.cc:475
 hedgui.cc:476
 hedgui.cc:477
 hedgui.cc:478
 hedgui.cc:479
 hedgui.cc:480
 hedgui.cc:481
 hedgui.cc:482
 hedgui.cc:483
 hedgui.cc:484
 hedgui.cc:485
 hedgui.cc:486
 hedgui.cc:487
 hedgui.cc:488
 hedgui.cc:489
 hedgui.cc:490
 hedgui.cc:491
 hedgui.cc:492
 hedgui.cc:493
 hedgui.cc:494
 hedgui.cc:495
 hedgui.cc:496
 hedgui.cc:497
 hedgui.cc:498
 hedgui.cc:499
 hedgui.cc:500
 hedgui.cc:501
 hedgui.cc:502
 hedgui.cc:503
 hedgui.cc:504
 hedgui.cc:505
 hedgui.cc:506
 hedgui.cc:507
 hedgui.cc:508
 hedgui.cc:509
 hedgui.cc:510
 hedgui.cc:511
 hedgui.cc:512
 hedgui.cc:513
 hedgui.cc:514
 hedgui.cc:515
 hedgui.cc:516
 hedgui.cc:517
 hedgui.cc:518
 hedgui.cc:519
 hedgui.cc:520
 hedgui.cc:521
 hedgui.cc:522
 hedgui.cc:523
 hedgui.cc:524
 hedgui.cc:525
 hedgui.cc:526
 hedgui.cc:527
 hedgui.cc:528
 hedgui.cc:529
 hedgui.cc:530
 hedgui.cc:531
 hedgui.cc:532
 hedgui.cc:533
 hedgui.cc:534
 hedgui.cc:535
 hedgui.cc:536
 hedgui.cc:537
 hedgui.cc:538
 hedgui.cc:539
 hedgui.cc:540
 hedgui.cc:541
 hedgui.cc:542
 hedgui.cc:543
 hedgui.cc:544
 hedgui.cc:545
 hedgui.cc:546
 hedgui.cc:547
 hedgui.cc:548
 hedgui.cc:549
 hedgui.cc:550
 hedgui.cc:551
 hedgui.cc:552
 hedgui.cc:553
 hedgui.cc:554
 hedgui.cc:555
 hedgui.cc:556
 hedgui.cc:557
 hedgui.cc:558
 hedgui.cc:559
 hedgui.cc:560
 hedgui.cc:561
 hedgui.cc:562
 hedgui.cc:563
 hedgui.cc:564
 hedgui.cc:565
 hedgui.cc:566
 hedgui.cc:567
 hedgui.cc:568
 hedgui.cc:569
 hedgui.cc:570
 hedgui.cc:571
 hedgui.cc:572
 hedgui.cc:573
 hedgui.cc:574
 hedgui.cc:575
 hedgui.cc:576
 hedgui.cc:577
 hedgui.cc:578
 hedgui.cc:579
 hedgui.cc:580
 hedgui.cc:581
 hedgui.cc:582
 hedgui.cc:583
 hedgui.cc:584
 hedgui.cc:585
 hedgui.cc:586
 hedgui.cc:587
 hedgui.cc:588
 hedgui.cc:589
 hedgui.cc:590
 hedgui.cc:591
 hedgui.cc:592
 hedgui.cc:593
 hedgui.cc:594
 hedgui.cc:595
 hedgui.cc:596
 hedgui.cc:597
 hedgui.cc:598
 hedgui.cc:599
 hedgui.cc:600
 hedgui.cc:601
 hedgui.cc:602
 hedgui.cc:603
 hedgui.cc:604
 hedgui.cc:605
 hedgui.cc:606
 hedgui.cc:607
 hedgui.cc:608
 hedgui.cc:609
 hedgui.cc:610
 hedgui.cc:611
 hedgui.cc:612
 hedgui.cc:613
 hedgui.cc:614
 hedgui.cc:615
 hedgui.cc:616
 hedgui.cc:617
 hedgui.cc:618
 hedgui.cc:619
 hedgui.cc:620
 hedgui.cc:621
 hedgui.cc:622
 hedgui.cc:623
 hedgui.cc:624
 hedgui.cc:625
 hedgui.cc:626
 hedgui.cc:627
 hedgui.cc:628
 hedgui.cc:629