(Jens Viechula)
authormarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 4 Jul 2008 23:12:56 +0000 (23:12 +0000)
committermarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 4 Jul 2008 23:12:56 +0000 (23:12 +0000)
AliTPCCalibViewer.cxx.diff    Added functionality in EasyDraw(1D) to draw one sector (IROC+OROC)
AliTPCCalibViewerGUI.cxx.diff Added functionality to draw one sector (IROC+OROC)
AliTPCCalibViewerGUI.h.diff   Added functionality to draw one sector (IROC+OROC)
TPCMonitor.C.diff             Added includes to make it compileable
AliTPCMonitor.cxx.diff        Fixed sector flip on C-side
AliTPCCalibCE.cxx.diff        Fixed a mistake in the zero suppression treatment

TPC/AliTPCCalibViewer.cxx
TPC/AliTPCCalibViewerGUI.cxx
TPC/AliTPCCalibViewerGUI.h
TPC/AliTPCMonitor.cxx
TPC/macros/TPCMonitor.C

index cd1f962..f8b4171 100644 (file)
@@ -332,9 +332,12 @@ Int_t AliTPCCalibViewer::EasyDraw(const char* drawCommand, const char* sector, c
    //TString drawOptionsStr("profcolz ");
    Bool_t dangerousToDraw = drawStr.Contains(":") || drawStr.Contains(">>");
    if (dangerousToDraw) {
-      Warning("EasyDraw", "The draw string must not contain ':' or '>>'.");
-      return -1;
+      Warning("EasyDraw", "The draw string must not contain ':' or '>>'. Using only first variable for drawing!");
+//      return -1;
+//      drawStr.Resize(drawStr.First(">"));
+      drawStr.Resize(drawStr.First(":"));
    }
+
    TString drawOptionsStr("");
    TRandom rnd(0);
    Int_t rndNumber = rnd.Integer(10000);
@@ -361,6 +364,14 @@ Int_t AliTPCCalibViewer::EasyDraw(const char* drawCommand, const char* sector, c
       drawStr += rndNumber;
       drawStr += "(330,-250,250,330,-250,250)";
    }
+   else if  (sectorStr.Contains("S")) {
+      drawStr += Form(":rpad%s:row%s+(sector>35)*63>>prof", fAppendString.Data(), fAppendString.Data());
+      drawStr += rndNumber;
+      drawStr += "(159,0,159,140,-70,70)";
+      TString sec=sectorStr;
+      sec.Remove(0,1);
+      cutStr += "sector%36=="+sec+" ";
+   }
    else if (sectorStr.IsDigit()) {
       Int_t isec = sectorStr.Atoi();
       drawStr += Form(":rpad%s:row%s>>prof", fAppendString.Data(), fAppendString.Data());
@@ -448,6 +459,11 @@ Int_t AliTPCCalibViewer::EasyDraw1D(const char* drawCommand, const char* sector,
       cutStr += isec;
       cutStr += ") ";
    }
+   else if  (sectorStr.Contains("S")) {
+      TString sec=sectorStr;
+      sec.Remove(0,1);
+      cutStr += "sector%36=="+sec+" ";
+   }
 
    if (cuts && cuts[0] != 0) {
       if (cutStr.Length() != 0) cutStr += "&& ";
index 68387ea..4a87107 100644 (file)
@@ -112,6 +112,7 @@ AliTPCCalibViewerGUI::AliTPCCalibViewerGUI(const TGWindow *p, UInt_t w, UInt_t h
     fRadioTPC(0),
     fRadioSideA(0),
     fRadioSideC(0),
+    fRadioROC(0),
     fRadioSector(0),
     fComboAddDrawOpt(0),
     fChkAuto(0),
@@ -635,11 +636,17 @@ void AliTPCCalibViewerGUI::DrawGUI(const TGWindow *p, UInt_t w, UInt_t h) {
          fRadioSideC->Connect("Clicked()", "AliTPCCalibViewerGUI", this, "HandleButtonsCuts()");
          fRadioSideC->SetToolTipText("Use only side C.");
       
-         // sector radio button
-         fRadioSector = new TGRadioButton(fContCuts, "ROC", 23);
+         // roc radio button
+         fRadioROC = new TGRadioButton(fContCuts, "ROC", 23);
+         fContCuts->AddFrame(fRadioROC, new TGLayoutHints(kLHintsExpandX, 0, 0, 0, 0));
+         fRadioROC->Connect("Clicked()", "AliTPCCalibViewerGUI", this, "HandleButtonsCuts()");
+         fRadioROC->SetToolTipText("Use only one ROC (readout chamber).");
+
+        // sector radio button
+         fRadioSector = new TGRadioButton(fContCuts, "Sector", 24);
          fContCuts->AddFrame(fRadioSector, new TGLayoutHints(kLHintsExpandX, 0, 0, 0, 0));
          fRadioSector->Connect("Clicked()", "AliTPCCalibViewerGUI", this, "HandleButtonsCuts()");
-         fRadioSector->SetToolTipText("Use only one ROC (readout chamber).");
+         fRadioSector->SetToolTipText("Use only one Sector (0-17 A-Side, 18-35 C-Side).");
       
          // sector options container
          fContSector = new TGCompositeFrame(fContCuts, 200, 200, kHorizontalFrame | kFitWidth | kFitHeight);
@@ -1095,6 +1102,7 @@ AliTPCCalibViewerGUI::AliTPCCalibViewerGUI(const AliTPCCalibViewerGUI &c)
     fRadioTPC(0),
     fRadioSideA(0),
     fRadioSideC(0),
+    fRadioROC(0),
     fRadioSector(0),
     fComboAddDrawOpt(0),
     fChkAuto(0),
@@ -1435,22 +1443,32 @@ void AliTPCCalibViewerGUI::HandleButtonsCuts(Int_t id) {
       case 20:             // fRadioTPC
          fRadioSideA->SetState(kButtonUp);
          fRadioSideC->SetState(kButtonUp);
+         fRadioROC->SetState(kButtonUp);
          fRadioSector->SetState(kButtonUp);
          break;
       case 21:             // fRadioSideA
          fRadioTPC->SetState(kButtonUp);
          fRadioSideC->SetState(kButtonUp);
+         fRadioROC->SetState(kButtonUp);
          fRadioSector->SetState(kButtonUp);
          break;
       case 22:             // fRadioSideC
          fRadioTPC->SetState(kButtonUp);
          fRadioSideA->SetState(kButtonUp);
+         fRadioROC->SetState(kButtonUp);
          fRadioSector->SetState(kButtonUp);
          break;
-      case 23:             // fRadioSector
+      case 23:             // fRadioROC
          fRadioTPC->SetState(kButtonUp);
          fRadioSideA->SetState(kButtonUp);
          fRadioSideC->SetState(kButtonUp);
+         fRadioSector->SetState(kButtonUp);
+         break;
+      case 24:             // fRadioSector
+         fRadioTPC->SetState(kButtonUp);
+         fRadioSideA->SetState(kButtonUp);
+         fRadioSideC->SetState(kButtonUp);
+         fRadioROC->SetState(kButtonUp);
          break;
       case 31:            // fComboAddCuts
          fChkAddCuts->SetState(kButtonDown);
@@ -1535,11 +1553,16 @@ TString* AliTPCCalibViewerGUI::GetDrawString() {
             cutStr += "(sector/18)%2==0"; // side A
          if (fRadioSideC->GetState() == kButtonDown)
             cutStr+= "(sector/18)%2==1"; // side C
-         if (fRadioSector->GetState() == kButtonDown) {
+         if (fRadioROC->GetState() == kButtonDown) {
             Int_t sector = (Int_t)(fNmbSector->GetNumber());
             cutStr += "sector==";
             cutStr += sector; 
          }
+         if (fRadioSector->GetState() == kButtonDown) {
+            Int_t sector = ((Int_t)(fNmbSector->GetNumber()))%36;
+            cutStr += "sector%36==";
+            cutStr += sector; 
+         }
          if (fChkAddCuts->GetState() == kButtonDown && strcmp(fComboAddCuts->GetTextEntry()->GetText(), "") != 0){
             if (fRadioTPC->GetState() != kButtonDown) cutStr += " && ";
             cutStr += fComboAddCuts->GetTextEntry()->GetText();  
@@ -1589,10 +1612,15 @@ TString* AliTPCCalibViewerGUI::GetSectorString() {
       sectorStr += "A"; //cuts += "(sector/18)%2==0";
    if (fRadioSideC->GetState() == kButtonDown)
       sectorStr+= "C"; //cuts += "(sector/18)%2==1";
-   if (fRadioSector->GetState() == kButtonDown) {
+   if (fRadioROC->GetState() == kButtonDown) {
       Int_t sector = (Int_t)(fNmbSector->GetNumber());
       sectorStr += sector; //cuts += "sector==";
    }
+   if (fRadioSector->GetState() == kButtonDown) {
+      Int_t sector = ((Int_t)(fNmbSector->GetNumber()))%36;
+      sectorStr += "S";
+      sectorStr += sector; //cuts += "sector%36==";
+   }
    return new TString(sectorStr.Data());
 }   
   
@@ -1706,11 +1734,16 @@ void AliTPCCalibViewerGUI::DoFit() {
       cutStr += "(sector/18)%2==0"; // side A
    if (fRadioSideC->GetState() == kButtonDown)
       cutStr+= "(sector/18)%2==1"; // side C
-   if (fRadioSector->GetState() == kButtonDown) {
+   if (fRadioROC->GetState() == kButtonDown) {
       Int_t sector = (Int_t)(fNmbSector->GetNumber());
       cutStr += "sector==";
       cutStr += sector; 
    }
+   if (fRadioSector->GetState() == kButtonDown) {
+      Int_t sector = (Int_t)(fNmbSector->GetNumber())%36;
+      cutStr += "sector%36==";
+      cutStr += sector; 
+   }
    if (fChkAddCuts->GetState() == kButtonDown && strcmp(fComboAddCuts->GetTextEntry()->GetText(), "") != 0){
       if (fRadioTPC->GetState() != kButtonDown) cutStr += " && ";
       cutStr += fComboAddCuts->GetTextEntry()->GetText();  
@@ -1894,15 +1927,22 @@ void AliTPCCalibViewerGUI::ChangeSector(){
    // to change the sector label
    // 
    Int_t sector = (Int_t)(fNmbSector->GetNumber());
-   char* secLabel = "";
-   if (sector >= 0 && sector <= 17) // IROC, Side A
-      secLabel = "IROC, A";
-   if (sector >= 18 && sector <= 35) // IROC, Side C
-      secLabel = "IROC, C";
-   if (sector >= 36 && sector <= 53) // OROC, Side A
-      secLabel = "OROC, A";
-   if (sector >= 54 && sector <= 71) // OROC, Side C
-      secLabel = "OROC, C";
+   TString secLabel = "";
+   if ( sector < 36 )
+       secLabel = "IROC";
+   else
+       secLabel = "OROC";
+
+   if (fRadioSector->GetState()==kButtonDown)
+       secLabel="Sector";
+
+   if ( sector%36<18 ) //A-Side
+       secLabel += ", A";
+   else
+       secLabel += ", C";
+
+   secLabel += Form("%02d",sector%18);
+
    fLblSector->SetText(secLabel);
    DoNewSelection();
 }
@@ -1949,7 +1989,7 @@ void AliTPCCalibViewerGUI::MouseMove(Int_t event, Int_t x, Int_t y, TObject *sel
    if (!selectedObject->InheritsFrom("TH2")) return;
    // zoom to sector works ONLY in 2D mode, if one side is specified
    if (fRadio2D->GetState() == kButtonUp) return;
-   if (fRadioSector->GetState() == kButtonDown) { // return to full side view
+   if (fRadioROC->GetState() == kButtonDown) { // return to full side view
       // return to full side view
       Int_t sector = (Int_t)(fNmbSector->GetNumber());
       if ( (sector >= 0 && sector <= 17) || (sector >= 36 &&  sector <= 53) ) {
@@ -2001,8 +2041,8 @@ void AliTPCCalibViewerGUI::MouseMove(Int_t event, Int_t x, Int_t y, TObject *sel
    }
    // printf("r: %f, phi: %f, phiGrad: %f, gy/gx: %f, quadrant: %i, sector: %i \n", r, phi, phiGrad, gy/gx, quadrant, sector);
    fNmbSector->SetNumber(sector);
-   fRadioSector->Clicked();
-   fRadioSector->SetState(kButtonDown);
+   fRadioROC->Clicked();
+   fRadioROC->SetState(kButtonDown);
    ChangeSector();   
 }
 
index 56bb454..7b51b0a 100644 (file)
@@ -134,6 +134,7 @@ protected:
    TGRadioButton       *fRadioTPC;           // TPC radio button
    TGRadioButton       *fRadioSideA;         // side A radio button
    TGRadioButton       *fRadioSideC;         // side C radio button
+   TGRadioButton       *fRadioROC;           // ROC radio button
    TGRadioButton       *fRadioSector;        // sector radio button
    TGComboBox          *fComboAddDrawOpt;    // additional draw options combo box
    TGCheckButton       *fChkAuto;            // automatic redraw checkbox
index 2521774..f8a0119 100755 (executable)
@@ -927,11 +927,11 @@ void AliTPCMonitor::FillHistsDecode(AliTPCMonitorAltro* altro ,Int_t rcupatch, I
       
       if(fPadMapHw[nextHwAddress]!=-1 ) 
       {
-          return;
          //Int_t hw_before1 = fPad[fChannelIter-2][0];
          //Int_t hw_before2 = fPad[fChannelIter-3][0];
          
          if(fVerb){ cout  <<"\n //// Ambiguous hwaddress "   << nextHwAddress << "  write 10bit files and check file for eqid : "  << fEqId << " /////// " << endl;}
+          return;
          
          if( TMath::Abs(fPadMapRCU[nextHwAddress][4] - fChannelIter)==1) 
            {
@@ -1253,6 +1253,8 @@ void AliTPCMonitor::FillGlobal(Int_t sector)
          pad    = fMapHand->GetPad(   hw);
          row    = fMapHand->GetPadRow(hw);
          padmax = fMapHand->GetNumofPads(row);
+         if (sector%36>17) fMirror=-1;
+          else fMirror=1;
          GetXY(xval ,yval , padmax,row ,pad);
          xdr    =  xval*m11 +yval*m12;
          ydr    =  xval*m21 +yval*m22;
index d4d5e08..c0e0176 100755 (executable)
@@ -6,6 +6,27 @@
 //
 ////////////////////////////////////////////////////////////////////////////////
 
+#include "iostream"
+
+#include "TGFrame.h"
+#include "TGButton.h"
+#include "TGTextEntry.h"
+#include "TGLabel.h"
+#include "TGFileDialog.h"
+#include "TGClient.h"
+#include "TGApplication.h"
+#include "TSystem.h"
+#include "TStyle.h"
+#include "TDirectory.h"
+#include "TFileMerger.h"
+
+#include "AliTPCMonitor.h"
+#include "AliTPCMonitorMappingHandler.h"
+//#include "AliTPCMonitorEditor.h"
+#include "AliTPCMonitorDialog.h"
+
+using namespace std;
+
 
 static    AliTPCMonitor*               fMon               = 0;
 static    AliTPCMonitorMappingHandler* fMapHand           = 0;
@@ -25,22 +46,23 @@ void      WriteChannel();
 void      WriteHistos();  
 void      SetConfig();
 void      DisableFit();
-void      ProcessSector(char* fdata,char* ffil, Int_t side, Int_t sector);
-Int_t     DrawFit();
-Int_t     DrawRMS();
+//void      ProcessSector(char* fdata,char* ffil, Int_t side, Int_t sector);
+void      ProcessSector(Int_t sid, Int_t sector);
+//Int_t     DrawFit();
+Int_t     DrawRMSMap();
 void      ShowSelected();
-void      SetSize() ;
+//void      SetSize() ;
 void      ResizeCanv();
 void      ReadMe();
 void      OpenDir();
 void      SetWrite10Bit();
 void      SetCheckVerb();
 void      SetProcOne();
-void      SetPedstalRun(Int_t val);
+void      SetPedestalRun(Int_t val);
 void      InitDialog(Int_t id);
-void      Resize(Int_t update,Int_t doit , Int_t side);
+//void      Resize(Int_t update,Int_t doit , Int_t side);
 void      MonitorGui(AliTPCMonitor* fMon);
+void      SetStyle();
  
 
 //_________________________________________________________________________
@@ -73,7 +95,7 @@ void TPCMonitor()
 }
 
 //_________________________________________________________________________
-void MonitorGui(fMon)
+void MonitorGui(AliTPCMonitor *fMon)
 {
   // Display the main Window 
 
@@ -143,24 +165,24 @@ void MonitorGui(fMon)
   fFrameMain->AddFrame(fFrameSelFil    , fLayout);
   fFrameMain->AddFrame(fFrameSelForm   , fLayout);
   fFrameMain->AddFrame(fFrameFFT       , fLayout);
-  Int_t step = ysize/2;
+//  Int_t step = (Int_t)(ysize/2.);
   Int_t start = 5; 
   
-  fFrameSelForm->MoveResize(     10, start+ 1.0*ysize        ,mainx-20  ,ysize);
-  fFrameSelFil->MoveResize(      10, start+ 2.0*ysize        ,mainx-20  ,ysize);
+  fFrameSelForm->MoveResize(     10, (Int_t)(start+ 1.0*ysize)        ,(UInt_t)(mainx-20)  ,(UInt_t)ysize);
+  fFrameSelFil->MoveResize(      10, (Int_t)(start+ 2.0*ysize)        ,(UInt_t)(mainx-20)  ,(UInt_t)ysize);
  
-  fFrameSetConf->MoveResize(     10, start+ 4.5*ysize        ,mainx-20  ,ysize);
+  fFrameSetConf->MoveResize(     10, (Int_t)(start+ 4.5*ysize)        ,(UInt_t)(mainx-20)  ,(UInt_t)ysize);
  
-  fFrameCalcBSL->MoveResize(     10, start+   6*ysize        ,mainx-20  ,ysize);
-  fFrameCheckPed->MoveResize(    10, start+   7*ysize        ,mainx-20  ,ysize);
-  fFrameChDisFit->MoveResize(    10, start+   8*ysize        ,mainx-20  ,ysize);
-  fFrameCh10bit->MoveResize(     10, start+   9*ysize        ,mainx-20  ,ysize);
-  fFrameCheckVerb->MoveResize(   10, start+  10*ysize        ,mainx-20  ,ysize);
+  fFrameCalcBSL->MoveResize(     10, (Int_t)(start+   6*ysize)        ,(UInt_t)(mainx-20)  ,(UInt_t)ysize);
+  fFrameCheckPed->MoveResize(    10, (Int_t)(start+   7*ysize)        ,(UInt_t)(mainx-20)  ,(UInt_t)ysize);
+  fFrameChDisFit->MoveResize(    10, (Int_t)(start+   8*ysize)        ,(UInt_t)(mainx-20)  ,(UInt_t)ysize);
+  fFrameCh10bit->MoveResize(     10, (Int_t)(start+   9*ysize)        ,(UInt_t)(mainx-20)  ,(UInt_t)ysize);
+  fFrameCheckVerb->MoveResize(   10, (Int_t)(start+  10*ysize)        ,(UInt_t)(mainx-20)  ,(UInt_t)ysize);
   
   
   yfirst = start+ 14*ysize;
-  fFrameSideA->MoveResize(  xfirst1, yfirst-30               ,xsize     ,ysize);
-  fFrameSideB->MoveResize(  xfirst2, yfirst-30               ,xsize     ,ysize);
+  fFrameSideA->MoveResize(  (Int_t)xfirst1, (Int_t)yfirst-30               ,(UInt_t)xsize     ,(UInt_t)ysize);
+  fFrameSideB->MoveResize(  (Int_t)xfirst2, (Int_t)yfirst-30               ,(UInt_t)xsize     ,(UInt_t)ysize);
   
   // sector buttons 
   TObjArray     * fFrameArr   = new TObjArray();
@@ -174,8 +196,8 @@ void MonitorGui(fMon)
       else    sprintf(nameb,"Sector %i",i-18);
       fTextButton = new TGTextButton(fFrameMain,nameb);
       fFrameMain->AddFrame(fTextButton, new TGLayoutHints(kLHintsLeft | kLHintsTop,5,5,5,5));
-      if(i<18)fTextButton->MoveResize(xfirst1,yfirst     +i*ysize,xsize,ysize);
-      else    fTextButton->MoveResize(xfirst2,yfirst+(i-18)*ysize,xsize,ysize);
+      if(i<18)fTextButton->MoveResize((Int_t)xfirst1,(Int_t)(yfirst     +i*ysize),(UInt_t)xsize,(UInt_t)ysize);
+      else    fTextButton->MoveResize((Int_t)xfirst2,(Int_t)(yfirst+(i-18)*ysize),(UInt_t)xsize,(UInt_t)ysize);
       if(i<18){ side = 0; sector = i;   }
       else    { side = 1; sector = i-18;}
       char bef[50]; sprintf(bef,"ProcessSector(%i,%i)",side,sector);
@@ -188,29 +210,29 @@ void MonitorGui(fMon)
   fTextEvId = new TGTextEntry(fFrameMain, ftbuf);
   fTextEvId->SetTextColor(200);
   
-  fFramesel->MoveResize(         10         , mainy- 15.0*ysize   ,mainx-20  ,ysize); 
-  fFrameRMS->MoveResize(         10         , mainy- 14.0*ysize   ,mainx-20  ,ysize);
+  fFramesel->MoveResize(         10         , (Int_t)(mainy- 15.0*ysize)   ,(UInt_t)mainx-20  ,(UInt_t)ysize);
+  fFrameRMS->MoveResize(         10         , (Int_t)(mainy- 14.0*ysize)   ,(UInt_t)mainx-20  ,(UInt_t)ysize);
 
-  fFrameFFT->MoveResize(         10         , mainy- 12.0*ysize   ,mainx-20  ,ysize);
-  fFramewrite->MoveResize(       10         , mainy- 11.0*ysize   ,mainx-20  ,ysize);
+  fFrameFFT->MoveResize(         10         , (Int_t)(mainy- 12.0*ysize)   ,(UInt_t)mainx-20  ,(UInt_t)ysize);
+  fFramewrite->MoveResize(       10         , (Int_t)(mainy- 11.0*ysize)   ,(UInt_t)mainx-20  ,(UInt_t)ysize);
  
-  fFrameWRITE->MoveResize(       10         , mainy-  9.0*ysize   ,mainx-20  ,ysize);
-  fFrameres->MoveResize(         10         , mainy-  8.0*ysize   ,mainx-20  ,ysize); 
+  fFrameWRITE->MoveResize(       10         , (Int_t)(mainy-  9.0*ysize)   ,(UInt_t)mainx-20  ,(UInt_t)ysize);
+  fFrameres->MoveResize(         10         , (Int_t)(mainy-  8.0*ysize)   ,(UInt_t)mainx-20  ,(UInt_t)ysize);
   
 
-  fFrameCheckProcOne->MoveResize(10         , mainy-  6.5*ysize   ,mainx-20  ,ysize);
+  fFrameCheckProcOne->MoveResize(10         , (Int_t)(mainy-  6.5*ysize)   ,(UInt_t)mainx-20  ,(UInt_t)ysize);
   
-  flab->MoveResize(             10          , mainy-  5.0*ysize   ,xsize+5   ,ysize);
-  fTextEvId->MoveResize(      mainx/2 +10   , mainy-  5.0*ysize   ,xsize-10  ,ysize);
+  flab->MoveResize(             10          , (Int_t)(mainy-  5.0*ysize)   ,(UInt_t)xsize+5   ,(UInt_t)ysize);
+  fTextEvId->MoveResize(      (Int_t)(mainx/2 +10)   , (Int_t)(mainy-  5.0*ysize)   ,(UInt_t)xsize-10  ,(UInt_t)ysize);
   
-  fFrameNextEvent->MoveResize(   10         , mainy-  3.5*ysize   ,mainx-20  ,ysize);
+  fFrameNextEvent->MoveResize(   10         , (Int_t)(mainy-  3.5*ysize)   ,(UInt_t)mainx-20  ,(UInt_t)ysize);
 
-  fFrameQuit->MoveResize(        30         , mainy-  1.5*ysize   ,mainx-60  ,ysize);
+  fFrameQuit->MoveResize(        30         , (Int_t)(mainy-  1.5*ysize)   ,(UInt_t)mainx-60  ,(UInt_t)ysize);
   
   fFrameMain->MapSubwindows();
   fFrameMain->MapWindow();
   fFrameMain->SetWindowName("OM");
-  fFrameMain->MoveResize(0,0,mainx,mainy);
+  fFrameMain->MoveResize(0,0,(UInt_t)mainx,(UInt_t)mainy);
 }  
 
 //_________________________________________________________________________
@@ -299,6 +321,7 @@ Int_t DrawRMSMap()
   // Draw RMS map for IROC and OROC
   if(fMon->GetLastSector()==-1) cout << " no sector written yet " << endl;
   else fMon->DrawRMSMap();
+  return 0;
 }
 
 //_________________________________________________________________________
@@ -329,7 +352,7 @@ void OpenDir()
   if(fVerb) printf("fIniDir = %s\n", fi->fIniDir);
   
   new TGFileDialog(gClient->GetRoot(), fFrameMain, kFDOpen, fi);
-  if(!fi->fFilename)            break;
+  if(!fi->fFilename)            return;
   if(!strcmp(fi->fFilename,"")) return;
   string fname(fi->fFilename);
   Int_t    ffirst   = fname.find_first_not_of("/",0);
@@ -343,7 +366,7 @@ void OpenDir()
   if(fstart <0){ cout << " return : missing slash at beginning of file " << endl ; return ;}
   
   string fsubname =  fname.substr(fstart,fname.length()-fstart);
-  fMon->SetFile(fsubname.data());
+  fMon->SetFile((Char_t *)fsubname.data());
 
   if(fVerb) 
     {
@@ -356,7 +379,7 @@ void OpenDir()
 //_________________________________________________________________________
 void InitDialog(Int_t id)
 {
-  if(id>0&&id<4)  new AliTPCMonitorDialog(gClient->GetRoot(), fFrameMain, 400, 400,0,id,fMon);
+  if(id>0&&id<4)  new AliTPCMonitorDialog((TGWindow*)gClient->GetRoot(), fFrameMain, 400, 400,0,id,fMon);
   else cout << "Error : Invalid Id " << endl;
   return;
 }
@@ -411,10 +434,10 @@ void SetStyle()
 //_________________________________________________________________________
 void ReadMe()
 {
-  AliTPCMonitorEditor *ed = new AliTPCMonitorEditor(fFrameMain, 700, 400);
-  char nameread[256]; sprintf(nameread,"%s/TPC/AliTPCMonitorReadMe.txt",gSystem->Getenv("ALICE_ROOT"));
-  ed->LoadFile(nameread);
-  ed->Popup();
+//  AliTPCMonitorEditor *ed = new AliTPCMonitorEditor(fFrameMain, 700, 400);
+//  char nameread[256]; sprintf(nameread,"%s/TPC/AliTPCMonitorReadMe.txt",gSystem->Getenv("ALICE_ROOT"));
+//  ed->LoadFile(nameread);
+//  ed->Popup();
 }
 
 //_________________________________________________________________________