]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
not needed anymore
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 26 Nov 2008 16:24:34 +0000 (16:24 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 26 Nov 2008 16:24:34 +0000 (16:24 +0000)
EMCAL/mood/TMCal.cxx [deleted file]
EMCAL/mood/TMCal.h [deleted file]
EMCAL/mood/TMCalConstants.hh [deleted file]
EMCAL/mood/TMEMC.cxx [deleted file]
EMCAL/mood/TMEMC.h [deleted file]
EMCAL/mood/TMPHS.cxx [deleted file]
EMCAL/mood/TMPHS.h [deleted file]

diff --git a/EMCAL/mood/TMCal.cxx b/EMCAL/mood/TMCal.cxx
deleted file mode 100644 (file)
index 093b276..0000000
+++ /dev/null
@@ -1,955 +0,0 @@
-#include "TMCal.h"
-#include "TRandom.h"
-#include "TF1.h"
-
-#include "AliRawEventHeaderBase.h"
-#include "AliRawReaderRoot.h"
-
-ClassImp(TMCal)
-  
-//_____________________________________________________________________________
-TMCal::TMCal(const TGWindow *p, UInt_t w, UInt_t h, AliCaloCalibPedestal::kDetType detectorType) : 
-  TMBaseModule(p, w, h),
-  fDetType(detectorType),
-  fEvents(0),
-  fPedestals(0),
-  fRawReader(0),
-  fCaloRawStream(0),
-  fLowGainMode(kFALSE),
-  fSingleModule(kTRUE),
-  fVisibleModule(2),
-  fMaxPed(100.0),
-  fMaxPeak(100.0),
-  fMaxPeakDiff(100.0),
-  fMaxPedDiff(100.0),
-  fMaxPedRatio(2.0),
-  fMaxPeakRatio(3.0)
-{
-  //PHOS/EMCAL MOOD Module; 
-  // GUI related pointers (frames, canvases, buttons are initialized in the Construct* methods
-  // called later in this ctor.
-  
-  //Create the object for making the histograms
-  fPedestals = new AliCaloCalibPedestal( fDetType ); 
-  // AliCaloCalibPedestal knows how many modules we have for PHOS or EMCAL
-  fNumModules = fPedestals->GetModules(); 
-
-  //Load the reference object (Note: a fixed path. This should be made a variable that can somehow be set other than via the constants file and recompiled..)
-  if (fDetType == AliCaloCalibPedestal::kPhos) { 
-    if (fPedestals->LoadReferenceCalib(fgkReferenceFilePhos, fgkReferenceObject) != kTRUE) {
-      printf("Could not load PHOS reference calib.\n");
-    }
-  }
-  else {
-    if (fPedestals->LoadReferenceCalib(fgkReferenceFileEmCal, fgkReferenceObject) != kTRUE) {
-      printf("Could not load EMCAL reference calib.\n");
-    }
-  }
-   
-  //Init the readers and streams
-  InitRawReaderAndStream(fgkDefaultRunNo);
-  
-  // standard style options:  
-  //Make all histos use a more sensible palette.
-  gStyle->SetPalette(1);
-  //Kill the titles etc...
-  gStyle->SetOptStat(0);
-  //gStyle->SetOptTitle(0);
-  gStyle->SetTitleW(0.8);
-  gStyle->SetTitleH(0.08);
-  gStyle->SetTitleX(0.1);
-  gROOT->ForceStyle(kFALSE);
-  
-  //Construct the various buttons and info 'menu' for the lower panel
-  ConstructMenu(w);
-  
-  //Construct the various tabs and frames
-  ConstructFullGUI();
-  
-  //Set the handler to handle the tab changing, so we can enforce the palette we like.
-#ifdef fgkCustomDeadMapPalette
-  GetTab()->Connect("Selected(Int_t)", "TMCal", this, "OnTabChange(Int_t)");
-#endif
-}
-
-//_____________________________________________________________________________
-void TMCal::InitRawReaderAndStream(unsigned int runNo)
-{
-  char file[256];  
-  if (fDetType == AliCaloCalibPedestal::kPhos) { 
-    snprintf(file, 256, fgkSourceFileTemplatePhos, runNo);
-  }
-  else {
-    snprintf(file, 256, fgkSourceFileTemplateEmCal, runNo);
-  }
-  printf("\n TMCal::InitRawReaderAndStream file= %s \n", file);
-  fEvents = 0;
-  
-  //Initialize the raw readers
-  if (fCaloRawStream) {
-    delete fCaloRawStream;
-  }
-  if (fRawReader) {
-    delete fRawReader;
-  }
-
-  fRawReader = new AliRawReaderRoot(file);
-  fCaloRawStream = new AliCaloRawStream(fRawReader, (fDetType==AliCaloCalibPedestal::kPhos) ? "PHOS" : "EMCAL");
-
-  fCaloRawStream->SetOldRCUFormat(kTRUE); // should maybe have a switch for this later?
-  
-  //Not sure if this should be here... get to the first event, or never look at the first one?
-  fRawReader->NextEvent();
-  //Reset the actual analysis, since we changed the source file
-  fPedestals->Reset();
-  fPedestals->SetRunNumber(runNo);
-  //Set the histo titles
-  SetTitles();
-  printf("Reference run #%i.\n", fPedestals->GetRefRunNumber());
-}
-
-//_____________________________________________________________________________
-void TMCal::SetTitles()
-{
-  char title[256];
-  for (int i = 0; i < fNumModules; i++) {
-    sprintf(title, "Pedestals, high gain, run #%.4i, module %i", fPedestals->GetRunNumber(), i);
-    fPedestals->GetPedProfileHighGain(i)->SetTitle(title);
-    sprintf(title, "Peak-Pedestals, high gain, run #%.4i, module %i", fPedestals->GetRunNumber(), i);
-    fPedestals->GetPeakProfileHighGain(i)->SetTitle(title);
-    
-    sprintf(title, "Pedestals, low gain, run #%.4i, module %i", fPedestals->GetRunNumber(), i);
-    fPedestals->GetPedProfileLowGain(i)->SetTitle(title);
-    sprintf(title, "Peak-Pedestals, low gain, run #%.4i, module %i", fPedestals->GetRunNumber(), i);
-    fPedestals->GetPeakProfileLowGain(i)->SetTitle(title);
-    
-    sprintf(title, "Peak-Pedestals difference, high gain, run #%.4i, module %i", fPedestals->GetRunNumber(), i);
-    fPedestals->GetPeakProfileHighGainDiff(i)->SetTitle(title);
-    sprintf(title, "Pedestals difference, high gain, run #%.4i, module %i", fPedestals->GetRunNumber(), i);
-    fPedestals->GetPedProfileHighGainDiff(i)->SetTitle(title);
-    
-    sprintf(title, "Peak-Pedestals difference, low gain, run #%.4i, module %i", fPedestals->GetRunNumber(), i);
-    fPedestals->GetPeakProfileLowGainDiff(i)->SetTitle(title);
-    sprintf(title, "Pedestals difference, low gain, run #%.4i, module %i", fPedestals->GetRunNumber(), i);
-    fPedestals->GetPedProfileLowGainDiff(i)->SetTitle(title);
-    
-    sprintf(title, "Peak-Pedestals ratio, high gain, run #%.4i, module %i", fPedestals->GetRunNumber(), i);
-    fPedestals->GetPeakProfileHighGainRatio(i)->SetTitle(title);
-    sprintf(title, "Pedestals ratio, high gain, run #%.4i, module %i", fPedestals->GetRunNumber(), i);
-    fPedestals->GetPedProfileHighGainRatio(i)->SetTitle(title);
-    
-    sprintf(title, "Peak-Pedestals ratio, low gain, run #%.4i, module %i", fPedestals->GetRunNumber(), i);
-    fPedestals->GetPeakProfileLowGainRatio(i)->SetTitle(title);
-    sprintf(title, "Pedestals ratio, low gain, run #%.4i, module %i", fPedestals->GetRunNumber(), i);
-    fPedestals->GetPedProfileLowGainRatio(i)->SetTitle(title);
-
-  } 
-
-  // Note: Dead map is currently only for high gain.. and we try to use a special palette style for it
-  gStyle->SetPalette(AliCaloCalibPedestal::kNumDeadMapStates, fDeadMapPalette);
-  for (int i = 0; i < fNumModules; i++) {
-    sprintf(title, "Dead map, high gain, run #%.4i, module %i", fPedestals->GetRunNumber(), i);
-    fPedestals->GetDeadMap(i)->SetTitle(title);
-    fPedestals->GetDeadMap(i)->UseCurrentStyle();
-  }
-  // back to standard palette
-  gStyle->SetPalette(1);
-  return;
-}
-
-//_____________________________________________________________________________
-void TMCal::ConstructMenu(UInt_t w)
-{//Constructs the buttons and info 'menu'
-
-  //create frame for the High gain/Low gain -button
-  TGHorizontalFrame *buttonFrame = new TGHorizontalFrame(GetMainViewFrame(),(UInt_t)w,(UInt_t)30);
-  GetMainViewFrame()->AddFrame(buttonFrame,new TGLayoutHints(kLHintsTop|kLHintsExpandX,0,0,0,0));
-  
-  //Create the high/lowgain button
-  fGainButton = new TGTextButton(buttonFrame,"Low gain");
-  fGainButton->Connect("Clicked()","TMCal",this,"OnGainButton()");
-  //fGainButton->AllowStayDown(kTRUE);
-  buttonFrame->AddFrame(fGainButton,new TGLayoutHints(kLHintsCenterY,0,(UInt_t)5,0,0));
-  
-  fDeadCountText = new TGLabel(buttonFrame,"Run #0000: Dead: 000, 000%; 000 new, 0000 recov.; ref. run 0000");
-  //We set generous margins for the label to make sure the text fits even with 4-digit numbers. 
-  fDeadCountText->SetMargins(fDeadCountText->GetLeftMargin()+fgkDeadCountTextMargin, fDeadCountText->GetRightMargin()+fgkDeadCountTextMargin, fDeadCountText->GetTopMargin(), fDeadCountText->GetBottomMargin());
-  buttonFrame->AddFrame(fDeadCountText, new TGLayoutHints(kLHintsCenterY, 0, (UInt_t)5, 0, 0));
-  
-  //Create the one histo/multi-histo -selection buttons
-  TGButtonGroup * buttGr = new TGButtonGroup(buttonFrame, "Display module", kHorizontalFrame);
-  TGRadioButton * radButts[fNumModules + 1];
-  char txt[64];
-  for (int i = 0; i < fNumModules; i++) {
-    sprintf(txt, "%i", i);
-    radButts[i] = new TGRadioButton(buttGr, new TGHotString(txt));
-    sprintf(txt, "OnModeButton(=%i)", i);
-    radButts[i]->Connect("Clicked()", "TMCal", this, txt);
-  }
-  
-  radButts[fNumModules] = new TGRadioButton(buttGr, new TGHotString("All"));
-  sprintf(txt, "OnModeButton(=%i)", fNumModules);
-  radButts[fNumModules]->Connect("Clicked()", "TMCal", this, txt);
-  
-  radButts[fVisibleModule]->SetState(kButtonDown);
-  buttonFrame->AddFrame(buttGr,new TGLayoutHints(kLHintsCenterY,0,(UInt_t)5,0,0));
-  //buttGr->Show();
-  
-  //Add the run number entry
-  TGLabel * runnoText = new TGLabel(buttonFrame,"Run #: ");;
-  buttonFrame->AddFrame(runnoText, new TGLayoutHints(kLHintsCenterY, 0, (UInt_t)5, 0, 0));
-  fRunNoEntry = new TGNumberEntry(buttonFrame, fgkDefaultRunNo, 6, -1,TGNumberFormat::kNESInteger, //style
-                                       TGNumberFormat::kNEAPositive//input value filter
-                                 );
-  fRunNoEntry->Connect("ValueSet(Long_t)", "TMCal",this,"OnRunNoChange(Long_t)");
-  buttonFrame->AddFrame(fRunNoEntry,new TGLayoutHints(kLHintsCenterY|kLHintsLeft,0,(UInt_t)5,0,0));
-  
-  return;
-}
-
-//_____________________________________________________________________________
-void TMCal::ConstructFullGUI()
-{//Constructs the GUI
-  
-  //We need to set the palette for drawing the dead map
-  fDeadMapPalette[AliCaloCalibPedestal::kAlive] = fgkLiveTowerColor;
-  fDeadMapPalette[AliCaloCalibPedestal::kDead] = fgkDeadTowerColor;
-  fDeadMapPalette[AliCaloCalibPedestal::kResurrected] = fgkResurrectedTowerColor;
-  fDeadMapPalette[AliCaloCalibPedestal::kRecentlyDeceased] = fgkRecentlyDeceasedTowerColor;
-  
-  // set up the TPaveText to have the info on the palette also
-  fDeadMapPaveText = new TPaveText(0.9,0.7,0.995,0.9,"brNDC");
-  /* alive ones are not shown really..  
-      TText *tAlive = fDeadMapPaveText->AddText("OK");
-      tAlive->SetTextColor(fgkLiveTowerColor);
-  */
-  TText *tDead = fDeadMapPaveText->AddText("Dead");
-  TText *tResurrected = fDeadMapPaveText->AddText("New OK");
-  TText *tRecentlyDeceased = fDeadMapPaveText->AddText("New Dead");
-  tDead->SetTextColor(fgkDeadTowerColor);
-  tResurrected->SetTextColor(fgkResurrectedTowerColor);
-  tRecentlyDeceased->SetTextColor(fgkRecentlyDeceasedTowerColor);
-
-  fPeaksTab = GetTab()->AddTab("Peak-Pedestal");
-  fPeaksFrameSingle = MakeSingleModuleTab(fPeaksTab, &fPeaksCanvasSingle, &fPeaksRangeSingle, kPeaksSingle, AliCaloCalibPedestal::GetSampleMin(),
-                                         AliCaloCalibPedestal::GetSampleMax(), fMaxPeak);
-  fPeaksFrame = MakeAllModulesTab(fPeaksTab, fPeaksCanvas, &fPeaksRange, kPeaks, AliCaloCalibPedestal::GetSampleMin(),
-                                 AliCaloCalibPedestal::GetSampleMax(), fMaxPeak);
-  fPeaksCanvas[fNumModules] = fPeaksCanvasSingle;
-  
-  fPedsTab = GetTab()->AddTab("Pedestal");
-  fPedsFrameSingle = MakeSingleModuleTab(fPedsTab, &fPedsCanvasSingle, &fPedsRangeSingle, kPedsSingle, AliCaloCalibPedestal::GetSampleMin(),
-                                 AliCaloCalibPedestal::GetSampleMax(), fMaxPed);
-  fPedsFrame = MakeAllModulesTab(fPedsTab, fPedsCanvas, &fPedsRange, kPeds, AliCaloCalibPedestal::GetSampleMin(),
-                                AliCaloCalibPedestal::GetSampleMax(), fMaxPed); //Create the all modules version of the tab
-  fPedsCanvas[fNumModules] = fPedsCanvasSingle;
-  
-  
-  fPeaksDiffTab = GetTab()->AddTab("Peak diff");
-  fPeaksDiffFrameSingle = MakeSingleModuleTab(fPeaksDiffTab, &fPeaksDiffCanvasSingle, &fPeaksDiffRangeSingle, kPeaksDiffSingle, AliCaloCalibPedestal::GetSampleMin(),
-                                             AliCaloCalibPedestal::GetSampleMax(), fMaxPeakDiff);
-  fPeaksDiffFrame = MakeAllModulesTab(fPeaksDiffTab, fPeaksDiffCanvas, &fPeaksDiffRange, kPeaksDiff, AliCaloCalibPedestal::GetSampleMin(),
-                                     AliCaloCalibPedestal::GetSampleMax(), fMaxPeakDiff);
-  fPeaksDiffTab->MapSubwindows();
-  fPeaksDiffCanvas[fNumModules] = fPeaksDiffCanvasSingle; //Copy the pointer to the array, so we can just loop over this one too
-  
-  
-  fPedsDiffTab = GetTab()->AddTab("Pedestal diff");
-  fPedsDiffFrameSingle = MakeSingleModuleTab(fPedsDiffTab, &fPedsDiffCanvasSingle, &fPedsDiffRangeSingle, kPedsDiffSingle, AliCaloCalibPedestal::GetSampleMin(),
-                                            AliCaloCalibPedestal::GetSampleMax(), fMaxPedDiff);
-  fPedsDiffFrame = MakeAllModulesTab(fPedsDiffTab, fPedsDiffCanvas, &fPedsDiffRange, kPedsDiff, AliCaloCalibPedestal::GetSampleMin(),
-                                    AliCaloCalibPedestal::GetSampleMax(), fMaxPedDiff);
-  fPedsDiffCanvas[fNumModules] = fPedsDiffCanvasSingle; 
-  
-  fPeaksRatioTab = GetTab()->AddTab("Peak ratio");
-  fPeaksRatioFrameSingle = MakeSingleModuleTab(fPeaksRatioTab, &fPeaksRatioCanvasSingle, &fPeaksRatioRangeSingle, kPeaksRatioSingle,
-                                              fgkMinMaxRatioExp*fgkRatioStepScale, fgkMaxMaxRatioExp*fgkRatioStepScale,
-                                              -(log(fMaxPeakRatio)/log(2))*fgkRatioStepScale + fgkMaxMaxRatioExp*fgkRatioStepScale);
-  fPeaksRatioFrame = MakeAllModulesTab(fPeaksRatioTab, fPeaksRatioCanvas, &fPeaksRatioRange, kPeaksRatio,
-                                      fgkMinMaxRatioExp*fgkRatioStepScale, fgkMaxMaxRatioExp*fgkRatioStepScale,
-                                      -(log(fMaxPeakRatio)/log(2))*fgkRatioStepScale + fgkMaxMaxRatioExp*fgkRatioStepScale);
-  fPeaksRatioCanvas[fNumModules] = fPeaksRatioCanvasSingle;
-  
-  fPedsRatioTab = GetTab()->AddTab("Pedestal ratio");
-  fPedsRatioFrameSingle = MakeSingleModuleTab(fPedsRatioTab, &fPedsRatioCanvasSingle, &fPedsRatioRangeSingle, kPedsRatioSingle, 
-                                             fgkMinMaxRatioExp*fgkRatioStepScale, fgkMaxMaxRatioExp*fgkRatioStepScale,
-                                             -(log(fMaxPedRatio)/log(2))*fgkRatioStepScale + fgkMaxMaxRatioExp*fgkRatioStepScale);
-  fPedsRatioFrame = MakeAllModulesTab(fPedsRatioTab, fPedsRatioCanvas, &fPedsRatioRange, kPedsRatio, 
-                                      fgkMinMaxRatioExp*fgkRatioStepScale, fgkMaxMaxRatioExp*fgkRatioStepScale, 
-                                     -(log(fMaxPedRatio)/log(2))*fgkRatioStepScale + fgkMaxMaxRatioExp*fgkRatioStepScale);
-  fPedsRatioCanvas[fNumModules] = fPedsRatioCanvasSingle;
-  
-  fDeadMapTab = GetTab()->AddTab(fgkDeadMapTabName);
-  fDeadMapFrameSingle = MakeSingleModuleTab(fDeadMapTab, &fDeadMapCanvasSingle);
-  fDeadMapFrame = MakeAllModulesTab(fDeadMapTab, fDeadMapCanvas);
-  fDeadMapCanvas[fNumModules] = fDeadMapCanvasSingle;
-  
-  DrawHistos();
-  
-  UpdateMonitors();//This is actually just to update the status text... which should then perhaps be done elsewhere, so we could call that separately,
-                  //but since it's needed in exactly one place, I'm too lazy...
-  
-  return;  
-}
-
-//_____________________________________________________________________________
-TGCompositeFrame * TMCal::MakeAllModulesTab(TGCompositeFrame * tab,
-                                           TCanvas **canvArray, //Array of pointers to the canvases to which the histos have been drawn. MUST be initialized.
-                                           TGVSlider **slider, //The pointer to the pointer to the slider, which to put the pointer to the slider to
-                                           kTab tabId, //The tab Id which the slider should give as a parameter when connecting
-                                           double sliderMin, double sliderMax, double sliderPos //The range and position of the slider
-                                           )
-{//The function to create a tab full of histos
-  
-  //The frames. The magic numbers here don't really matter, because the ExpandX and ExpandY
-  //hints will override them anyway. If this behaviour is modified, then these numbers
-  //should be properly declared as constants.
-  TGHorizontalFrame * verFrame = new TGHorizontalFrame(tab, (UInt_t)5*400, (UInt_t)600);
-  TGCompositeFrame * histoFrame = new TGCompositeFrame(verFrame,(UInt_t)40, (UInt_t)400);
-  
-  //Make the layout manager a matrix style
-  histoFrame->SetLayoutManager(new TGMatrixLayout(histoFrame, 0, fgkHistosPerRow));
-  
-  //Add a vertical frame to stack the high/low -gain histos on top of each others
-  tab->AddFrame(verFrame, new TGLayoutHints(kLHintsExpandX, 0, 0, 0, 0));
-  
-  
-  if (slider) {//Add the slider to the histoframe
-    TGVSlider * range = new TGVSlider(verFrame, fgk2DHistoHeight, kSlider1);
-    range->SetRange((int)sliderMin, (int)sliderMax);
-    range->SetPosition( (int)(sliderMax - sliderPos) ); //We have to invert this by hand
-    char str[64];
-    sprintf(str, "OnRange(=%u)", (int)tabId);
-    //range->Connect("PositionChanged(Int_t)", "TMCal",this,str);
-    range->Connect("Released()", "TMCal",this,str);
-    verFrame->AddFrame(range,new TGLayoutHints(0,0,fgk2DHistoMarginX,0,0));
-    *slider = range;
-  }
-  
-  //Add the horizontal frames which layout the individual histos for each module
-  verFrame->AddFrame(histoFrame, new TGLayoutHints(kLHintsExpandX|kLHintsExpandY, 0, 0, 0, 0));
-  
-  //-------------------------------------
-  //Create the canvases
-    
-  TString canvasName = tab->GetName();
-  for (int i = 0; i < fNumModules; i++) {
-  
-    TRootEmbeddedCanvas *ECanvas = new TRootEmbeddedCanvas(canvasName + " " + (TString)i,histoFrame,fgk2DHistoWidth,fgk2DHistoHeight);
-    
-  
-    histoFrame->AddFrame(ECanvas, new TGLayoutHints(0, fgk2DHistoMarginX,0, fgk2DHistoMarginY, 0));
-    
-    canvArray[i] = ECanvas->GetCanvas();
-  } 
-  
-  return verFrame; 
-}
-
-//_____________________________________________________________________________
-TGCompositeFrame * TMCal::MakeSingleModuleTab(TGCompositeFrame * tab,
-                                             TCanvas **canvas,
-                                             TGVSlider **slider, //The pointer to the pointer to the slider, which to put the pointer to the slider to
-                                             kTab tabId, //The tab Id which the slider should give as a parameter when connecting
-                                             double sliderMin, double sliderMax, double sliderPos //The range and position of the slider
-                                             )
-{//The function to create a tab with a single big histo.
-  
-  //TODO: consider if we really need the vertical frame at all, or should just arrange everything to the horizontal frame...
-  
-  //The frames. The magic numbers here don't really matter, because the ExpandX and ExpandY
-  //hints will override them anyway. If this behaviour is modified, then these numbers
-  //should be properly declared as constants.
-  TGVerticalFrame * verFrame = new TGVerticalFrame(tab, (UInt_t)5*400, (UInt_t)600);
-  TGHorizontalFrame * histoFrame = new TGHorizontalFrame(verFrame,(UInt_t)400, (UInt_t)400);
-  
-  //Add a vertical frame to stack the high/low -gain histos on top of each others
-  tab->AddFrame(verFrame, new TGLayoutHints(kLHintsExpandX, 0, 0, 0, 0));
-  
-  //Add the horizontal frames which layout the individual histos for each module
-  verFrame->AddFrame(histoFrame, new TGLayoutHints(kLHintsExpandX|kLHintsExpandY, 0, 0, 0, 0));
-  
-  if (slider) {//Add the slider to the histoframe
-    TGVSlider * range = new TGVSlider(histoFrame, fgk2DSingleHistoHeight, kSlider1);
-    range->SetRange((int)sliderMin, (int)sliderMax);
-    range->SetPosition( (int)(sliderMax - sliderPos) ); //We have to invert this by hand
-    char str[64];
-    sprintf(str, "OnRange(=%u)", (int)tabId);
-    //range->Connect("PositionChanged(Int_t)", "TMCal",this,str);
-    range->Connect("Released()", "TMCal",this,str);
-    histoFrame->AddFrame(range,new TGLayoutHints(0,0,0,0,0));
-    *slider = range;
-  }
-  
-  //-------------------------------------
-  //Create the canvas  
-  
-  TString canvasName = tab->GetName();
-  
-  TRootEmbeddedCanvas *ECanvas = new TRootEmbeddedCanvas(canvasName + "  single",histoFrame,fgk2DSingleHistoWidth,fgk2DSingleHistoHeight);
-  
-  histoFrame->AddFrame(ECanvas, new TGLayoutHints(0, fgk2DSingleHistoMarginX,0, fgk2DSingleHistoMarginY, 0));
-    
-  *canvas = ECanvas->GetCanvas();
-  
-  return verFrame; 
-}
-
-//_____________________________________________________________________________
-void TMCal::MonitorEvent(void)
-{
-// printf("Monitoring for the %ith time this evening.\n", i);
- //Process the next event
- if (fRawReader->NextEvent())
- {
-  AliRawEventHeaderBase *aliHeader = (AliRawEventHeaderBase*) fRawReader->GetEventHeader();
-  
-  if (aliHeader->Get("Type") == AliRawEventHeaderBase::kPhysicsEvent)
-  {
-     fEvents++;
-    //printf("A physics event.\n");
-    fPedestals->ProcessEvent(fCaloRawStream);
-  } //else
-   // printf("A non-physics event.\n");
- }
-}
-
-//_____________________________________________________________________________
-void TMCal::UpdateMonitors(void)
-{
-  //Just update all the histograms
-  fPedestals->ComputeDiffAndRatio();//Re-compute the difference and the ratio
-  //Update the dead cells count
-  fPedestals->ComputeDeadTowers(fgkDeadThreshold);
-  for (int i = 0; (i < fNumModules) && (!fSingleModule); i++) {
-    fPeaksCanvas[i]->Paint();
-    fPeaksCanvas[i]->Update();
-    fPeaksCanvas[i]->Paint();
-    
-    fPedsCanvas[i]->Paint();
-    fPedsCanvas[i]->Update();
-    fPedsCanvas[i]->Paint();
-    
-    fPedsDiffCanvas[i]->Paint();
-    fPedsDiffCanvas[i]->Update();
-    fPedsDiffCanvas[i]->Paint();
-    
-    fPeaksDiffCanvas[i]->Paint();
-    fPeaksDiffCanvas[i]->Update();
-    fPeaksDiffCanvas[i]->Paint();
-    
-    fPedsRatioCanvas[i]->Paint();
-    fPedsRatioCanvas[i]->Update();
-    fPedsRatioCanvas[i]->Paint();
-    
-    fPeaksRatioCanvas[i]->Paint();
-    fPeaksRatioCanvas[i]->Update();
-    fPeaksRatioCanvas[i]->Paint();
-    
-    fPedestals->GetDeadMap(i)->UseCurrentStyle();
-    fDeadMapCanvas[i]->Paint();
-    fDeadMapCanvas[i]->Update();
-    fDeadMapCanvas[i]->Paint();
-  }
-
-  if (fSingleModule) {
-    fPeaksCanvasSingle->Paint();
-    fPeaksCanvasSingle->Update();
-    fPeaksCanvasSingle->Paint();
-    
-    fPeaksCanvasSingle->Paint();
-    fPedsCanvasSingle->Update();
-    fPedsCanvasSingle->Paint();
-    
-    fPeaksCanvasSingle->Paint();
-    fPedsDiffCanvasSingle->Update();
-    fPedsDiffCanvasSingle->Paint();
-    
-    fPeaksCanvasSingle->Paint();
-    fPeaksDiffCanvasSingle->Update();
-    fPeaksDiffCanvasSingle->Paint();
-    
-    fPeaksCanvasSingle->Paint();
-    fPedsRatioCanvasSingle->Update();
-    fPedsRatioCanvasSingle->Paint();
-    
-    fPeaksCanvasSingle->Paint();
-    fPeaksRatioCanvasSingle->Update();
-    fPeaksRatioCanvasSingle->Paint();
-    
-    fPedestals->GetDeadMap(fVisibleModule)->UseCurrentStyle();
-    fDeadMapCanvasSingle->Paint();
-    fDeadMapCanvasSingle->Update();
-    fDeadMapCanvasSingle->Paint();  
- }
-  
-  char tmp[128];
-  sprintf(tmp, "Run #%.4i: Dead: %i, %.1f%%; %i new, %i recov.; Ref. run %i", 
-         fPedestals->GetRunNumber(), (int)fPedestals->GetDeadTowerCount(), 
-         (float)(100.0*fPedestals->GetDeadTowerRatio()),
-         (int)fPedestals->GetDeadTowerNew(), 
-         (int)fPedestals->GetDeadTowerResurrected(), (int)fPedestals->GetRefRunNumber());
-
-  fDeadCountText->SetText(tmp);
-  return; 
-}
-
-//_____________________________________________________________________________
-void TMCal::PostMonitor(void)
-{
-  fPedestals->ComputeDeadTowers(fgkDeadThreshold, fgkDeadMapName);//Write out the deadmap
-  return;
-}
-
-//_____________________________________________________________________________
-TMCal::~TMCal() 
-{ // Destructor  
-  if (fCaloRawStream) delete fCaloRawStream; 
-  if (fRawReader) delete fRawReader;
-  if (fPedestals) delete fPedestals;  
-}
-
-//_____________________________________________________________________________
-void TMCal::DrawHistos() { // Gain button handler
-  //Recalculate the differences and ratios (because this causes a screen update)
-  fPedestals->ComputeDiffAndRatio();
-  //Finally draw the deadmap. This has to be done outside the low/highgain iffing.
-  //There is probably a smoother way to do this than by repeating the loop, though...
-  for (int i = 0; (i < fNumModules) && (!fSingleModule); i++) {
-    fDeadMapCanvas[i]->cd();
-    //Draw the deadmap
-    fPedestals->GetDeadMap(i)->Draw("col");
-    // also a TPaveText with info on what the colors mean
-    fDeadMapPaveText->Draw();
-    fDeadMapCanvas[i]->Update();
-    fDeadMapCanvas[i]->Paint();
-  }
- if (fSingleModule) {
-   fDeadMapCanvasSingle->cd();
-   fPedestals->GetDeadMap(fVisibleModule)->Draw("col");
-    // also a TPaveText with info on what the colors mean
-   fDeadMapPaveText->Draw();
-   fDeadMapCanvasSingle->Update();
-   fDeadMapCanvasSingle->Paint();
- }
- if (!fLowGainMode) {
-   for (int i = 0; (i < fNumModules) && (!fSingleModule); i++) {
-     fPeaksCanvas[i]->cd();
-     //Draw the high gain peak-minus pedestals
-     fPedestals->GetPeakProfileHighGain((i < fNumModules) ? i : fVisibleModule)->Draw("colz");
-     fPeaksCanvas[i]->Update();
-     fPeaksCanvas[i]->Paint();
-     
-     fPedsCanvas[i]->cd();
-     //Draw the high gain peak-minus pedestals
-     fPedestals->GetPedProfileHighGain((i < fNumModules) ? i : fVisibleModule)->Draw("colz");
-     fPedsCanvas[i]->Update();
-     fPedsCanvas[i]->Paint();
-   
-     fPedsDiffCanvas[i]->cd();
-     //Draw the high gain peak-minus pedestals
-     fPedestals->GetPedProfileHighGainDiff((i < fNumModules) ? i : fVisibleModule)->Draw("colz");
-     fPedsDiffCanvas[i]->Update();
-     fPedsDiffCanvas[i]->Paint();
-     
-     fPeaksDiffCanvas[i]->cd();
-     //Draw the high gain peak-minus pedestals
-     fPedestals->GetPeakProfileHighGainDiff((i < fNumModules) ? i : fVisibleModule)->Draw("colz");
-     fPeaksDiffCanvas[i]->Update();
-     fPeaksDiffCanvas[i]->Paint();
-     
-     fPeaksRatioCanvas[i]->cd();
-     //Draw the high gain peak-minus pedestals
-     fPedestals->GetPeakProfileHighGainRatio((i < fNumModules) ? i : fVisibleModule)->Draw("colz");
-     fPeaksRatioCanvas[i]->Update();
-     fPeaksRatioCanvas[i]->Paint();
-   
-     fPedsRatioCanvas[i]->cd();
-     //Draw the high gain peak-minus pedestals
-     fPedestals->GetPedProfileHighGainRatio((i < fNumModules) ? i : fVisibleModule)->Draw("colz");
-     fPedsRatioCanvas[i]->Update();
-     fPedsRatioCanvas[i]->Paint();
-   } // i = modules
-
-   if (fSingleModule) {
-     fPeaksCanvas[fNumModules]->cd();
-     //Draw the high gain peak-minus pedestals
-     fPedestals->GetPeakProfileHighGain(fVisibleModule)->Draw("colz");
-     fPeaksCanvas[fNumModules]->Update();
-     fPeaksCanvas[fNumModules]->Paint();
-     
-     fPedsCanvas[fNumModules]->cd();
-     //Draw the high gain peak-minus pedestals
-     fPedestals->GetPedProfileHighGain(fVisibleModule)->Draw("colz");
-     fPedsCanvas[fNumModules]->Update();
-     fPedsCanvas[fNumModules]->Paint();
-     
-     fPedsDiffCanvas[fNumModules]->cd();
-     //Draw the high gain peak-minus pedestals
-     fPedestals->GetPedProfileHighGainDiff(fVisibleModule)->Draw("colz");
-     fPedsDiffCanvas[fNumModules]->Update();
-     fPedsDiffCanvas[fNumModules]->Paint();
-     
-     fPeaksDiffCanvas[fNumModules]->cd();
-     //Draw the high gain peak-minus pedestals
-     fPedestals->GetPeakProfileHighGainDiff(fVisibleModule)->Draw("colz");
-     fPeaksDiffCanvas[fNumModules]->Update();
-     fPeaksDiffCanvas[fNumModules]->Paint();
-     
-     fPeaksRatioCanvas[fNumModules]->cd();
-     //Draw the high gain peak-minus pedestals
-     fPedestals->GetPeakProfileHighGainRatio(fVisibleModule)->Draw("colz");
-     fPeaksRatioCanvas[fNumModules]->Update();
-     fPeaksRatioCanvas[fNumModules]->Paint();
-     
-     fPedsRatioCanvas[fNumModules]->cd();
-     //Draw the high gain peak-minus pedestals
-     fPedestals->GetPedProfileHighGainRatio(fVisibleModule)->Draw("colz");
-     fPedsRatioCanvas[fNumModules]->Update();
-     fPedsRatioCanvas[fNumModules]->Paint();        
-   }    
- } // not low gain
- else {
-   for (int i = 0; (i < fNumModules) && (!fSingleModule); i++) {
-     fPeaksCanvas[i]->cd();
-     //Draw the high gain peak-minus pedestals
-     fPedestals->GetPeakProfileLowGain((i < fNumModules) ? i : fVisibleModule)->Draw("colz");
-     fPeaksCanvas[i]->Update();
-     fPeaksCanvas[i]->Paint();
-     
-     fPedsCanvas[i]->cd();
-     //Draw the high gain peak-minus pedestals
-     fPedestals->GetPedProfileLowGain((i < fNumModules) ? i : fVisibleModule)->Draw("colz");
-     fPedsCanvas[i]->Update();
-     fPedsCanvas[i]->Paint();
-     
-     fPedsDiffCanvas[i]->cd();
-     //Draw the high gain peak-minus pedestals
-     fPedestals->GetPedProfileLowGainDiff((i < fNumModules) ? i : fVisibleModule)->Draw("colz");
-     fPedsDiffCanvas[i]->Update();
-     fPedsDiffCanvas[i]->Paint();
-     
-     fPeaksDiffCanvas[i]->cd();
-     //Draw the high gain peak-minus pedestals
-     fPedestals->GetPeakProfileLowGainDiff((i < fNumModules) ? i : fVisibleModule)->Draw("colz");
-     fPeaksDiffCanvas[i]->Update();
-     fPeaksDiffCanvas[i]->Paint();
-     
-     fPeaksRatioCanvas[i]->cd();
-     //Draw the high gain peak-minus pedestals
-     fPedestals->GetPeakProfileLowGainRatio((i < fNumModules) ? i : fVisibleModule)->Draw("colz");
-     fPeaksRatioCanvas[i]->Update();
-     fPeaksRatioCanvas[i]->Paint();
-     
-     fPedsRatioCanvas[i]->cd();
-     //Draw the high gain peak-minus pedestals
-     fPedestals->GetPedProfileLowGainRatio((i < fNumModules) ? i : fVisibleModule)->Draw("colz");
-     fPedsRatioCanvas[i]->Update();
-     fPedsRatioCanvas[i]->Paint();
-   }
-
-   if (fSingleModule) {
-     fPeaksCanvas[fNumModules]->cd();
-     //Draw the high gain peak-minus pedestals
-     fPedestals->GetPeakProfileLowGain(fVisibleModule)->Draw("colz");
-     fPeaksCanvas[fNumModules]->Update();
-     fPeaksCanvas[fNumModules]->Paint();
-     
-     fPedsCanvas[fNumModules]->cd();
-     //Draw the high gain peak-minus pedestals
-     fPedestals->GetPedProfileLowGain(fVisibleModule)->Draw("colz");
-     fPedsCanvas[fNumModules]->Update();
-     fPedsCanvas[fNumModules]->Paint();
-     
-     fPedsDiffCanvas[fNumModules]->cd();
-     //Draw the high gain peak-minus pedestals
-     fPedestals->GetPedProfileLowGainDiff(fVisibleModule)->Draw("colz");
-     fPedsDiffCanvas[fNumModules]->Update();
-     fPedsDiffCanvas[fNumModules]->Paint();
-     
-     fPeaksDiffCanvas[fNumModules]->cd();
-     //Draw the high gain peak-minus pedestals
-     fPedestals->GetPeakProfileLowGainDiff(fVisibleModule)->Draw("colz");
-     fPeaksDiffCanvas[fNumModules]->Update();
-     fPeaksDiffCanvas[fNumModules]->Paint();
-     
-     fPeaksRatioCanvas[fNumModules]->cd();
-     //Draw the high gain peak-minus pedestals
-     fPedestals->GetPeakProfileLowGainRatio(fVisibleModule)->Draw("colz");
-     fPeaksRatioCanvas[fNumModules]->Update();
-     fPeaksRatioCanvas[fNumModules]->Paint();
-     
-     fPedsRatioCanvas[fNumModules]->cd();
-     //Draw the high gain peak-minus pedestals
-     fPedestals->GetPedProfileLowGainRatio(fVisibleModule)->Draw("colz");
-     fPedsRatioCanvas[fNumModules]->Update();
-     fPedsRatioCanvas[fNumModules]->Paint();
-   }
- } // low gain 
- return;
-}
-
-//_____________________________________________________________________________
-void TMCal::OnGainButton() 
-{ // Gain button handler
-
-  if (fLowGainMode) {
-    fLowGainMode = kFALSE;
-    fGainButton->SetText("Low gain");
-  }
-  else {
-    fLowGainMode = kTRUE;
-    fGainButton->SetText("High gain");
-  }
-  DrawHistos();
-  
-  return;
-}
-
-//_____________________________________________________________________________
-void TMCal::OnRange(kTab tab)
-{//Range change handler
-  int i = 0;
-  switch(tab) {
-
-  case kPeds:
-    fPedsRangeSingle->SetPosition(fPedsRange->GetPosition());
-    fMaxPed = AliCaloCalibPedestal::GetSampleMax() - fPedsRange->GetPosition();
-    //printf("Value changed to %u.\n", (unsigned int)fMaxPedDiff);
-    for (i = 0; i < fNumModules; i++) {
-      fPedestals->GetPedProfileHighGain(i)->GetZaxis()->SetRangeUser(-1.0*fMaxPed, fMaxPed);
-      fPedestals->GetPedProfileLowGain(i)->GetZaxis()->SetRangeUser(-1.0*fMaxPed, fMaxPed);
-      if (!fSingleModule) {//Don't update all the monitors if we're in single module mode, to speed up the redraw there
-       fPedsCanvas[i]->Paint(); //For some reason we need paint-update-paint, just update-paint or paint-update won't do...
-       fPedsCanvas[i]->Update();
-       fPedsCanvas[i]->Paint();
-      }
-    }
-    fPedsCanvasSingle->Paint(); //For some reason we need paint-update-paint, just update-paint or paint-update won't do...
-    fPedsCanvasSingle->Update();
-    fPedsCanvasSingle->Paint();
-    break;
-   
-  case kPeaks:
-    fPeaksRangeSingle->SetPosition(fPeaksRange->GetPosition());
-    fMaxPeak = AliCaloCalibPedestal::GetSampleMax() - fPeaksRange->GetPosition();
-    //printf("Value changed to %u.\n", (unsigned int)fMaxPedDiff);
-    for (i = 0; i < fNumModules; i++) {
-      fPedestals->GetPeakProfileHighGain(i)->GetZaxis()->SetRangeUser(-1.0*fMaxPeak, fMaxPeak);
-      fPedestals->GetPeakProfileLowGain(i)->GetZaxis()->SetRangeUser(-1.0*fMaxPeak, fMaxPeak);
-      if (!fSingleModule) {//Don't update all the monitors if we're in single module mode, to speed up the redraw there
-       fPeaksCanvas[i]->Paint(); //For some reason we need paint-update-paint, just update-paint or paint-update won't do...
-       fPeaksCanvas[i]->Update();
-       fPeaksCanvas[i]->Paint();
-      }
-    }
-    fPeaksCanvasSingle->Paint(); //For some reason we need paint-update-paint, just update-paint or paint-update won't do...
-    fPeaksCanvasSingle->Update();
-    fPeaksCanvasSingle->Paint();
-    break;
-  
-  case kPedsDiff:
-    fPedsDiffRangeSingle->SetPosition(fPedsDiffRange->GetPosition());
-    fMaxPedDiff = AliCaloCalibPedestal::GetSampleMax() - fPedsDiffRange->GetPosition();
-    //printf("Value changed to %u.\n", (unsigned int)fMaxPedDiff);
-    for (i = 0; i < fNumModules; i++) {
-      fPedestals->GetPedProfileHighGainDiff(i)->GetZaxis()->SetRangeUser(-1.0*fMaxPedDiff, fMaxPedDiff);
-      fPedestals->GetPedProfileLowGainDiff(i)->GetZaxis()->SetRangeUser(-1.0*fMaxPedDiff, fMaxPedDiff);
-      if (!fSingleModule) {//Don't update all the monitors if we're in single module mode, to speed up the redraw there
-       fPedsDiffCanvas[i]->Paint(); //For some reason we need paint-update-paint, just update-paint or paint-update won't do...
-       fPedsDiffCanvas[i]->Update();
-       fPedsDiffCanvas[i]->Paint();
-      }
-    }
-    fPedsDiffCanvasSingle->Paint(); //For some reason we need paint-update-paint, just update-paint or paint-update won't do...
-    fPedsDiffCanvasSingle->Update();
-    fPedsDiffCanvasSingle->Paint();
-    break;
-   
-  case kPeaksDiff:
-    fPeaksDiffRangeSingle->SetPosition(fPeaksDiffRange->GetPosition());
-    fMaxPeakDiff = AliCaloCalibPedestal::GetSampleMax() - fPeaksDiffRange->GetPosition();
-    //printf("Value changed to %u.\n", (unsigned int)fMaxPedDiff);
-    for (i = 0; i < fNumModules; i++) {
-      fPedestals->GetPeakProfileHighGainDiff(i)->GetZaxis()->SetRangeUser(-1.0*fMaxPeakDiff, fMaxPeakDiff);
-      fPedestals->GetPeakProfileLowGainDiff(i)->GetZaxis()->SetRangeUser(-1.0*fMaxPeakDiff, fMaxPeakDiff);
-      if (!fSingleModule) {//Don't update all the monitors if we're in single module mode, to speed up the redraw there
-       fPeaksDiffCanvas[i]->Paint();
-       fPeaksDiffCanvas[i]->Update();
-       fPeaksDiffCanvas[i]->Paint();
-      } 
-    }
-    fPeaksDiffCanvasSingle->Paint();
-    fPeaksDiffCanvasSingle->Update();
-    fPeaksDiffCanvasSingle->Paint();
-    break;
-
-  case kPedsRatio:
-    fPedsRatioRangeSingle->SetPosition(fPedsRatioRange->GetPosition());
-    //fMaxPedRatio = fgkMaxMaxRatio - fPedsDiffRange->GetPosition() + fgkMinMaxRatio;
-    fMaxPedRatio = pow(2.0, -fPedsRatioRange->GetPosition()/fgkRatioStepScale);//Make the control logarithmic
-    //printf("Pedsratio changed to %g, position is set at %i.\n", fMaxPedRatio, (int)fPedsRatioRange->GetPosition());
-    for (i = 0; i < fNumModules; i++) {
-      fPedestals->GetPedProfileHighGainRatio(i)->GetZaxis()->SetRangeUser(0.0, fMaxPedRatio);
-      fPedestals->GetPedProfileLowGainRatio(i)->GetZaxis()->SetRangeUser(0.0, fMaxPedRatio);
-      if (!fSingleModule) {//Don't update all the monitors if we're in single module mode, to speed up the redraw there
-       fPedsRatioCanvas[i]->Paint();
-       fPedsRatioCanvas[i]->Update();
-       fPedsRatioCanvas[i]->Paint();
-      } 
-    }
-    fPedsRatioCanvasSingle->Paint();
-    fPedsRatioCanvasSingle->Update();
-    fPedsRatioCanvasSingle->Paint();
-    break;
-
-  case kPeaksRatio:
-    fPeaksRatioRangeSingle->SetPosition(fPeaksRatioRange->GetPosition());
-    fMaxPeakRatio = pow(2.0, -fPeaksRatioRange->GetPosition()/fgkRatioStepScale);//Make the control logarithmic
-    //printf("Pedsratio changed to %g, position is set at %i.\n", fMaxPeakRatio, (int)fPeaksRatioRange->GetPosition());
-    for (i = 0; i < fNumModules; i++) {
-      fPedestals->GetPeakProfileHighGainRatio(i)->GetZaxis()->SetRangeUser(0.0, fMaxPeakRatio);
-      fPedestals->GetPeakProfileLowGainRatio(i)->GetZaxis()->SetRangeUser(0.0, fMaxPeakRatio);
-      if (!fSingleModule) {//Don't update all the monitors if we're in single module mode, to speed up the redraw there
-       fPeaksRatioCanvas[i]->Paint();
-       fPeaksRatioCanvas[i]->Update();
-       fPeaksRatioCanvas[i]->Paint();
-      }
-    }
-    fPeaksRatioCanvasSingle->Paint();
-    fPeaksRatioCanvasSingle->Update();
-    fPeaksRatioCanvasSingle->Paint();
-    break;
-    
-    //The single-histo-at-a-time sliders. We'll just set the other slider to match and call the normal handler :)
-  case kPedsSingle:
-    fPedsRange->SetPosition(fPedsRangeSingle->GetPosition());
-    OnRange(kPeds);
-    break;
-  case kPeaksSingle:
-    fPeaksRange->SetPosition(fPeaksRangeSingle->GetPosition());
-    OnRange(kPeaks);
-    break;
-  case kPedsDiffSingle:
-    fPedsDiffRange->SetPosition(fPedsDiffRangeSingle->GetPosition());
-    OnRange(kPedsDiff);
-    break;
-  case kPeaksDiffSingle:
-    fPeaksDiffRange->SetPosition(fPeaksDiffRangeSingle->GetPosition());
-    OnRange(kPeaksDiff);
-    break;
-  case kPedsRatioSingle:
-    fPedsRatioRange->SetPosition(fPedsRatioRangeSingle->GetPosition());
-    OnRange(kPedsRatio);
-    break;
-  case kPeaksRatioSingle:
-    fPeaksRatioRange->SetPosition(fPeaksRatioRangeSingle->GetPosition());
-    OnRange(kPeaksRatio);
-    break;
-  default:
-    printf("Unknown tab slider %u.\n", (int)tab);
-    break;
-  }
-
-  return;
-}
-
-//_____________________________________________________________________________
-void TMCal::OnModeButton(int button) 
-{ // Module selection radio button handler
-  if (button < fNumModules) {
-    fVisibleModule = button;
-    fSingleModule = true;
-    
-    fPeaksTab->HideFrame(fPeaksFrame);
-    fPeaksTab->ShowFrame(fPeaksFrameSingle);
-    
-    fPedsTab->HideFrame(fPedsFrame);
-    fPedsTab->ShowFrame(fPedsFrameSingle);
-    
-    fPeaksDiffTab->HideFrame(fPeaksDiffFrame);
-    fPeaksDiffTab->ShowFrame(fPeaksDiffFrameSingle);
-    
-    fPedsDiffTab->HideFrame(fPedsDiffFrame);
-    fPedsDiffTab->ShowFrame(fPedsDiffFrameSingle);
-    
-    fPeaksRatioTab->HideFrame(fPeaksRatioFrame);
-    fPeaksRatioTab->ShowFrame(fPeaksRatioFrameSingle);
-    
-    fPedsRatioTab->HideFrame(fPedsRatioFrame);
-    fPedsRatioTab->ShowFrame(fPedsRatioFrameSingle);
-    
-    fDeadMapTab->HideFrame(fDeadMapFrame);
-    fDeadMapTab->ShowFrame(fDeadMapFrameSingle);
-    
-    DrawHistos();
-  }
-  else { // all
-    fSingleModule = false;
-    fPeaksTab->HideFrame(fPeaksFrameSingle);
-    fPeaksTab->ShowFrame(fPeaksFrame);
-    
-    fPedsTab->HideFrame(fPedsFrameSingle);
-    fPedsTab->ShowFrame(fPedsFrame);
-    
-    fPeaksDiffTab->HideFrame(fPeaksDiffFrameSingle);
-    fPeaksDiffTab->ShowFrame(fPeaksDiffFrame);
-    
-    fPedsDiffTab->HideFrame(fPedsDiffFrameSingle);
-    fPedsDiffTab->ShowFrame(fPedsDiffFrame);
-    
-    fPeaksRatioTab->HideFrame(fPeaksRatioFrameSingle);
-    fPeaksRatioTab->ShowFrame(fPeaksRatioFrame);
-    
-    fPedsRatioTab->HideFrame(fPedsRatioFrameSingle);
-    fPedsRatioTab->ShowFrame(fPedsRatioFrame);
-    
-    fDeadMapTab->HideFrame(fDeadMapFrameSingle);
-    fDeadMapTab->ShowFrame(fDeadMapFrame);
-    
-    DrawHistos();//this is because we may not have drawn the histos to their canvases.
-  }
-
-  return;  
-}
-
-//_____________________________________________________________________________
-void TMCal::OnRunNoChange(Long_t val) 
-{
-  //printf("Run number changed to %u.\n", (int)fRunNoEntry->GetIntNumber());
-  InitRawReaderAndStream(fRunNoEntry->GetIntNumber());
-  UpdateMonitors();
-  //We still need to re-paint the tabs to make the change visible
-  fPeaksFrame->Paint();
-  return;
-}
-
-//_____________________________________________________________________________
-void TMCal::OnTabChange(Int_t Id)
-{
-  //This sets the palette for the deadmap tab to the four colors we want there, and otherwise to
-  //the standard no. 1 palette. To make this work, we need to do updatemonitors, which is slow,
-  //so in case you're willing to sacrifice the custom palette for the deadmap in favor of speed,
-  //just comment out/remove this function and the GetTab()->Connect(...) in the constructor.
-  if (!strcmp(GetTab()->GetTabTab(Id)->GetString(), fgkDeadMapTabName)) {
-    gStyle->SetPalette(AliCaloCalibPedestal::kNumDeadMapStates, fDeadMapPalette);
-  }
-  else {
-    gStyle->SetPalette(1);
-  }
-
-  UpdateMonitors();
-   
-  return; 
-}
diff --git a/EMCAL/mood/TMCal.h b/EMCAL/mood/TMCal.h
deleted file mode 100644 (file)
index 6a5b0e9..0000000
+++ /dev/null
@@ -1,189 +0,0 @@
-// Author: Filimon Roukoutakis 
-/******************************************************************************
-  MOOD - Monitor Of On-line Data and Detector Debugger for ALICE Experiment
-******************************************************************************/
-
-#ifndef TMCAL_H
-#define TMCAL_H
-
-/******************************************************************************
- *                                                                            *
- * TMCAL                                                                      *
- *                                                                            *
- * CAL Module Class; base class for EMCAL and PHOS monitors                   *
- *                                                                            *
- * Author: Timo Alho (Jyvaskyla), original version                            *
- * [Consultant: D. Silvermyr (ORNL)]                                          *
- *                                                                            *
- ******************************************************************************/
-
-#include "TMBaseModule.h"
-#include "Mood.h"
-#include "MoodOC.hh"
-#include "TGSlider.h"
-
-//This class will handle the pedestal data analysis
-#include "AliRawReader.h"
-#include "AliCaloRawStream.h"
-#include "AliCaloCalibPedestal.h"
-
-//TMCalConstants.hh includes all the defaults and GUI layout etc..
-#include "TMCalConstants.hh" 
-
-class TMCal: public TMBaseModule {
-  
-  RQ_OBJECT("TMCal")
-
- protected:
-
-  virtual void ConstructGUI(void) {};
-  virtual void ConstructMonitors(void) {};
-  virtual void DestructMonitors(void) {};
-  virtual void DestructGUI(void) {};
-  virtual void InitMonitors(void) {};
-  virtual void MonitorEvent(void);
-  virtual void UpdateMonitors(void);
-  virtual void ResetMonitors(void) {};
-  virtual void PreMonitor(void) {};
-  virtual void PostMonitor(void);
- private:
-  AliCaloCalibPedestal::kDetType fDetType; //The detector type for this object
-  int fNumModules;
-  enum kTab {kPeds, kPeaks, kPedsDiff, kPeaksDiff, kPedsRatio, kPeaksRatio, 
-            kPedsSingle, kPeaksSingle, kPedsDiffSingle, kPeaksDiffSingle, kPedsRatioSingle, kPeaksRatioSingle};
-  int  fEvents; //The number of events processed
-  AliCaloCalibPedestal *fPedestals; //The object taking care of pedestal and pedestal-peak profile generation
-  AliRawReader *fRawReader; //The raw data reader
-  AliCaloRawStream *fCaloRawStream; //The object to sort this out to EMCAL/PHOS data
-  /////////////////////////////
-  //GUI components
-  //Histocanvases. The last one, that is [fgkNumModules] is the single histo display canvas.
-  //This isn't too neat or good programming style, but it does make handling the updates etc simpler and more unified -> less prone to errors
-  TCanvas * fPedsCanvas[fgkMaxModules+1]; //!The pointers to the Ped canvases for the modules
-  TCanvas * fPeaksCanvas[fgkMaxModules+1]; //!The pointers to the Peak canvases for the modules
-  TCanvas * fPedsDiffCanvas[fgkMaxModules+1]; //!The pointers to the Ped difference canvases for the modules
-  TCanvas * fPeaksDiffCanvas[fgkMaxModules+1]; //!The pointers to the Peak difference canvases for the modules
-  TCanvas * fPedsRatioCanvas[fgkMaxModules+1]; //!The pointers to the Ped ratio canvases for the modules
-  TCanvas * fPeaksRatioCanvas[fgkMaxModules+1]; //!The pointers to the Peak ratio anvases for the modules
-  TCanvas * fDeadMapCanvas[fgkMaxModules+1];
-  //Single histo canvases. These hold pointers to the single histo canvases. Note that a copy is in the main canvas arrays above
-  TCanvas * fPedsCanvasSingle; //!
-  TCanvas * fPeaksCanvasSingle; //!
-  TCanvas * fPedsDiffCanvasSingle; //!
-  TCanvas * fPeaksDiffCanvasSingle; //!
-  TCanvas * fPedsRatioCanvasSingle; //!
-  TCanvas * fPeaksRatioCanvasSingle; //!
-  TCanvas * fDeadMapCanvasSingle; //!
-  
-  TGLabel * fDeadCountText;
-  
-  //The tab pointers
-  TGCompositeFrame * fPedsTab;
-  TGCompositeFrame * fPeaksTab;
-  TGCompositeFrame * fPedsDiffTab;
-  TGCompositeFrame * fPeaksDiffTab;
-  TGCompositeFrame * fPedsRatioTab;
-  TGCompositeFrame * fPeaksRatioTab;
-  TGCompositeFrame * fDeadMapTab;
-  
-  //The vertical major frames for the multihisto displays in each of the tabs
-  TGCompositeFrame * fPeaksDiffFrame;
-  TGCompositeFrame * fPedsDiffFrame;
-  TGCompositeFrame * fPeaksFrame;
-  TGCompositeFrame * fPedsFrame;
-  TGCompositeFrame * fPeaksRatioFrame;
-  TGCompositeFrame * fPedsRatioFrame;
-  TGCompositeFrame * fDeadMapFrame;
-  
-  //The same for the single histo displays
-  TGCompositeFrame * fPeaksDiffFrameSingle;
-  TGCompositeFrame * fPedsDiffFrameSingle;
-  TGCompositeFrame * fPeaksFrameSingle;
-  TGCompositeFrame * fPedsFrameSingle;
-  TGCompositeFrame * fPeaksRatioFrameSingle;
-  TGCompositeFrame * fPedsRatioFrameSingle;
-  TGCompositeFrame * fDeadMapFrameSingle;
-  
-  //The buttons on the lower panel
-  TGTextButton * fGainButton;
-  TGTextButton * fSingleModeButton;
-  TGNumberEntry * fRunNoEntry;
-  
-  //The range sliders
-  TGVSlider * fPeaksRange;
-  TGVSlider * fPedsRange;
-  TGVSlider * fPeaksDiffRange;
-  TGVSlider * fPedsDiffRange;
-  TGVSlider * fPeaksRatioRange;
-  TGVSlider * fPedsRatioRange;
-  //The range sliders for single module
-  TGVSlider * fPeaksRangeSingle;
-  TGVSlider * fPedsRangeSingle;
-  TGVSlider * fPeaksDiffRangeSingle;
-  TGVSlider * fPedsDiffRangeSingle;
-  TGVSlider * fPeaksRatioRangeSingle;
-  TGVSlider * fPedsRatioRangeSingle;
-  
-  //GUI State
-  Bool_t fLowGainMode; //Low or high gain to be displayed
-  Bool_t fSingleModule; //If we are in a single module state
-  int fVisibleModule; //The module which is visible, if we're in the single module mode
-  Int_t fDeadMapPalette[AliCaloCalibPedestal::kNumDeadMapStates]; //The palette used for drawing the dead map. See TMCalConstants.hh for the color
-  //definition (which are assigned in the constructor of this class)
-  //The easiest way to define a string constant...
-#define fgkDeadMapTabName "DeadMap"
-  TPaveText * fDeadMapPaveText;
-
-  double fMaxPed;
-  double fMaxPeak;
-  double fMaxPeakDiff;
-  double fMaxPedDiff;
-  double fMaxPedRatio;
-  double fMaxPeakRatio;
-  
-  //////////////////////////////
-  //GUI Creation helpers
-  
-  void DrawHistos();//Draw the histos                               
-  TGCompositeFrame * MakeAllModulesTab(TGCompositeFrame * tab,
-                                      TCanvas **canvArray, //Array of pointers to the canvases to which the histos have been drawn. MUST be initialized.
-                                      TGVSlider **slider = 0, //The pointer to the pointer to the slider, which to put the slider to
-                                      kTab tabId = kPeds, //The tab Id which the slider should give as a parameter when connecting
-                                      double sliderMin = 0.0, double sliderMax = 0.0, double sliderPos = 0.0 //The range and position of the slider
-                                      );//The function to create a tab full of histos
-
-  TGCompositeFrame * MakeSingleModuleTab(TGCompositeFrame * tab,
-                                        TCanvas **canvas,
-                                        TGVSlider **slider = 0, //The pointer to the pointer to the slider, which to put the slider to
-                                        kTab tabId = kPeds, //The tab Id which the slider should give as a parameter when connecting
-                                        double sliderMin = 0.0, double sliderMax = 0.0, double sliderPos = 0.0 //The range and position of the slider
-                                        );
-  void ConstructFullGUI(); //Constructs the GUI with all modules visible
-  void ConstructMenu(UInt_t w); //Constructs the GUI with all modules visible
-  void InitRawReaderAndStream(unsigned int runNo); //Inits the Raw  reader and CaloRawStream
-  void SetTitles();//Sets the title of the histos
-  
- public:
-  TMCal(const TGWindow *p, UInt_t w, UInt_t h, AliCaloCalibPedestal::kDetType detectorType);
-  virtual ~TMCal();
-  //GUI event handlers
-  void OnGainButton();
-  void OnModeButton(int button);
-  void OnRange(kTab tab);
-  void OnRunNoChange(Long_t val);
-  void OnTabChange(Int_t Id);//Here we have to set the appropriate palette for the tab
-
-  ClassDef(TMCal, 1); // Calorimeter Module Base Class
-  
-};
-
-#endif
diff --git a/EMCAL/mood/TMCalConstants.hh b/EMCAL/mood/TMCalConstants.hh
deleted file mode 100644 (file)
index e93802d..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-#ifndef TMCALCONSTANTS_H
-#define TMCALCONSTANTS_H
-
-//System constants
-static const int fgkMaxModules = 12;
-//static const char fgkDeadMapName[] = "Deadmap.txt"; 
-//A static const char[] apparently cannot be initialized
-//in class, so it's either a #define or a constant in the constructor...
-#define fgkDeadMapName "Deadmap"
-#define fgkReferenceObject "RunCalib"
-
-// Path to data and reference probably different for PHOS and EMCAL..
-// PHOS
-#define fgkSourceFileTemplatePhos "/data1/phos/run%.4u.root"
-// #define fgkSourceFileTemplate "/data1/phos/Period_LHC07a.Run_%.9u.Host_001.Seq_10.root"
-#define fgkReferenceFilePhos "/home/phos/talho/PHOS/ana/RunCalib.root"
-// EMCAL
-#define fgkSourceFileTemplateEmCal "/local/data/Run_%.9u.Seq_1A.Stream_0.root"
-#define fgkReferenceFileEmCal "/home/emcaldaq/ref/RunCalib.root"
-//Analysis constants
-static const int fgkDeadThreshold = 5; //The threshold for declaring a cell dead
-static const unsigned int fgkDefaultRunNo = 7519; //The default run number
-
-//GUI constants
-static const int fgkHistosPerRow = 5;
-static const int fgk2DHistoWidth = 188;
-static const int fgk2DHistoHeight = 172;
-static const int fgk2DHistoMarginX = 5;
-static const int fgk2DHistoMarginY = 5;
-static const int fgk2DSingleHistoWidth = 600;
-static const int fgk2DSingleHistoHeight = 500;
-static const int fgk2DSingleHistoMarginX = 5;
-static const int fgk2DSingleHistoMarginY = 5;
-static const double fgkMaxMaxRatioExp = 10.0;//These are the extremes of user control, that's why 'maxmax' and 'minmax'
-static const double fgkMinMaxRatioExp = -10.0;
-static const double fgkRatioStepScale = 10.0; //The number of steps per unit exponent. Determines the granularity of the ratio sliders.
-
-// having a custom DeadMap palette costs some time (nicer, but slower), so make this
-// usage optional with a define switch
-//#define fgkCustomDeadMapPalette 1 // comment out to de-activate
-
-#ifdef fgkCustomDeadMapPalette
-//Dead map colors. These are indices to the
-//standard root palette.
-static const Int_t fgkLiveTowerColor = 10;
-static const Int_t fgkDeadTowerColor = 1;
-static const Int_t fgkResurrectedTowerColor = 4;
-static const Int_t fgkRecentlyDeceasedTowerColor = 2;
-#else
-// when we don't use the custom palette we get stuck with these colors for palette1
-static const Int_t fgkLiveTowerColor = 0; // kWhite
-static const Int_t fgkDeadTowerColor = 432; // kCyan
-static const Int_t fgkResurrectedTowerColor = 827; // kSpring + 7
-static const Int_t fgkRecentlyDeceasedTowerColor = 632; // kRed
-#endif
-
-static const int fgkDeadCountTextMargin = 30;
-
-#endif // TMCALCONSTANTS_H
diff --git a/EMCAL/mood/TMEMC.cxx b/EMCAL/mood/TMEMC.cxx
deleted file mode 100644 (file)
index aeb3bc5..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#include "TMEMC.h"
-
-ClassImp(TMEMC)
-
-//_____________________________________________________________________________
-TMEMC::TMEMC(const TGWindow *p, UInt_t w, UInt_t h) : 
-  TMCal(p, w, h, AliCaloCalibPedestal::kEmCal)
-{
-}
-
diff --git a/EMCAL/mood/TMEMC.h b/EMCAL/mood/TMEMC.h
deleted file mode 100644 (file)
index d341ca8..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef TMEMC_H
-#define TMEMC_H
-
-/******************************************************************************
-*                                                                             *
-* TMEMC                                                                       *
-*                                                                             *
-* EMC Module Class                                                            *
-*                                                                             *
-* Author: Timo Alho                                                           *
-*                                                                             *
-******************************************************************************/
-
-#include "TMCal.h"
-
-class TMEMC: public TMCal {
-
- RQ_OBJECT("TMEMC")
-
- public:
- TMEMC(const TGWindow *p, UInt_t w, UInt_t h);
- ClassDef(TMEMC, 1); // EmCal Module Base Class
-
-};
-
-#endif
diff --git a/EMCAL/mood/TMPHS.cxx b/EMCAL/mood/TMPHS.cxx
deleted file mode 100644 (file)
index 042fab9..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#include "TMPHS.h"
-
-ClassImp(TMPHS)
-
-//_____________________________________________________________________________
-TMPHS::TMPHS(const TGWindow *p, UInt_t w, UInt_t h) : 
-  TMCal(p, w, h, AliCaloCalibPedestal::kPhos)
-{
-}
diff --git a/EMCAL/mood/TMPHS.h b/EMCAL/mood/TMPHS.h
deleted file mode 100644 (file)
index 27d0c55..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef TMPHS_H
-#define TMPHS_H
-
-/******************************************************************************
-*                                                                             *
-* TMPHS                                                                       *
-*                                                                             *
-* PHS Module Class                                                            *
-*                                                                             *
-* Author: Timo Alho                                                           *
-*                                                                             *
-******************************************************************************/
-
-#include "TMCal.h"
-
-
-class TMPHS: public TMCal {
-
-  RQ_OBJECT("TMPHS")
-
-  public:
-
-  TMPHS(const TGWindow *p, UInt_t w, UInt_t h);
-  ClassDef(TMPHS, 1);
-  
-};
-
-#endif