ROOT logo
using namespace std;
#include <iostream>
#include <iomanip>
#include "hmdceffmenu.h"
#include "hades.h"
#include "heventheader.h"
#include "hevent.h"

#include "TGFrame.h"
#include "TList.h"
#include "TGLabel.h"
#include "TGTextEntry.h"
#include "TGButton.h"
#include "TColor.h"

#include "TStyle.h"
#include <stdlib.h>
#include "hmdcgetcontainers.h"

HMdcEffMenu* HMdcEffMenu::fEffMenu=0;

HMdcEffMenu* HMdcEffMenu::makeMenu(HMdcEfficiency *feff) {
  if(fEffMenu) deleteMenu();
  fEffMenu = new HMdcEffMenu(feff);
  return fEffMenu;
}

void HMdcEffMenu::deleteMenu(void) {
  if(fEffMenu) delete fEffMenu;
  fEffMenu=0;
}

HMdcEffMenu::HMdcEffMenu(HMdcEfficiency *feff) {
  width    = 320;
  height   = 500;
  fWidgets = new TList;
  const TGWindow *main = gClient->GetRoot();
  fDialog  = new TGTransientFrame(main, main, 10, 10);
  fWidgets->Add(fDialog);
  fDialog->SetWMSize(width, height);
  
  
  mdcEff=feff;
  for(Int_t i=0; i<6; i++) indLay[i]=1;
  indPlot[0]  = 0;
  indPlot[1]  = 0;
  indPlot[2]  = 0;
  indHist[0]  = 1;
  indHist[1]  = 0;
  indHist[2]  = 0;
  indHist[3]  = 0;
  indHist[4]  = 0;
  indHist[5]  = 0;
  indHistMb   = 0;
  indXYlayers = 0;
  indTimes    = 0;
  sumBnXY     = 0;
  totModsSel  = 0;
  nTotEv      = 0;
  indSummary  = 0;
  typePlot    = 2;
  numLay      = 6;
  numHists    = 1;
  sumBnTimes  = 1;
  indGroup[0] = 1;
  indGroup[1] = 0;
  eventLoopFlag = kFALSE;
  nEvLoopAdd    = 0;
  text          = new TText();
  lbEvTot       = NULL;
  lbEvLoop      = NULL;
  endOfData     = kFALSE;
  stopLoop      = kFALSE;
    
  gStyle->ToggleEventStatus();
  menu();
}

HMdcEffMenu::~HMdcEffMenu() {
  if(fDialog) fDialog->CloseWindow();
  if(fWidgets) {
    fWidgets->Delete();
    delete fWidgets;
    fWidgets=0;
  }
  fDialog=0;
  if(!fEffMenu) return;
}

void HMdcEffMenu::setSecMod(Int_t s, Int_t m){
  indMod[s][m]^=1;
  (indMod[s][m]) ? totModsSel++:totModsSel--;
  Int_t indSecOld=indSec[s];
  indSec[s]+=(indMod[s][m]) ? +1:-1;
  bSecMod[s][m]->SetTextColor(TColor::Number2Pixel(indMod[s][m]*1+1));
  doDraw(indMod[s][m]);
  if(indSec[s]<=1 && indSecOld<=1) doPlots(indMod[s][m]);
}

void HMdcEffMenu::setLayer(Int_t l){
  indLay[l]^=1;
  bLayer[l]->SetTextColor(TColor::Number2Pixel(indLay[l]*1+1));
  numLay+=indLay[l]*2-1;
  setListLayer();
  if(indGroup[0] || indGroup[1] || indXYlayers) doDraw(indLay[l]);
}

void HMdcEffMenu::setListPads(){
  for(Int_t sec=0; sec<6; sec++) {
    if(!&(*mdcEff)[sec]) continue;
    feffSec=&(*mdcEff)[sec];
    for(Int_t mod=0; mod<4; mod++) {
      feffMod=&(*feffSec)[mod];
      if(!feffMod) continue;
      for(Int_t lay=0; lay<6; lay++) {
        feffLay=&(*feffMod)[lay];
        feffLay->setListPads(indHist);
      }
    }
  }
}

void HMdcEffMenu::setListLayer(){
  for(Int_t sec=0; sec<6; sec++) {
    if(!&(*mdcEff)[sec]) continue;
    feffSec = &(*mdcEff)[sec];
    for(Int_t mod=0; mod<4; mod++) {
      feffMod=&(*feffSec)[mod];
      if(feffMod) feffMod->setListLayers(indLay);
    }
  }
}

void HMdcEffMenu::drawPlot(Int_t n) {
  indPlot[n]^=1;
  bPlot[n]->SetTextColor(TColor::Number2Pixel(indPlot[n]*1+1));
  if(n<2) doPlots(indPlot[n]);
  else doEventPlots(indPlot[n]);
}

void HMdcEffMenu::clustSel() {
  mdcEff->drawClusSelCh();
  Bool_t drSCl = mdcEff->getDrawClusFlag();
  bDrClSel->SetTextColor(TColor::Number2Pixel(drSCl ? 3:1));
  if(indPlot[0] != 0) {
    drawPlot(0);
    drawPlot(0);
  }
  if(indPlot[2] != 0) {
    drawPlot(2);
    drawPlot(2);
  }
}
    

void HMdcEffMenu::setPlotType(Int_t n){
  if(n==typePlot) return;
  bTypePlot[typePlot]->SetTextColor(TColor::Number2Pixel(1));
//  bTypePlot[typePlot]->Modified();
  typePlot=n;
  bTypePlot[typePlot]->SetTextColor(TColor::Number2Pixel(3));
  if(indPlot[0]) doPlots(indPlot[0]);
  if(indPlot[2]) doEventPlots(indPlot[2]);
}

void HMdcEffMenu::drawHist(Int_t n) {
  indHist[n] ^= 1;
  bHist[n]->SetTextColor(TColor::Number2Pixel(indHist[n]*1+1));
  numHists += indHist[n]*2-1;         // increase or decrease numHists
  setListPads();
  doDraw(indHist[n]);
}

void HMdcEffMenu::drawXYlayer() {
  indXYlayers ^= 1;
  bXYlayer->SetTextColor(TColor::Number2Pixel(indXYlayers*1+1));
  doDraw(indXYlayers);
}

void HMdcEffMenu::drawTimes() {
  indTimes^=1;
  bTimes->SetTextColor(TColor::Number2Pixel(indTimes*1+1));
  doDraw(indTimes);
}

void HMdcEffMenu::drawSummary() {
  indSummary^=1;
  bSummary->SetTextColor(TColor::Number2Pixel(indSummary*1+1));
  if(!calcEffFlag) mdcEff->calcEfficiency();
  calcEffFlag = kTRUE;
  if(indSummary) mdcEff->drawSummary(kTRUE);
  else           mdcEff->drawSummary(kFALSE);
}

void HMdcEffMenu::drawHistMb(){
  indHistMb^=1;
  bHistMb->SetTextColor(TColor::Number2Pixel(indHistMb*1+1));
  if(!calcEffFlag) mdcEff->calcEfficiency();
  
  doDraw(indHistMb);
}

void HMdcEffMenu::setGroup(Int_t n) {
  indGroup[n]^=1;
  bGroupMdcLay[n]->SetTextColor(TColor::Number2Pixel(indGroup[n]*1+1));
  doDraw(indGroup[n]);
}

TGTextEntry* HMdcEffMenu::drawTextLine(Int_t x, Int_t y,const Char_t* name,Int_t textColor) { 
  x = sWidth  + x*dWidth;
  y = sHeight + y*dHeight-2;
  TGHorizontalFrame* fr = new TGHorizontalFrame(fDialog);
  TGLayoutHints *lh = new TGLayoutHints(kLHintsNormal,x, 0,y, 0);
  fDialog->AddFrame(fr, lh);
  TGTextEntry *text = new TGTextEntry(fDialog,name);
  text->SetTextColor(TColor::Number2Pixel(textColor));
  text->SetEnabled(kFALSE);
  fr->AddFrame(text,lh);
  fWidgets->Add(fr);
  fWidgets->Add(lh);
  fWidgets->Add(text);
  return text;
}

TGLabel* HMdcEffMenu::drawLabel(Int_t x, Int_t y,const Char_t* name,Int_t textColor) {
  y = sHeight + y*dHeight;
  TGHorizontalFrame *fr = new TGHorizontalFrame(fDialog);
  TGLayoutHints     *lh = new TGLayoutHints(kLHintsNormal,x, 0,y, 0);
  fDialog->AddFrame(fr, lh);
  TGLabel *label = new TGLabel(fDialog,name);
  label->SetTextColor(TColor::Number2Pixel(textColor));
  fr->AddFrame(label,lh);
  fWidgets->Add(fr);
  fWidgets->Add(lh);
  fWidgets->Add(label);
  return label;
}

TGTextButton* HMdcEffMenu::drawButton(Int_t x, Int_t y,const Char_t* name,
    const Char_t* doThis,Int_t textColor) {
  x = sWidth  + x*dWidth;
  y = sHeight + y*dHeight;
  TGHorizontalFrame *fr = new TGHorizontalFrame(fDialog);
  TGLayoutHints     *lh = new TGLayoutHints(kLHintsNormal,x, 0,y, 0);
  fDialog->AddFrame(fr, lh);
  TGTextButton      *b  = new TGTextButton(fDialog,name,doThis);
//  b->SetFont("-misc-fixed-medium-r-normal--12-140-75-75-c-90-iso8859-15",kTRUE);
  b->SetFont("fixed",kTRUE);
  b->SetTextColor(TColor::Number2Pixel(textColor));
  fr->AddFrame(b,lh);
  fWidgets->Add(fr);
  fWidgets->Add(lh);
  fWidgets->Add(b);
  return b;
}

TGTextButton* HMdcEffMenu::drawButtonXp(Int_t px, Int_t y,const Char_t* name,
    const Char_t* doThis,Int_t textColor) {
//-  x = sWidth  + x*dWidth;
  Int_t py = sHeight + y*dHeight;
  TGHorizontalFrame *fr = new TGHorizontalFrame(fDialog);
  TGLayoutHints     *lh = new TGLayoutHints(kLHintsNormal,px, 0,py, 0);
  fDialog->AddFrame(fr, lh);
  TGTextButton      *b  = new TGTextButton(fDialog,name,doThis);
//  b->SetFont("-misc-fixed-medium-r-normal--12-140-75-75-c-90-iso8859-15",kTRUE);
  b->SetFont("fixed",kTRUE);
  b->SetTextColor(TColor::Number2Pixel(textColor));
  fr->AddFrame(b,lh);
  fWidgets->Add(fr);
  fWidgets->Add(lh);
  fWidgets->Add(b);
  return b;
}

void HMdcEffMenu::setInitPoint(Int_t sw,Int_t dw,Int_t sh,Int_t dh) {
  sHeight = sh;
  dHeight = dh;
  sWidth  = sw; 
  dWidth  = dw; 
}

void HMdcEffMenu::menu(){
  gHades->eventLoop(1);
  nTotEv=1;
  TString fileName;
  HMdcGetContainers::getFileName(fileName);
  fileName+=" MdcEffMon";
  fDialog->SetWindowName(fileName.Data());
  for(Int_t s=0; s<6; s++){
    indSec[s]=0;
    for(Int_t m=0; m<4; m++){
      indMod[s][m]=0;
    }
  }
  setListLayer();
  setListPads();
  
  Int_t w03 = 12;
  setInitPoint(119,27,5,23);
  drawLabel(w03,0,"Sector :   ",1);
  drawLabel(w03,1,"Module :   ",1);
  
  for(Int_t s=0; s<6; s++) {
    sprintf(name,"%i",s+1);
    drawLabel(sWidth+s*dWidth+8,0,name,1);
    if(!&(*mdcEff)[s]) continue;
    HMdcEfficiencySec& effSec=(*mdcEff)[s];
    for(Int_t m=0; m<4; m++) {
      if(!&effSec[m]) continue;
      TString modName;
      if(m==0) modName="I  ";
      else if(m==1) modName="II ";
      else if(m==2) modName="III";
      else if(m==3) modName="IV ";
      sprintf(doThis,"effMenu->setSecMod(%i,%i);",s,m);
      bSecMod[s][m] = drawButton(s,m+1,(Char_t*)modName.Data(),doThis,indMod[s][m]*1+1);
    }
  }

  setInitPoint(119,27,10,23);
  drawLabel(w03,5,"Layer:  ",1);
  for(Int_t l=0; l<6; l++) {
    sprintf(name," %i ",l+1);
    sprintf(doThis,"effMenu->setLayer(%i);",l);
    bLayer[l] = drawButton(l,5,name,doThis,indLay[l]*1+1);
  }

  // Histogram buttons:  
  setInitPoint(62,74,165,23);
//  drawLabel(w03,0,"Grouping :     :",1);
  bGroupMdcLay[0] = drawButton(1,0,"    MDC    ","effMenu->setGroup(0)",indGroup[0]*1+1);
  bGroupMdcLay[1] = drawButton(2,0,"   Layer   ","effMenu->setGroup(1)",indGroup[1]*1+1);
  
  bHist[2] = drawButton(0,1,"Efficiency ","effMenu->drawHist(2)",indHist[2]*1+1);
  bHist[0] = drawButton(1,1,"  Pattern  ","effMenu->drawHist(0)",indHist[0]*1+1);
  bHist[3] = drawButton(2,1,"  Single   ","effMenu->drawHist(3)",indHist[3]*1+1);
  
  bHist[5] = drawButton(0,2,"  Ratio    ","effMenu->drawHist(5)",indHist[5]*1+1);
  bHist[1] = drawButton(1,2,"Tracks|Hits","effMenu->drawHist(1)",indHist[1]*1+1);
  bHist[4] = drawButton(2,2,"Probability","effMenu->drawHist(4)",indHist[4]*1+1);
  
  setInitPoint(5,74,239,33);
  bHistMb  = drawButton(0,0,"Eff.vs.Mb","effMenu->drawHistMb()",indHistMb*1+1);
  bXYlayer = drawButton(0,1,"Eff.vs.XY   ","effMenu->drawXYlayer()",indXYlayers*1+1);
  bTimes   = drawButton(0,2,"Time 1,2,2-1","effMenu->drawTimes()",indTimes*1+1);
  
  bSummary = drawButton(0,3,"Eff.Summary","effMenu->drawSummary()",indSummary*1+1);
  
  setInitPoint(230,28,239,33);
  button[17] = drawButton(0,0,"Refresh","effMenu->calcEff()",1);
  
  setInitPoint(5,28,239,33);
  button[0] = drawButton(6,1,"-1","effMenu->rebinXY(-1)",4);
  button[1] = drawButton(8,1,"+1","effMenu->rebinXY(+1)",4);
  pvLSumXY  = drawTextLine(7,1," 1 ",3);
  
  button[6] = drawButton(5,2,"-5","effMenu->rebinTimes(-5)",4);
  button[7] = drawButton(6,2,"-1","effMenu->rebinTimes(-5)",4);
  button[8] = drawButton(8,2,"+1","effMenu->rebinTimes(+1)",4);
  button[9] = drawButton(9,2,"+5","effMenu->rebinTimes(+5)",4);
  pvLSumTimes = drawTextLine(7,2," 1 ",3);

  // Buttons for plots:
  setInitPoint(90,28,200,23);
  drawLabel(w03,8,"Plots:",1);
  bTypePlot[0] = drawButton(0,7," A ","effMenu->setPlotType(0)",(typePlot==0)?3:1);
  bTypePlot[1] = drawButton(1,7," B ","effMenu->setPlotType(1)",(typePlot==1)?3:1);
  bTypePlot[2] = drawButton(2,7," C ","effMenu->setPlotType(2)",(typePlot==2)?3:1);
  bPlot[2]     = drawButton(3,7,"Event   ","effMenu->drawPlot(2)",indPlot[2]*1+1);
  bPlot[0]     = drawButton(0,8,"Projections ","effMenu->drawPlot(0)",indPlot[0]*1+1);
  bPlot[1]     = drawButton(3,8,"MDC hits","effMenu->drawPlot(1)",indPlot[1]*1+1);
  button[10]   = drawButton(0,9,"Print clusters","effMenu->printClusters()",1);
  Bool_t drSCl = mdcEff->getDrawClusFlag();
  bDrClSel     = drawButton(4,9,"GoodClusters","effMenu->clustSel()",drSCl ? 3:1);

   // Buttons for event loop:
  setInitPoint(35,42,200,23);
//  drawLabel(w03,11,"Event loop:",1);
  drawNEvents(0);
  button[11] = drawButton(2,11,"Next ","effMenu->loopEvents(1)",1);
  button[12] = drawButton(3,11,"All   ","effMenu->loopEvents(-1)",1);
  button[13] = drawButton(0,12,"100  ","effMenu->loopEvents(100)",1);
  button[14] = drawButton(1,12,"1000 ","effMenu->loopEvents(1000)",1);
  button[15] = drawButton(2,12,"10000","effMenu->loopEvents(10000)",1);
//  button[16] = drawButton(3,12,"100000","effMenu->loopEvents(100000)",1);
  button[19] = drawButton(3,12," Stop ","effMenu->stpLoop()",1);
  button[18] = drawButton(6,12,"Quit","effMenu->closeDial(); delete gHades;exit(0);",1);
  button[20] = drawButtonXp(sWidth+5*dWidth+40,11,"PDF","effMenu->saveHist()",1);
//button[19] = drawButtonXp(3,12,"Stop","effMenu->stpLoop()",1);
//  button[21] = drawButton(5,12,"Quit ROOT ",".q",1);
//  drawNEvents(0);
  
   
  fDialog->MapSubwindows(); 
  
  fDialog->MapWindow();
//  gClient->WaitFor(fDialog);
}

void HMdcEffMenu::closeDial(void) {
  fDialog->CloseWindow();
}

void HMdcEffMenu::calcEff(void) {
  mdcEff->calcEfficiency(calcEffFlag);
}

void HMdcEffMenu::rebinTimes(Int_t n){
  if(sumBnTimes==1 && n<0) return;
  sumBnTimes+=n;
  if(sumBnTimes<1) sumBnTimes=1;
  if(sumBnTimes>100) sumBnTimes=100;
  sprintf(name,"%i",sumBnTimes);
  pvLSumTimes->SetText(name);
  doDraw();
}

void HMdcEffMenu::rebinXY(Int_t n) {
  if((sumBnXY==0 && n<0) || (sumBnXY==3 && n>0)) return;
  sumBnXY+=n;
  Int_t sBn=1;
  for(Int_t i=0; i<sumBnXY; i++) sBn*=2;
  sprintf(name,"%i",sBn);
  pvLSumXY->SetText(name);
  for(Int_t sec=0; sec<6; sec++) {
    if(!&(*mdcEff)[sec]) continue;
    feffSec=&(*mdcEff)[sec];
    for(Int_t mod=0; mod<4; mod++) {
     if(!&(*feffSec)[mod]) continue;
     feffMod=&(*feffSec)[mod];
     for(Int_t lay=0; lay<6; lay++) {
       feffLay=&(*feffMod)[lay];
       feffLay->setBiningXY(sBn);
     }
   }
  }
// doDraw();
}

void HMdcEffMenu::printClusters(){
  for(Int_t sec=0; sec<6; sec++) {
    if(indSec[sec]) {
      printf("\n---------------- Sector %i ---------------------------\n",sec+1);
      mdcEff->printClusters(sec); // mod ???
    }
  }
}

void HMdcEffMenu::doDraw(Int_t ind){
  //ind=1 - draw canvas
  //   =0 - close canvas
  if(!calcEffFlag || lbEvLoop != NULL) mdcEff->calcEfficiency();
  calcEffFlag = kTRUE;
  for(Int_t sec=0; sec<6; sec++) {
    if(!&(*mdcEff)[sec]) continue;
    feffSec=&(*mdcEff)[sec];
    for(Int_t mod=0; mod<4; mod++) {
      if(!&(*feffSec)[mod]) continue;
      feffMod=&(*feffSec)[mod];                          //Drawing
      if( ind && indMod[sec][mod] ) {
        if( indHistMb ) feffMod->drawCanvEffMb();
        if( indTimes ) feffMod->drawCanvTimes(sumBnTimes);
        if(numLay) {
          if(indGroup[0]) {
            if(indHist[0]) feffMod->drawCanvTotNhits();
            if(indHist[1]) feffMod->drawCanvNHits();
            if(indHist[2]) feffMod->drawCanvHistEff();
            if(indHist[3]) feffMod->drawCanvHistSing();
            if(indHist[4]) feffMod->drawCanvProbabilitis();
            if(indHist[5]) feffMod->drawCanvRatio();
          }
          if(indGroup[1]) for(Int_t lay=0; lay<6; lay++) {
            if(!indLay[lay]) continue;
            feffLay=&(*feffMod)[lay];
            if(numHists) feffLay->drawCanvas();
          }
          if(indXYlayers) for(Int_t lay=0; lay<6; lay++) {
            if(!indLay[lay]) continue;
            feffLay=&(*feffMod)[lay];
            if(numHists) feffLay->drawCanvXYlist();
          }
        }
      } else {
        if( !indHistMb || !indMod[sec][mod] )  feffMod->delCanvMb();
        if( !indTimes || !indMod[sec][mod] ) feffMod->delCanvTimes();
        Int_t indCls=(indMod[sec][mod]>0 && numLay>0) ? 0 : 1;
        if(!indHist[0] || indCls || !indGroup[0]) feffMod->delCanvTotNhits();
        if(!indHist[1] || indCls || !indGroup[0]) feffMod->delCanvNHits();
        if(!indHist[2] || indCls || !indGroup[0]) feffMod->delCanvHistEff();
        if(!indHist[3] || indCls || !indGroup[0]) feffMod->delCanvHistSing();
        if(!indHist[4] || indCls || !indGroup[0]) feffMod->delCanvProbabilitis();
        if(!indHist[5] || indCls || !indGroup[0]) feffMod->delCanvRatio();
        for(Int_t lay=0; lay<6; lay++) {
          feffLay=&(*feffMod)[lay];
          if(indMod[sec][mod]==0 || indLay[lay]==0 || numHists==0 || 
              indGroup[1]==0) feffLay->delCanvas();
          if(!indXYlayers || indCls || indLay[lay]==0) feffLay->delCanvXYlist();
        }
      }
    }
  }
}

void HMdcEffMenu::doPlots(Int_t ind){
  //ind=1 - draw canvas
  //   =0 - close canvas
  for(Int_t sec=0; sec<6; sec++) {
    if(!&(*mdcEff)[sec]) continue;
    feffSec=&(*mdcEff)[sec];
    Int_t ind1=(indPlot[0] && indSec[sec]) ? 1 : 0;
    Int_t ind2=(indPlot[1] && indSec[sec]) ? 1 : 0;
    if(ind) {
      if(ind1) {feffSec->drawCanvProj(); mdcEff->drawProjPlotsSec(sec,typePlot);}
      if(ind2) {feffSec->drawCanvHits(); mdcEff->drawHitsPlots(sec);}
    } else {
      if(!ind1) feffSec->delCanvProj();
      if(!ind2) feffSec->delCanvHits();
    }
  }
}

void HMdcEffMenu::doEventPlots(Int_t ind){
 //ind=1 - draw canvas
 //   =0 - close canvas
  if(ind) {mdcEff->drawCanvEvent(); mdcEff->drawPrPlEvent(typePlot);}
  else mdcEff->delCanvEvent();
}

void HMdcEffMenu::drawNEvents(Int_t nEv) {
  Char_t buf[20];
  sprintf(buf,"%08i    U",nTotEv);
  if(lbEvTot == NULL) {
    lbEvTot  = drawLabel(6,10,buf,1);
    drawLabel(62,10,"events   ",1);
    lbEvLoop = drawLabel(6,11,"Loop :   ",1);
  } else lbEvTot->ChangeText(buf);
  
  if(endOfData) {
    lbEvLoop->ChangeText(" End!       ");
    lbEvLoop->SetTextColor(TColor::Number2Pixel(2));
  } if(nEv > 0) {
    sprintf(buf,"%8i     UU",nEv);
    lbEvLoop->ChangeText(buf);
    lbEvLoop->SetTextColor(TColor::Number2Pixel(2));
  } else if(nEv<0 || nEvLoopAdd<0) {
    lbEvLoop->ChangeText("All ev.     ");
    lbEvLoop->SetTextColor(TColor::Number2Pixel(2));
  } else {
    lbEvLoop->ChangeText("Loop :      ");
    lbEvLoop->SetTextColor(TColor::Number2Pixel(1));
  }
}

void HMdcEffMenu::loopEvents(Int_t nEv) {
  if(endOfData) return;
  if(eventLoopFlag) {
    if(nEv<1) nEvLoopAdd = -1;
    else      nEvLoopAdd += nEv;
    drawNEvents(nEvLoopAdd);
    return;
  }
  drawNEvents(nEv);
  eventLoopFlag = kTRUE;
  gHades->setQuietMode(2);
  Int_t nEvDo = (nEv<10) ? 1 : nEv/10; 
  Int_t nfor  = nEv/nEvDo;
  if(nEv == -1) {
    nEvDo = 1000;
    nfor  = 10;
  }

  calcEffFlag = kTRUE;
  if(totModsSel == 0 || (!indGroup[0]&&!indGroup[1]&&!indHistMb&&!indXYlayers&&!indTimes))
      calcEffFlag = kFALSE;
//   if(!calcEffFlag && nEv>0 && !indPlot[0] && !indPlot[1] && !indPlot[2] ) {
//     nEvDo = nEv;
//     nfor  = 1;
//   }
  Int_t evN = 0;
  for(Int_t nTm=0; nTm<nfor; nTm++) {
    if(stopLoop) break;
    evN = gHades->eventLoop(nEvDo);
    if(nTm+1 < nfor) mdcEff->calcEfficiency(calcEffFlag);
    if(evN <= 0) break;
    if(nEv == -1) nTm=-1;
    nTotEv += evN;
    if(evN<nEvDo) break;
    if(nTm<nfor-1 && nEvDo>50) {
      if(nEv<0) drawNEvents(-1);
      else      drawNEvents(nfor*nEvDo-nEvDo*(nTm+1)+nEvLoopAdd);
    }
    if(nTm<nfor-1 && nEvDo>100) printf("--- Total num. of events processed: %i ---\n",nTotEv);
  }
  if(stopLoop) stopLoop = kFALSE;
  
  if(evN>0 && evN>=nEvDo) {
    HEvent* event=gHades->getCurrentEvent();
    if(event) { 
      HEventHeader* header=event->getHeader();
      if(header) {
        while(kTRUE) {
          Int_t evId = header->getId();
          if((evId==0 || evId==1) && header->getEventSeqNumber()==mdcEff->getEventId()) break;
          Int_t evN = gHades->eventLoop(1);
          if(evN<=0) break;
          nTotEv += evN;
        }
      }
    }
  }
  mdcEff->calcEfficiency(calcEffFlag);
  if(evN > 0) printf("==== Total num. of events processed: %i ====\n",nTotEv);
  else if(evN < 0) printf("==== The error of reading event. evN=%i\n",evN);
  if(evN>=0 && evN<nEvDo) {
    endOfData = kTRUE;
    drawNEvents(0);
    printf("==== End of file! Total num. of events processed: %i ====\n",nTotEv);
    return;
  }
  eventLoopFlag = kFALSE;
  if(nEvLoopAdd > 0) {
    Int_t nAdd = nEvLoopAdd;
    nEvLoopAdd = 0;
    loopEvents(nAdd);
  }
  drawNEvents(0);
}

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