]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCMonitor.cxx
Updates to accomodate change in DP name syntax
[u/mrichter/AliRoot.git] / TPC / AliTPCMonitor.cxx
index 49c6532c949c11d6054d79dcbdd55ad2cf86ccb6..dcaea80f37125ceab9634ea5de8b4d0e5399478a 100755 (executable)
 
 /*
 $Log$
+Revision 1.3  2007/10/12 13:36:27  cvetan
+Coding convention fixes from Stefan
+
+Revision 1.2  2007/09/18 09:44:45  cvetan
+Sorting out some issues concerning the compilation with and without DATE support
+
 Revision 1.1  2007/09/17 10:23:31  cvetan
 New TPC monitoring package from Stefan Kniege. The monitoring package can be started by running TPCMonitor.C macro located in macros folder.
 
 */   
 
-#include "AliTPCMonitor.h"
-#ifdef ALI_DATE
+////////////////////////////////////////////////////////////////////////
+////
+//// AliTPCMonitor class
+//// 
+//// Main class for TPC Monitor
+//// Monitor can handle rootified data, files and online streams in DATE format.
+//// The monitor GUI is started by the macro TPCMonitor.C
+//// 
+//// In the The data are read in in two read cycles. 
+//// If no sector is specified (sectorid==-1) all sectors are read and only the max value 
+//// for each channel is stored in a global histogram for Side A and C.
+//// In this way the whole TPC can be read in at once.
+////
+//// If the sector is specified  only one sector is read in and additional quantities
+//// e.g baseline and baseline rms are calculated and stored. 
+//// 
+//// Author: Stefan Kniege, IKF, Frankfurt
+////       
+////
+/////////////////////////////////////////////////////////////////////////
+
+
+#include "AliLog.h"
+#include "AliTPCMonitor.h"   
+#include "AliTPCMonitorMappingHandler.h"
+#include "AliTPCMonitorDateFile.h"
+#include "AliTPCMonitorDateFormat.h"
+#include "AliTPCMonitorAltro.h"
+#include "AliTPCMonitorFFT.h"
+#include "AliRawReaderRoot.h"
+#include "AliRawReader.h"
+#include "TH2F.h" 
+#include "TF1.h"
+#include "TMath.h"
+#include "TCanvas.h"
+#include "TH3S.h"
+#include "TLegend.h"
+#include "TROOT.h" 
+#include "TDirectory.h"
+#include "TSystem.h"
+#include "TPaveText.h"   
+#include "TFile.h"
+#include <Riostream.h>
 #include "AliTPCMonitorDateMonitor.h"
-#endif
+
 ClassImp(AliTPCMonitor)
 
 //____________________________________________________________________________
-AliTPCMonitor::AliTPCMonitor(char* name, char* title) : AliTPCMonitorConfig(name,title)
+AliTPCMonitor::AliTPCMonitor(char* name, char* title) : 
+  AliTPCMonitorConfig(name,title),
+  fPad(new Int_t*[GetMaxHwAddr()]),  
+  fPadMapHw(new Float_t[GetMaxHwAddr()]),
+  fPadMapRCU(new Int_t*[GetMaxHwAddr()]),    
+  fHistIROC(0),
+  fHistOROC(0),
+  fHistIROCIndex(0),
+  fHistOROCIndex(0),
+  fHistIROCTime(0), 
+  fHistOROCTime(0),
+  fHistIROCClone(0),
+  fHistOROCClone(0),
+  fHistIROCRMS(0),
+  fHistOROCRMS(0),
+  fHistIROCBASE(0),
+  fHistOROCBASE(0),
+  fHistIROCSUM(0),
+  fHistOROCSUM(0),
+  fHistChannelTime(0),
+  fHistAddrMapIndex(0),
+  fHistAddrMaxAdc(0),
+  fHistAddrBaseMean(0),
+  fHistAddrMaxAdcX(0),
+  fHistAddrAdcSum(0),
+  fHistAddrBaseRms(0),
+  fHistDistrSumIROC(0),
+  fHistDistrMaxIROC(0),
+  fHistDistrSumOROC(0),
+  fHistDistrMaxOROC(0),
+  fHistDistrBase2dIROC(0),
+  fHistDistrBase2dOROC(0),
+  fHistDistrBaseRmsIROC(0),
+  fHistDistrBaseMeanIROC(0),
+  fHistDistrBaseRmsOROC(0),
+  fHistDistrBaseMeanOROC(0),
+  fHistGlobalMaxA(0),
+  fHistGlobalMaxC(0),
+  fHistList(new TObjArray()),
+
+  fkNRowsIroc(63),
+  fkNRowsOroc(96),
+
+  fkNPadsIroc(110),
+  fkNPadsOroc(140), 
+  fkNPadMinIroc(-55),
+  fkNPadMinOroc(-70),
+  fkNPadMaxIroc(55),
+  fkNPadMaxOroc(70),
+  fVerb(0),
+  fLastEv(0),
+  fEventNumber(0),
+  fEventNumberOld(0),
+  fDisableFit(0),
+  fExecGlob(0),
+  fExecPlaneMax(0),
+  fExecPadIrocRms(0),
+  fExecPadOrocRms(0),
+  fRunId(0),
+  fEqId(0),
+  fPadUsedRoc(-1),
+  fPadUsedHwAddr(-1),
+  fGdcId(0),
+  fLdcId(0),
+  fLdcIdOld(1),
+  fMapEqidsSec(new Int_t*[36]),
+  fMapEqidsRcu(new Int_t[1000]),
+  fMirror(1),
+  fChannelIter(0),
+  fMapHand(0),
+  fReaderROOT(0),  
+  fReaderDATE(0),
+  fReaderDATEMon(0) 
 {
-  // Constructor 
+  // Constructor  
   
-  fPad       = new Int_t*[GetMaxHwAddr()];     
   for(Int_t i = 0; i<GetMaxHwAddr(); i++) { fPad[i]       = new Int_t[GetTimeBins()];}
-  
-  fPadMapRCU = new Int_t*[GetMaxHwAddr()];     
   for(Int_t i = 0; i<GetMaxHwAddr(); i++) { fPadMapRCU[i] = new Int_t[6];}
-  
-  fPadMapHw  = new Float_t[GetMaxHwAddr()];
-  
-
-  fReaderROOT                  =   0;  
-  fReaderDATE                  =   0; 
-  #ifdef ALI_DATE
-  fReaderDATEMon               =   0; 
-  #endif
-  // row and pad settings 
-  kNRowsIroc                   =  63;
-  kNRowsOroc                   =  96;
-  
-  kNPadsIroc                   = 110;
-  kNPadsOroc                   = 140; 
-  kNPadMinIroc                 = -55;
-  kNPadMaxIroc                 =  55;
-  
-  kNPadMinOroc                 = -70;
-  kNPadMaxOroc                 =  70;
-  
-    
-    
-  // histograms to be used      ////////////////////////////////////////////////////////////////
-  fHistIROC                    =0;
-  fHistOROC                    =0;
-  fHistIROCIndex               =0;
-  fHistOROCIndex               =0;
-  fHistIROCTime                =0; 
-  fHistOROCTime                =0;
-  fHistIROCClone               =0;
-  fHistOROCClone               =0;
-    
-  fHistIROCRMS                 =0;
-  fHistOROCRMS                 =0;
-
-  fHistIROCBASE                =0;
-  fHistOROCBASE                =0;
-
-  fHistIROCSUM                 =0;
-  fHistOROCSUM                 =0;
-  
-  fHistChannelTime             =0;
-  fHistAddrMapIndex            =0;
-  fHistAddrMaxAdc              =0;
-  fHistAddrBaseMean            =0;
-  fHistAddrMaxAdcX             =0;
-  fHistAddrAdcSum              =0;
-  fHistAddrBaseRms             =0;
-
-  fHistDistrSumIROC            =0;
-  fHistDistrMaxIROC            =0;
-    
-  fHistDistrSumOROC            =0;
-  fHistDistrMaxOROC            =0;
-    
-  fHistDistrBase2dIROC         =0;
-  fHistDistrBase2dOROC         =0;
-  
-  fHistDistrBaseRmsIROC        =0;
-  fHistDistrBaseMeanIROC       =0;
-  
-  fHistDistrBaseRmsOROC        =0;
-  fHistDistrBaseMeanOROC       =0;
-
-  fHistGlobalMaxA              =0;
-  fHistGlobalMaxC              =0;
-
-
-  // some error flags //////////////////////////////////////////////////////////////////////////////
-  fVerb                        =0;
-  fMapHand                     =0;
-
-
-  fLastEv                      =0;
-  fEventNumber                 =0;
-  fEventNumberOld              =0;
-  
-  fDisableFit                  =0;
-        
-  fExecGlob                    =0;
-  fExecPlaneMax                =0;
-  fExecPadIrocRms              =0;
-  fExecPadOrocRms              =0;
-    
-  fRunId                       =0;
-  fEqId                        =0;
-  
-  fPadUsedRoc                  =-1;
-  fPadUsedHwAddr               =-1;
-    
-  fMirror                      = 1;
-  
-  fChannelIter                 = 0;
-
-  
-  fMapEqidsRcu   = new Int_t[1000];
-  fMapEqidsSec   = new Int_t*[36];
   for(Int_t i = 0; i<36; i++) { fMapEqidsSec[i]       = new Int_t[6];}
-  
-  
+    
   if (gDirectory) 
     {
       if (!gDirectory->GetList()) 
        {
          Warning("Build","Current directory is not a valid directory");
-         return;
+         return; 
        }
       AliTPCMonitor *hold = (AliTPCMonitor*)gDirectory->GetList()->FindObject(GetName());
       if(hold) 
@@ -153,18 +169,273 @@ AliTPCMonitor::AliTPCMonitor(char* name, char* title) : AliTPCMonitorConfig(name
          gDirectory->GetList()->Remove(hold);
        }
       gDirectory->Append(this);
-     }
-  
-  fHistList = new TObjArray();
+    }
+  CreateHistos();
+  SetEqIds();
 
-  fGdcId    =  0;
-  fLdcId    =  0;
-  fLdcIdOld = -1;
+}
 
-  CreateHistos();
+//____________________________________________________________________________
+AliTPCMonitor::AliTPCMonitor(const AliTPCMonitor &monitor):
+  AliTPCMonitorConfig(monitor.GetName(),monitor.GetTitle()),
+  fPad(new Int_t*[GetMaxHwAddr()]),  
+  fPadMapHw(new Float_t[GetMaxHwAddr()]),
+  fPadMapRCU(new Int_t*[GetMaxHwAddr()]),    
+  fHistIROC(0),
+  fHistOROC(0),
+  fHistIROCIndex(0),
+  fHistOROCIndex(0),
+  fHistIROCTime(0), 
+  fHistOROCTime(0),
+  fHistIROCClone(0),
+  fHistOROCClone(0),
+  fHistIROCRMS(0),
+  fHistOROCRMS(0),
+  fHistIROCBASE(0),
+  fHistOROCBASE(0),
+  fHistIROCSUM(0),
+  fHistOROCSUM(0),
+  fHistChannelTime(0),
+  fHistAddrMapIndex(0),
+  fHistAddrMaxAdc(0),
+  fHistAddrBaseMean(0),
+  fHistAddrMaxAdcX(0),
+  fHistAddrAdcSum(0),
+  fHistAddrBaseRms(0),
+  fHistDistrSumIROC(0),
+  fHistDistrMaxIROC(0),
+  fHistDistrSumOROC(0),
+  fHistDistrMaxOROC(0),
+  fHistDistrBase2dIROC(0),
+  fHistDistrBase2dOROC(0),
+  fHistDistrBaseRmsIROC(0),
+  fHistDistrBaseMeanIROC(0),
+  fHistDistrBaseRmsOROC(0),
+  fHistDistrBaseMeanOROC(0),
+  fHistGlobalMaxA(0),
+  fHistGlobalMaxC(0),
+  fHistList(new TObjArray()),
+  fkNRowsIroc(monitor.fkNRowsIroc),
+  fkNRowsOroc(monitor.fkNRowsOroc),
+  fkNPadsIroc(monitor.fkNPadsIroc),
+  fkNPadsOroc(monitor.fkNPadsOroc),
+  fkNPadMinIroc(monitor.fkNPadMinIroc),
+  fkNPadMinOroc(monitor.fkNPadMinOroc),
+  fkNPadMaxIroc(monitor.fkNPadMaxIroc),
+  fkNPadMaxOroc(monitor.fkNPadMaxOroc),
+  fVerb(monitor.fVerb),
+  fLastEv(monitor.fLastEv),
+  fEventNumber(monitor.fEventNumber),
+  fEventNumberOld(monitor.fEventNumberOld),
+  fDisableFit(monitor.fDisableFit),
+  fExecGlob(monitor.fExecGlob),
+  fExecPlaneMax(monitor.fExecPlaneMax),
+  fExecPadIrocRms(monitor.fExecPadIrocRms),
+  fExecPadOrocRms(monitor.fExecPadOrocRms),
+  fRunId(monitor.fRunId),
+  fEqId(monitor.fEqId),
+  fPadUsedRoc(monitor.fPadUsedRoc),
+  fPadUsedHwAddr(monitor.fPadUsedHwAddr),
+  fGdcId(monitor.fGdcId),
+  fLdcId(monitor.fLdcId),
+  fLdcIdOld(monitor.fLdcIdOld),
+  fMapEqidsSec(new Int_t*[36]),
+  fMapEqidsRcu(new Int_t[1000]),
+  fMirror(monitor.fMirror),
+  fChannelIter(monitor.fChannelIter),
+  fMapHand(monitor.fMapHand),
+  fReaderROOT(monitor.fReaderROOT),
+  fReaderDATE(monitor.fReaderDATE),
+  fReaderDATEMon(monitor.fReaderDATEMon) 
+{
+  // copy constructor
+  
+  fHistIROC=(TH2F*)monitor.fHistIROC->Clone(); fHistList->Add(fHistIROC);
+  fHistOROC=(TH2F*)monitor.fHistOROC->Clone(); fHistList->Add(fHistOROC);
+  fHistIROCIndex=(TH2S*)monitor.fHistIROCIndex->Clone(); fHistList->Add(fHistIROCIndex);
+  fHistOROCIndex=(TH2S*)monitor.fHistOROCIndex->Clone(); fHistList->Add(fHistOROCIndex);
+  fHistIROCTime=(TH2F*)monitor.fHistIROCTime->Clone(); fHistList->Add(fHistIROCTime);
+  fHistOROCTime=(TH2F*)monitor.fHistOROCTime->Clone(); fHistList->Add(fHistOROCTime);
+  fHistIROCClone=(TH2F*)monitor.fHistIROCClone->Clone(); fHistList->Add(fHistIROCClone);
+  fHistOROCClone=(TH2F*)monitor.fHistOROCClone->Clone(); fHistList->Add(fHistOROCClone);
+  fHistIROCRMS=(TH2F*)monitor.fHistIROCRMS->Clone(); fHistList->Add(fHistIROCRMS);
+  fHistOROCRMS=(TH2F*)monitor.fHistOROCRMS->Clone(); fHistList->Add(fHistOROCRMS);
+  fHistIROCBASE=(TH2F*)monitor.fHistIROCBASE->Clone(); fHistList->Add(fHistIROCBASE);
+  fHistOROCBASE=(TH2F*)monitor.fHistOROCBASE->Clone(); fHistList->Add(fHistOROCBASE);
+  fHistIROCSUM=(TH2F*)monitor.fHistIROCSUM->Clone(); fHistList->Add(fHistIROCSUM);
+  fHistOROCSUM=(TH2F*)monitor.fHistOROCSUM->Clone(); fHistList->Add(fHistOROCSUM);
+  
+  fHistChannelTime=(TH2F*)monitor.fHistChannelTime->Clone(); fHistList->Add(fHistChannelTime);
+  
+  fHistAddrMapIndex=(TH1F*)monitor.fHistAddrMapIndex->Clone(); fHistList->Add(fHistAddrMapIndex);
+  fHistAddrMaxAdc=(TH1F*)monitor.fHistAddrMaxAdc->Clone(); fHistList->Add(fHistAddrMaxAdc);
+  fHistAddrBaseMean=(TH1F*)monitor.fHistAddrBaseMean->Clone(); fHistList->Add(fHistAddrBaseMean);
+  fHistAddrMaxAdcX=(TH1F*)monitor.fHistAddrMaxAdcX->Clone(); fHistList->Add(fHistAddrMaxAdcX);
+  fHistAddrAdcSum=(TH1F*)monitor.fHistAddrAdcSum->Clone(); fHistList->Add(fHistAddrAdcSum);
+  fHistAddrBaseRms=(TH1F*)monitor.fHistAddrBaseRms->Clone(); fHistList->Add(fHistAddrBaseRms);
+
+  
+  fHistDistrSumIROC=(TH1F*)monitor.fHistDistrSumIROC->Clone(); fHistList->Add(fHistDistrSumIROC);
+  fHistDistrMaxIROC=(TH1F*)monitor.fHistDistrMaxIROC->Clone(); fHistList->Add(fHistDistrMaxIROC);
+  fHistDistrSumOROC=(TH1F*)monitor.fHistDistrSumOROC->Clone(); fHistList->Add(fHistDistrSumOROC);
+  fHistDistrMaxOROC=(TH1F*)monitor.fHistDistrMaxOROC->Clone(); fHistList->Add(fHistDistrMaxOROC);
+
+  fHistDistrBase2dIROC=(TH2F*)monitor.fHistDistrBase2dIROC->Clone(); fHistList->Add(fHistDistrBase2dIROC);
+  fHistDistrBase2dOROC=(TH2F*)monitor.fHistDistrBase2dOROC->Clone(); fHistList->Add(fHistDistrBase2dOROC);
+  fHistDistrBaseRmsIROC=(TH1D*)monitor.fHistDistrBaseRmsIROC->Clone(); fHistList->Add(fHistDistrBaseRmsIROC);
+  fHistDistrBaseMeanIROC=(TH1D*)monitor.fHistDistrBaseMeanIROC->Clone(); fHistList->Add(fHistDistrBaseMeanIROC);
+  fHistDistrBaseRmsOROC=(TH1D*)monitor.fHistDistrBaseRmsOROC->Clone(); fHistList->Add(fHistDistrBaseRmsOROC);
+  fHistDistrBaseMeanOROC=(TH1D*)monitor.fHistDistrBaseMeanOROC->Clone(); fHistList->Add(fHistDistrBaseMeanOROC);
+  
+  fHistGlobalMaxA=(TH2S*)monitor.fHistGlobalMaxA->Clone(); fHistList->Add(fHistGlobalMaxA);
+  fHistGlobalMaxC=(TH2S*)monitor.fHistGlobalMaxC->Clone(); fHistList->Add(fHistGlobalMaxC);
+  
+  // fPad       = new Int_t*[monitor.GetMaxHwAddr()];     
+  for(Int_t i = 0; i<GetMaxHwAddr(); i++) { fPad[i]       = new Int_t[monitor.GetTimeBins()];}
+  
+  //fPadMapRCU = new Int_t*[monitor.GetMaxHwAddr()];     
+  for(Int_t i = 0; i<monitor.GetMaxHwAddr(); i++) { fPadMapRCU[i] = new Int_t[6];}
+  
+  //fPadMapHw  = new Float_t[monitor.GetMaxHwAddr()];
+  
+  //fMapEqidsRcu   = new Int_t[1000];
+  //fMapEqidsSec   = new Int_t*[36];
+  for(Int_t i = 0; i<36; i++) { fMapEqidsSec[i]       = new Int_t[6];}
   SetEqIds();
+  
+  if (gDirectory) 
+    {
+      if (!gDirectory->GetList()) 
+       {
+         Warning("Build","Current directory is not a valid directory");
+         
+       }
+      else
+       {
+         AliTPCMonitor *hold = (AliTPCMonitor*)gDirectory->GetList()->FindObject(monitor.GetName());
+         if(hold) 
+           {
+             Warning("Build","Replacing existing histogram: %s (Potential memory leak).",monitor.GetName());
+             gDirectory->GetList()->Remove(hold);
+           }
+         gDirectory->Append(this);
+       }
+     }
+}
+
+
+//____________________________________________________________________________
+
+AliTPCMonitor &AliTPCMonitor:: operator= (const AliTPCMonitor& monitor)
+{
+  // assigment operator
+  if(this!=&monitor)
+    {
+      ((AliTPCMonitorConfig *)this)->operator=(monitor);
+      fkNRowsIroc=monitor.fkNRowsIroc;
+      fkNRowsOroc=monitor.fkNRowsOroc;
+      fkNPadsIroc=monitor.fkNPadsIroc;
+      fkNPadsOroc=monitor.fkNPadsOroc;
+      fkNPadMinIroc=monitor.fkNPadMinIroc;
+      fkNPadMinOroc=monitor.fkNPadMinOroc;
+      fkNPadMaxIroc=monitor.fkNPadMaxIroc;
+      fkNPadMaxOroc=monitor.fkNPadMaxOroc;
+      fVerb=monitor.fVerb;
+      fLastEv=monitor.fLastEv;
+      fEventNumber=monitor.fEventNumber;
+      fEventNumberOld=monitor.fEventNumberOld;
+      fDisableFit=monitor.fDisableFit;
+      fExecGlob=monitor.fExecGlob;
+      fExecPlaneMax=monitor.fExecPlaneMax;
+      fExecPadIrocRms=monitor.fExecPadIrocRms;
+      fExecPadOrocRms=monitor.fExecPadOrocRms;
+      fRunId=monitor.fRunId;
+      fEqId=monitor.fEqId;
+      fPadUsedRoc=monitor.fPadUsedRoc;
+      fPadUsedHwAddr=monitor.fPadUsedHwAddr;
+      fGdcId=monitor.fGdcId;
+      fLdcId=monitor.fLdcId;
+      fLdcIdOld=monitor.fLdcIdOld;
+      fMapHand=monitor.fMapHand;
+      fReaderROOT=monitor.fReaderROOT;
+      fReaderDATE=monitor.fReaderDATE;
+         
+      
+      fHistList = new TObjArray();        
+      fHistIROC=(TH2F*)monitor.fHistIROC->Clone(); fHistList->Add(fHistIROC);
+      fHistOROC=(TH2F*)monitor.fHistOROC->Clone(); fHistList->Add(fHistOROC);
+      fHistIROCIndex=(TH2S*)monitor.fHistIROCIndex->Clone(); fHistList->Add(fHistIROCIndex);
+      fHistOROCIndex=(TH2S*)monitor.fHistOROCIndex->Clone(); fHistList->Add(fHistOROCIndex);
+      fHistIROCTime=(TH2F*)monitor.fHistIROCTime->Clone(); fHistList->Add(fHistIROCTime);
+      fHistOROCTime=(TH2F*)monitor.fHistOROCTime->Clone(); fHistList->Add(fHistOROCTime);
+      fHistIROCClone=(TH2F*)monitor.fHistIROCClone->Clone(); fHistList->Add(fHistIROCClone);
+      fHistOROCClone=(TH2F*)monitor.fHistOROCClone->Clone(); fHistList->Add(fHistOROCClone);
+      fHistIROCRMS=(TH2F*)monitor.fHistIROCRMS->Clone(); fHistList->Add(fHistIROCRMS);
+      fHistOROCRMS=(TH2F*)monitor.fHistOROCRMS->Clone(); fHistList->Add(fHistOROCRMS);
+      fHistIROCBASE=(TH2F*)monitor.fHistIROCBASE->Clone(); fHistList->Add(fHistIROCBASE);
+      fHistOROCBASE=(TH2F*)monitor.fHistOROCBASE->Clone(); fHistList->Add(fHistOROCBASE);
+      fHistIROCSUM=(TH2F*)monitor.fHistIROCSUM->Clone(); fHistList->Add(fHistIROCSUM);
+      fHistOROCSUM=(TH2F*)monitor.fHistOROCSUM->Clone(); fHistList->Add(fHistOROCSUM);
+      
+      fHistChannelTime=(TH2F*)monitor.fHistChannelTime->Clone(); fHistList->Add(fHistChannelTime);
+      
+      fHistAddrMapIndex=(TH1F*)monitor.fHistAddrMapIndex->Clone(); fHistList->Add(fHistAddrMapIndex);
+      fHistAddrMaxAdc=(TH1F*)monitor.fHistAddrMaxAdc->Clone(); fHistList->Add(fHistAddrMaxAdc);
+      fHistAddrBaseMean=(TH1F*)monitor.fHistAddrBaseMean->Clone(); fHistList->Add(fHistAddrBaseMean);
+      fHistAddrMaxAdcX=(TH1F*)monitor.fHistAddrMaxAdcX->Clone(); fHistList->Add(fHistAddrMaxAdcX);
+      fHistAddrAdcSum=(TH1F*)monitor.fHistAddrAdcSum->Clone(); fHistList->Add(fHistAddrAdcSum);
+      fHistAddrBaseRms=(TH1F*)monitor.fHistAddrBaseRms->Clone(); fHistList->Add(fHistAddrBaseRms);
+      
+      
+      fHistDistrSumIROC=(TH1F*)monitor.fHistDistrSumIROC->Clone(); fHistList->Add(fHistDistrSumIROC);
+      fHistDistrMaxIROC=(TH1F*)monitor.fHistDistrMaxIROC->Clone(); fHistList->Add(fHistDistrMaxIROC);
+      fHistDistrSumOROC=(TH1F*)monitor.fHistDistrSumOROC->Clone(); fHistList->Add(fHistDistrSumOROC);
+      fHistDistrMaxOROC=(TH1F*)monitor.fHistDistrMaxOROC->Clone(); fHistList->Add(fHistDistrMaxOROC);
+      
+      fHistDistrBase2dIROC=(TH2F*)monitor.fHistDistrBase2dIROC->Clone(); fHistList->Add(fHistDistrBase2dIROC);
+      fHistDistrBase2dOROC=(TH2F*)monitor.fHistDistrBase2dOROC->Clone(); fHistList->Add(fHistDistrBase2dOROC);
+      fHistDistrBaseRmsIROC=(TH1D*)monitor.fHistDistrBaseRmsIROC->Clone(); fHistList->Add(fHistDistrBaseRmsIROC);
+      fHistDistrBaseMeanIROC=(TH1D*)monitor.fHistDistrBaseMeanIROC->Clone(); fHistList->Add(fHistDistrBaseMeanIROC);
+      fHistDistrBaseRmsOROC=(TH1D*)monitor.fHistDistrBaseRmsOROC->Clone(); fHistList->Add(fHistDistrBaseRmsOROC);
+      fHistDistrBaseMeanOROC=(TH1D*)monitor.fHistDistrBaseMeanOROC->Clone(); fHistList->Add(fHistDistrBaseMeanOROC);
+      
+      fHistGlobalMaxA=(TH2S*)monitor.fHistGlobalMaxA->Clone(); fHistList->Add(fHistGlobalMaxA);
+      fHistGlobalMaxC=(TH2S*)monitor.fHistGlobalMaxC->Clone(); fHistList->Add(fHistGlobalMaxC);
+      
+      fPad       = new Int_t*[monitor.GetMaxHwAddr()];     
+      for(Int_t i = 0; i<GetMaxHwAddr(); i++) { fPad[i]       = new Int_t[monitor.GetTimeBins()];}
+      
+      fPadMapRCU = new Int_t*[monitor.GetMaxHwAddr()];     
+      for(Int_t i = 0; i<monitor.GetMaxHwAddr(); i++) { fPadMapRCU[i] = new Int_t[6];}
+      
+      fPadMapHw  = new Float_t[monitor.GetMaxHwAddr()];
 
+      fMapEqidsRcu   = new Int_t[1000];
+      fMapEqidsSec   = new Int_t*[36];
+      for(Int_t i = 0; i<36; i++) { fMapEqidsSec[i]       = new Int_t[6];}
+      SetEqIds();
+      
+      if (gDirectory) 
+       {
+         if (!gDirectory->GetList()) 
+           {
+             Warning("Build","Current directory is not a valid directory");
+             return  *this;
+           }
+         AliTPCMonitor *hold = (AliTPCMonitor*)gDirectory->GetList()->FindObject(monitor.GetName());
+         if(hold) 
+           {
+             Warning("Build","Replacing existing histogram: %s (Potential memory leak).",monitor.GetName());
+             gDirectory->GetList()->Remove(hold);
+           }
+         gDirectory->Append(this);
+       }
+      fReaderDATEMon=monitor.fReaderDATEMon; 
+    }
+  return *this;
 }
+
+
 //____________________________________________________________________________
 AliTPCMonitor::~AliTPCMonitor() 
 {
@@ -182,23 +453,23 @@ void AliTPCMonitor::CreateHistos()
   // Create histograms to be displayed 
 
   if(fVerb) cout << " create new ones " << endl;
-  fHistIROC            = new TH2F("fHistIROC"            ,"fHistIROC"           ,kNRowsIroc,0,kNRowsIroc,kNPadsIroc, kNPadMinIroc, kNPadMaxIroc);       fHistList->Add(fHistIROC);
-  fHistOROC            = new TH2F("fHistOROC"            ,"fHistOROC"           ,kNRowsOroc,0,kNRowsOroc,kNPadsOroc, kNPadMinOroc, kNPadMaxOroc);       fHistList->Add(fHistOROC); 
+  fHistIROC            = new TH2F("fHistIROC"            ,"fHistIROC"           ,fkNRowsIroc,0,fkNRowsIroc,fkNPadsIroc, fkNPadMinIroc, fkNPadMaxIroc);       fHistList->Add(fHistIROC);
+  fHistOROC            = new TH2F("fHistOROC"            ,"fHistOROC"           ,fkNRowsOroc,0,fkNRowsOroc,fkNPadsOroc, fkNPadMinOroc, fkNPadMaxOroc);       fHistList->Add(fHistOROC); 
 
-  fHistIROCIndex       = new TH2S("fHistIROCIndex"       ,"fHistIROCIndex"      ,kNRowsIroc,0,kNRowsIroc,kNPadsIroc, kNPadMinIroc, kNPadMaxIroc);       fHistList->Add(fHistIROCIndex);
-  fHistOROCIndex       = new TH2S("fHistOROCIndex"       ,"fHistOROCIndex"      ,kNRowsOroc,0,kNRowsOroc,kNPadsOroc, kNPadMinOroc, kNPadMaxOroc);       fHistList->Add(fHistOROCIndex);
+  fHistIROCIndex       = new TH2S("fHistIROCIndex"       ,"fHistIROCIndex"      ,fkNRowsIroc,0,fkNRowsIroc,fkNPadsIroc, fkNPadMinIroc, fkNPadMaxIroc);       fHistList->Add(fHistIROCIndex);
+  fHistOROCIndex       = new TH2S("fHistOROCIndex"       ,"fHistOROCIndex"      ,fkNRowsOroc,0,fkNRowsOroc,fkNPadsOroc, fkNPadMinOroc, fkNPadMaxOroc);       fHistList->Add(fHistOROCIndex);
 
-  fHistIROCTime        = new TH2F("fHistIROCTime"        ,"fHistIROCTime"       ,kNRowsIroc,0,kNRowsIroc,kNPadsIroc, kNPadMinIroc, kNPadMaxIroc);       fHistList->Add(fHistIROCTime);
-  fHistOROCTime        = new TH2F("fHistOROCTime"        ,"fHistOROCTime"       ,kNRowsOroc,0,kNRowsOroc,kNPadsOroc, kNPadMinOroc, kNPadMaxOroc);       fHistList->Add(fHistOROCTime);
+  fHistIROCTime        = new TH2F("fHistIROCTime"        ,"fHistIROCTime"       ,fkNRowsIroc,0,fkNRowsIroc,fkNPadsIroc, fkNPadMinIroc, fkNPadMaxIroc);       fHistList->Add(fHistIROCTime);
+  fHistOROCTime        = new TH2F("fHistOROCTime"        ,"fHistOROCTime"       ,fkNRowsOroc,0,fkNRowsOroc,fkNPadsOroc, fkNPadMinOroc, fkNPadMaxOroc);       fHistList->Add(fHistOROCTime);
   
-  fHistIROCRMS         = new TH2F("fHistIROCRMS"         ,"fHistIROCRMS"        ,kNRowsIroc,0,kNRowsIroc,kNPadsIroc, kNPadMinIroc, kNPadMaxIroc);       fHistList->Add(fHistIROCRMS);
-  fHistOROCRMS         = new TH2F("fHistOROCRMS"         ,"fHistOROCRMS"        ,kNRowsOroc,0,kNRowsOroc,kNPadsOroc, kNPadMinOroc, kNPadMaxOroc);       fHistList->Add(fHistOROCRMS);
+  fHistIROCRMS         = new TH2F("fHistIROCRMS"         ,"fHistIROCRMS"        ,fkNRowsIroc,0,fkNRowsIroc,fkNPadsIroc, fkNPadMinIroc, fkNPadMaxIroc);       fHistList->Add(fHistIROCRMS);
+  fHistOROCRMS         = new TH2F("fHistOROCRMS"         ,"fHistOROCRMS"        ,fkNRowsOroc,0,fkNRowsOroc,fkNPadsOroc, fkNPadMinOroc, fkNPadMaxOroc);       fHistList->Add(fHistOROCRMS);
    
-  fHistIROCSUM         = new TH2F("fHistIROCSUM"         ,"fHistIROCSUM"        ,kNRowsIroc,0,kNRowsIroc,kNPadsIroc, kNPadMinIroc, kNPadMaxIroc);       fHistList->Add(fHistIROCSUM);
-  fHistOROCSUM         = new TH2F("fHistOROCSUM"         ,"fHistOROCSUM"        ,kNRowsOroc,0,kNRowsOroc,kNPadsOroc, kNPadMinOroc, kNPadMaxOroc);       fHistList->Add(fHistOROCSUM);
+  fHistIROCSUM         = new TH2F("fHistIROCSUM"         ,"fHistIROCSUM"        ,fkNRowsIroc,0,fkNRowsIroc,fkNPadsIroc, fkNPadMinIroc, fkNPadMaxIroc);       fHistList->Add(fHistIROCSUM);
+  fHistOROCSUM         = new TH2F("fHistOROCSUM"         ,"fHistOROCSUM"        ,fkNRowsOroc,0,fkNRowsOroc,fkNPadsOroc, fkNPadMinOroc, fkNPadMaxOroc);       fHistList->Add(fHistOROCSUM);
  
-  fHistIROCBASE        = new TH2F("fHistIROCBASE"        ,"fHistIROCBASE"       ,kNRowsIroc,0,kNRowsIroc,kNPadsIroc, kNPadMinIroc, kNPadMaxIroc);       fHistList->Add(fHistIROCBASE);
-  fHistOROCBASE        = new TH2F("fHistOROCBASE"        ,"fHistOROCBASE"       ,kNRowsOroc,0,kNRowsOroc,kNPadsOroc, kNPadMinOroc, kNPadMaxOroc);       fHistList->Add(fHistOROCBASE);
+  fHistIROCBASE        = new TH2F("fHistIROCBASE"        ,"fHistIROCBASE"       ,fkNRowsIroc,0,fkNRowsIroc,fkNPadsIroc, fkNPadMinIroc, fkNPadMaxIroc);       fHistList->Add(fHistIROCBASE);
+  fHistOROCBASE        = new TH2F("fHistOROCBASE"        ,"fHistOROCBASE"       ,fkNRowsOroc,0,fkNRowsOroc,fkNPadsOroc, fkNPadMinOroc, fkNPadMaxOroc);       fHistList->Add(fHistOROCBASE);
 
 
   fHistChannelTime     = new TH2F("fHistChannelTime"     ,"fHistChannelTime"    ,GetNumOfChannels(),0,GetNumOfChannels(),GetTimeBins(),0,GetTimeBins());fHistList->Add(fHistChannelTime);
@@ -276,7 +547,7 @@ Int_t AliTPCMonitor::ProcessEvent()
 //__________________________________________________________________
 Int_t AliTPCMonitor::ReadData(Int_t secid)
 {
-  // Read Data File/Stream  for specified Format.
+  // Read Data File/Stream  for specified Format. 
   // Payload will be extracted from either ROOT or DATE format 
   // and passed to FillHistsDecode for decoding of the adc information 
   
@@ -308,7 +579,7 @@ Int_t AliTPCMonitor::ReadDataDATEFile(Int_t secid)
 #endif
   
   Char_t*                  eventPtr = 0;
-  AliTPCMonitorDateFormat* DateForm = 0;
+  AliTPCMonitorDateFormat* dateform = 0;
   
   // Create objects //
   if( fReaderDATE==0 || ( fReaderDATE!=0 && (strcmp(GetLastProcFile(),GetFile())!=0) )  ) 
@@ -324,33 +595,33 @@ Int_t AliTPCMonitor::ReadDataDATEFile(Int_t secid)
   // Get Event pointer ///
   if(fReaderDATE->IsDateFileOpen() ==false )  { AliError("Could not open Date File"); return  11 ; }
   // Rewind event if new event number is smaller than old one
-  if(fEventNumberOld>fEventNumber)           { fReaderDATE->ResetFilePos(); }
+  if(fEventNumberOld>fEventNumber )           { fReaderDATE->ResetFilePos(); }
   while(GetProcNextEvent() || fEventNumber==0)
     {
       fReaderDATE->ReadEvent();
       eventPtr  = fReaderDATE->GetMemoryPointer();
-      DateForm = new AliTPCMonitorDateFormat(eventPtr);
-      Int_t current_ev =  DateForm->GetEventID();
-      if(fEventNumber <= current_ev ){  break; }
+      dateform = new AliTPCMonitorDateFormat(eventPtr);
+      Int_t currentev =  dateform->GetEventID();
+      if(fEventNumber <= currentev ){  break; }
     }
-  
   eventPtr  = fReaderDATE->GetMemoryPointer();
   
-  if(DateForm==0) DateForm = new AliTPCMonitorDateFormat(eventPtr); 
-  fEventNumber     =  DateForm->GetEventID();
-  fEventNumberOld  =  DateForm->GetEventID();
+  if(dateform==0) dateform = new AliTPCMonitorDateFormat(eventPtr); 
+  fEventNumber     =  dateform->GetEventID();
+  fEventNumberOld  =  dateform->GetEventID();
   
   if(fReaderDATE->IsLastEvent()) fLastEv =1;
-  if(DateForm->IsEventEndOfRun()) {  AliInfo("Event is end of run: eventType END_OF_RUN "); }
+  if(dateform->IsEventEndOfRun()) {  AliInfo("Event is end of run: eventType END_OF_RUN "); }
   
   if(fReaderDATE->IsEventValid()       == false )   {AliInfo("Skipping Event because invalid");                     return 10;   } 
-  if(DateForm->IsEventPhysicsEvent()   == false )   {AliInfo("Skipping Header/event because not Physics event");    return 12;   } 
+  if(dateform->IsEventPhysicsEvent()   == false )   {AliInfo("Skipping Header/event because not Physics event");    return 12;   } 
   
   ResetHistos() ; 
   
-  Int_t lastrcu = ReadDataDATESubEventLoop(DateForm,secid);
+  Int_t lastrcu = ReadDataDATESubEventLoop(dateform,secid);
   
-  delete DateForm;
+  delete dateform;
   if(fVerb) cout << " last rcu " << lastrcu << endl; 
   return lastrcu;
 }
@@ -369,7 +640,7 @@ Int_t AliTPCMonitor::ReadDataDATEStream(Int_t secid)
   
   Char_t*                  eventPtr         = 0;
   
-  AliTPCMonitorDateFormat* DateForm =0 ;
+  AliTPCMonitorDateFormat* dateform =0 ;
   
   // Create objects ///
   if((fReaderDATEMon==0 || ( fReaderDATEMon!=0 && (strcmp(GetLastProcFile(),GetFile())!=0) )))
@@ -395,18 +666,18 @@ Int_t AliTPCMonitor::ReadDataDATEStream(Int_t secid)
   
   eventPtr  = fReaderDATEMon->GetEventPointerasChar();
   
-  if(DateForm==0) DateForm = new AliTPCMonitorDateFormat(eventPtr); 
-  fEventNumber     =  DateForm->GetEventID();
-  fEventNumberOld  =  DateForm->GetEventID();
+  if(dateform==0) dateform = new AliTPCMonitorDateFormat(eventPtr); 
+  fEventNumber     =  dateform->GetEventID();
+  fEventNumberOld  =  dateform->GetEventID();
   
-  if(DateForm->IsEventEndOfRun()) {  AliInfo("Event is end of run: eventType END_OF_RUN "); }
-  if(DateForm->IsEventPhysicsEvent()      == false  )  {AliInfo("Skipping Header/event because not Physics event");    return 12;   } 
+  if(dateform->IsEventEndOfRun()) {  AliInfo("Event is end of run: eventType END_OF_RUN "); }
+  if(dateform->IsEventPhysicsEvent()      == false  )  {AliInfo("Skipping Header/event because not Physics event");    return 12;   } 
   
   ResetHistos() ; 
   
-  Int_t lastrcu = ReadDataDATESubEventLoop(DateForm,secid);
+  Int_t lastrcu = ReadDataDATESubEventLoop(dateform,secid);
   
-  delete DateForm;
+  delete dateform;
   if(fVerb) cout << " last rcu " << lastrcu << endl; 
   return lastrcu;
 }
@@ -424,15 +695,15 @@ Int_t AliTPCMonitor::ReadDataDATEStream(Int_t /*secid*/)
 }
 #endif
 
-Int_t AliTPCMonitor::ReadDataDATESubEventLoop(AliTPCMonitorDateFormat* DateForm, Int_t secid)
+Int_t AliTPCMonitor::ReadDataDATESubEventLoop(AliTPCMonitorDateFormat* dateform, Int_t secid)
 {
   // Loop over DATE Subevents  
 
   Bool_t                   exitSubEventLoop = false;
-  Int_t                    last_rcu_id      = 0; 
-  Int_t                    last_eq          = 0;
+  Int_t                    lastrcuid      = 0; 
+  Int_t                    lasteq          = 0;
   Int_t                    start            = 1;
-  Int_t                    rcu_patch        = 0;
+  Int_t                    rcupatch        = 0;
   Char_t*                  eventPtr         = 0;
   UInt_t*                  eventPtrUI       = 0;
 
@@ -440,26 +711,26 @@ Int_t AliTPCMonitor::ReadDataDATESubEventLoop(AliTPCMonitorDateFormat* DateForm,
 
   while(exitSubEventLoop == false)
     {
-      if(start==1) { DateForm->GotoSubEventHeader()    ;  start=0;}
-      else         { DateForm->GotoNextSubEventHeader();          }
-      if(DateForm->IsLastSubEventHeader()) exitSubEventLoop = true;
+      if(start==1) { dateform->GotoSubEventHeader()    ;  start=0;}
+      else         { dateform->GotoNextSubEventHeader();          }
+      if(dateform->IsLastSubEventHeader()) exitSubEventLoop = true;
       
-      if(fVerb) cout << " next subevent LDC " << (Int_t)DateForm->GetSubEventLDC() <<  endl;
+      if(fVerb) cout << " next subevent LDC " << (Int_t)dateform->GetSubEventLDC() <<  endl;
       
-      last_eq    = 0 ;
+      lasteq    = 0 ;
       Int_t neq  = 0 ;
       
-      while(last_eq==0) 
+      while(lasteq==0) 
        {
-         if(neq ==0){ DateForm->GotoFirstEquipment();} 
-         else       { DateForm->GotoNextEquipment();}
+         if(neq ==0){ dateform->GotoFirstEquipment();} 
+         else       { dateform->GotoNextEquipment();}
          
-         fGdcId      = DateForm->GetSubEventGDC() ;
-         fLdcId      = DateForm->GetSubEventLDC();
-         fRunId      = DateForm->GetEventRunID(); 
-         fEqId       = DateForm->GetEquipmentID();
-         rcu_patch   = GetRCUPatch(fRunId, fEqId);
-         last_rcu_id = (rcu_patch+1000);
+         fGdcId      = dateform->GetSubEventGDC() ;
+         fLdcId      = dateform->GetSubEventLDC();
+         fRunId      = dateform->GetEventRunID(); 
+         fEqId       = dateform->GetEquipmentID();
+         rcupatch   = GetRCUPatch(fRunId, fEqId);
+         lastrcuid = (rcupatch+1000);
          neq++;
          
          if(fLdcIdOld!=fLdcId &&  fChannelIter!=0) {
@@ -471,19 +742,19 @@ Int_t AliTPCMonitor::ReadDataDATESubEventLoop(AliTPCMonitorDateFormat* DateForm,
              }
            else 
              {
-               return last_rcu_id;
+               return lastrcuid;
              }
          }
          fLdcIdOld = fLdcId ;
          
          
-         if(DateForm->IsLastEquipment() != false )  last_eq = 1;    
+         if(dateform->IsLastEquipment() != false )  lasteq = 1;    
          
-         eventPtr = DateForm->GetFirstDataPointer();
+         eventPtr = dateform->GetFirstDataPointer();
          eventPtrUI = (UInt_t *) eventPtr;
-         Int_t payload = DateForm->GetPayloadSize();
+         Int_t payload = dateform->GetPayloadSize();
          
-         if(fVerb)DumpHeader(DateForm);          
+         if(fVerb)DumpHeader(dateform);          
          if(fVerb) cout << "Check sector and fEqId  " << endl;
          
          if(fVerb && secid >0 ) 
@@ -502,16 +773,16 @@ Int_t AliTPCMonitor::ReadDataDATESubEventLoop(AliTPCMonitorDateFormat* DateForm,
              if(fVerb) cout << " allocated 10bit " << endl;
              altro->Allocate10BitArray();
              altro->Decodeto10Bit(fEqId);
-             AliInfo(Form("Process eqid %i , patch %i ",fEqId,rcu_patch%6));
-             FillHistsDecode(altro,(rcu_patch%6),secid);
-             if(fChannelIter!=0 && secid==-1 ) SetSectorFilled(rcu_patch/6);
+             AliInfo(Form("Process eqid %i , patch %i ",fEqId,rcupatch%6));
+             FillHistsDecode(altro,(rcupatch%6),secid);
+             if(fChannelIter!=0 && secid==-1 ) SetSectorFilled(rcupatch/6);
              delete altro;
            }// if(CheckID)
        }// while last eq
-      SetLastSector(rcu_patch/6);
+      SetLastSector(rcupatch/6);
     }
   if(fChannelIter!=0 && secid==-1){ FillGlobal(GetLastSector()); }  
-  return last_rcu_id;
+  return lastrcuid;
   
 }
 //__________________________________________________________________
@@ -520,18 +791,18 @@ Int_t AliTPCMonitor::ReadDataROOT(Int_t secid)
   // Read in data in ROOT format 
   if(fReaderDATE){ delete fReaderDATE ; fReaderDATE=0;}
   fChannelIter =0;
-  Int_t           last_rcu_id   = 0; 
-  Int_t           rcu_patch     = 0;
+  Int_t           lastrcuid   = 0; 
+  Int_t           rcupatch     = 0;
   Int_t           equipmentSize = 0;
   UChar_t*        eventPtr      = 0 ; 
   UInt_t*         eventPtrUI    = 0 ;
   Int_t           evtype        = 0;
 
   if(fReaderROOT==0 || ( fReaderROOT!=0 && (strcmp(GetLastProcFile(),GetFile())!=0) )  ) 
-    {
+    { 
       if(fVerb) cout << "AliTPCMonitor::ReadDataROOT create new reader " << endl;
       if(fReaderROOT)  { delete fReaderROOT ; fReaderROOT=0; }
-      fReaderROOT = new AliRawReaderRoot(GetFile());
+      fReaderROOT = new AliRawReaderRoot(GetFile()); 
       if(!fReaderROOT) { AliError("Could not initiate  AliRawReaderRoo "); return 10;}
       fEventNumber=0;
     }
@@ -546,9 +817,9 @@ Int_t AliTPCMonitor::ReadDataROOT(Int_t secid)
     {
       if(fVerb) cout << "AliTPCMonitor::ReadDataROOT get event " << endl;
       if(!fReaderROOT->NextEvent()) { AliError("Could not get next Event"); return 11 ;}
-      Int_t current_ev =  *(fReaderROOT->GetEventId());
+      Int_t currentev =  *(fReaderROOT->GetEventId());
      
-      if(fEventNumber <= current_ev ){  break; }
+      if(fEventNumber <= currentev ){  break; }
     }
   
   fEventNumber     =  *(fReaderROOT->GetEventId());
@@ -565,8 +836,8 @@ Int_t AliTPCMonitor::ReadDataROOT(Int_t secid)
       equipmentSize = fReaderROOT->GetEquipmentSize();
       fEqId         = fReaderROOT->GetEquipmentId();
       evtype        = fReaderROOT->GetType();
-      rcu_patch     = GetRCUPatch(fRunId, fEqId);
-      last_rcu_id   = (rcu_patch+1000);
+      rcupatch     = GetRCUPatch(fRunId, fEqId);
+      lastrcuid   = (rcupatch+1000);
       
       if(evtype==1)        { AliWarning(Form("EventType==1 in event %i ",fEventNumber)); return 10; }
       if(equipmentSize==0) { AliWarning(Form("Equipmentsize ==0  in event %i ",fEventNumber)); return 10; }
@@ -582,7 +853,7 @@ Int_t AliTPCMonitor::ReadDataROOT(Int_t secid)
          }
        else 
          {
-           return last_rcu_id;
+           return lastrcuid;
          }
       }
       fLdcIdOld = fLdcId ;
@@ -599,35 +870,35 @@ Int_t AliTPCMonitor::ReadDataROOT(Int_t secid)
          altro->SetActFilename(GetFile());
          altro->Allocate10BitArray();
          altro->Decodeto10Bit(fEqId);
-         AliInfo(Form("Process sector %i eqid %i , patch %i ",rcu_patch/6,fEqId,rcu_patch%6));
-         FillHistsDecode(altro,(rcu_patch%6),secid);
-         if(fChannelIter!=0 && secid==-1 ) SetSectorFilled(rcu_patch/6);
+         AliInfo(Form("Process sector %i eqid %i , patch %i ",rcupatch/6,fEqId,rcupatch%6));
+         FillHistsDecode(altro,(rcupatch%6),secid);
+         if(fChannelIter!=0 && secid==-1 ) SetSectorFilled(rcupatch/6);
          delete altro;
        }
-      SetLastSector(rcu_patch/6);
+      SetLastSector(rcupatch/6);
     }
   if(fChannelIter!=0 && secid==-1) { FillGlobal(GetLastSector()); }
-  return last_rcu_id;
+  return lastrcuid;
 }
 
  
 //____________________________________________________________________________
-void AliTPCMonitor::FillHistsDecode(AliTPCMonitorAltro* altro ,Int_t rcu_patch, Int_t secid) 
+void AliTPCMonitor::FillHistsDecode(AliTPCMonitorAltro* altro ,Int_t rcupatch, Int_t secid) 
 {
   // Decode Channels, calculate base mean and rms depending on the 
   // value of secid (see ProcessEvent) and fill histograms
 
 
-  if(fVerb)   cout << "FillHistsDecode : rcu_patch " << rcu_patch << " id " << secid <<  endl;
-  Int_t     time_stamp        = 0;
-  Int_t     sample_iter       = 0;
-  Int_t     sample_length     = 0;
-  Int_t     sample_bins       = 0;
+  if(fVerb)   cout << "FillHistsDecode : rcupatch " << rcupatch << " id " << secid <<  endl;
+  Int_t     timestamp        = 0;
+  Int_t     sampleiter       = 0;
+  Int_t     samplelength     = 0;
+  Int_t     samplebins       = 0;
   Float_t   max               = 0;
-  Float_t   max_x             = 0;
+  Float_t   maxx             = 0;
   Float_t   sum               = 0.0;
   Int_t     sumn              = 0;
-  Int_t     block_pos         = 0;
+  Int_t     blockpos         = 0;
   Int_t     hw                = 0;
   Int_t     nwords            = 0; 
   Int_t     nextHwAddress     = 0;
@@ -636,8 +907,8 @@ void AliTPCMonitor::FillHistsDecode(AliTPCMonitorAltro* altro ,Int_t rcu_patch,
   Int_t     nextpos           = 0;
   Int_t     lastpos           = altro->Get10BitArraySize()-1;
   Short_t*  entries           = altro->Get10BitArray();
-  Double_t  h_rms             = 0.0;
-  Double_t  h_mean            = 0.0;
+  Double_t  hrms             = 0.0;
+  Double_t  hmean            = 0.0;
   Int_t     supnextpos        = 0;
   TH1D*     hbase             =  new TH1D("hbase","hbase",GetTimeBins(),0.5,(GetTimeBins()+0.5));
  
@@ -648,10 +919,10 @@ void AliTPCMonitor::FillHistsDecode(AliTPCMonitorAltro* altro ,Int_t rcu_patch,
       if(nextpos==-1) { break; }
       
       lastpos               = nextpos;
-      block_pos             = altro->GetTrailerBlockPos();
+      blockpos             = altro->GetTrailerBlockPos();
       hw                    = altro->GetTrailerHwAddress(); 
       nwords                = altro->GetTrailerNWords();
-      nextHwAddress         = ( hw + (rcu_patch<<12) );
+      nextHwAddress         = ( hw + (rcupatch<<12) );
       fPad[fChannelIter][0] = nextHwAddress ;
       
       if(fPadMapHw[nextHwAddress]!=-1 ) 
@@ -668,7 +939,7 @@ void AliTPCMonitor::FillHistsDecode(AliTPCMonitorAltro* altro ,Int_t rcu_patch,
              fPad[fChannelIter-1][0] = hwreset;
              
              fPadMapHw[hwreset]    =  fChannelIter-1  ;
-             fPadMapRCU[hwreset][0]=  rcu_patch      ;
+             fPadMapRCU[hwreset][0]=  rcupatch      ;
              fPadMapRCU[hwreset][1]=  ((hwreset & AliTPCMonitorAltro::GetHwMaskBranch())    >> 11);
              fPadMapRCU[hwreset][2]=  ((hwreset & AliTPCMonitorAltro::GetHwMaskFEC())       >>7  );
              fPadMapRCU[hwreset][3]=  ( hwreset & AliTPCMonitorAltro::GetHwMaskFECChannel()      );
@@ -678,78 +949,78 @@ void AliTPCMonitor::FillHistsDecode(AliTPCMonitorAltro* altro ,Int_t rcu_patch,
        }
       
       fPadMapHw[nextHwAddress]    =  fChannelIter  ;
-      fPadMapRCU[nextHwAddress][0]=  rcu_patch     ;
+      fPadMapRCU[nextHwAddress][0]=  rcupatch     ;
       fPadMapRCU[nextHwAddress][1]=  ((nextHwAddress &  AliTPCMonitorAltro::GetHwMaskBranch())>> 11)    ;
       fPadMapRCU[nextHwAddress][2]=  ((nextHwAddress &  AliTPCMonitorAltro::GetHwMaskFEC())   >>7);
       fPadMapRCU[nextHwAddress][3]=  (nextHwAddress  &  AliTPCMonitorAltro::GetHwMaskFECChannel());
       fPadMapRCU[nextHwAddress][4]=  fChannelIter;
       fPadMapRCU[nextHwAddress][5]=  altro->GetTrailerPos();
               
-      time_stamp    = 0;
-      sample_iter   = 0;
-      sample_length = 0;
-      sample_bins   = 0;
+      timestamp    = 0;
+      sampleiter   = 0;
+      samplelength = 0;
+      samplebins   = 0;
       
       max           = 0.0;
-      max_x         = 0.0;
+      maxx         = 0.0;
       sum           = 0.0;
       sumn          = 0;
       
       hbase->Reset();
       
-      for(Int_t iter_words = 0 ; iter_words< nwords ; iter_words++) 
+      for(Int_t iterwords = 0 ; iterwords< nwords ; iterwords++) 
        {
-         if(entries[block_pos-iter_words]==682) { continue; }
-         if(entries[block_pos-iter_words]!=682 && sample_iter==0) 
+         if(entries[blockpos-iterwords]==682) { continue; }
+         if(entries[blockpos-iterwords]!=682 && sampleiter==0) 
            {
-             sample_length =  entries[block_pos-iter_words];
-             sample_iter   =  sample_length;
-             sample_bins   =  0;
-             time_stamp    =  entries[block_pos-iter_words-1];
-             iter_words++;
+             samplelength =  entries[blockpos-iterwords];
+             sampleiter   =  samplelength;
+             samplebins   =  0;
+             timestamp    =  entries[blockpos-iterwords-1];
+             iterwords++;
            }
          else 
            {
-             ntime = time_stamp-sample_bins;
-             adc   = entries[block_pos-iter_words];
+             ntime = timestamp-samplebins;
+             adc   = entries[blockpos-iterwords];
              fPad[fChannelIter][ntime]  = adc;
              if( (adc!=0)  && (ntime>=GetRangeBaseMin()  ) && (ntime<GetRangeBaseMax()    ))  {hbase->Fill(adc)        ;}
-             if( (adc>max) && (ntime>=GetRangeMaxAdcMin()) && (ntime<GetRangeMaxAdcMax()  ))  {max = adc;max_x = ntime ;}
+             if( (adc>max) && (ntime>=GetRangeMaxAdcMin()) && (ntime<GetRangeMaxAdcMax()  ))  {max = adc;maxx = ntime ;}
              if(              (ntime>=GetRangeSumMin())    && (ntime<GetRangeSumMax()     ))  {sum+=adc; sumn++;}
-             sample_bins++;
+             samplebins++;
            }
        }
       
-      h_mean = hbase->GetMean();
-      hbase->GetXaxis()->SetRangeUser(h_mean- h_mean/3 , h_mean + h_mean/3);
-      h_mean =  hbase->GetMean();
-      h_rms  = hbase->GetRMS();
+      hmean = hbase->GetMean();
+      hbase->GetXaxis()->SetRangeUser(hmean- hmean/3 , hmean + hmean/3);
+      hmean =  hbase->GetMean();
+      hrms  = hbase->GetRMS();
 
-      if(       GetPedestals()==1) fHistAddrMaxAdc->SetBinContent(  nextHwAddress,max- h_mean);
+      if(       GetPedestals()==1) fHistAddrMaxAdc->SetBinContent(  nextHwAddress,max- hmean);
       else                         fHistAddrMaxAdc->SetBinContent(  nextHwAddress,max        );
       
       if(secid!=-1)
        {
-         if(rcu_patch<2)
+         if(rcupatch<2)
            {
-             fHistDistrBase2dIROC->Fill(h_mean,h_rms);
+             fHistDistrBase2dIROC->Fill(hmean,hrms);
              fHistDistrSumIROC->Fill(sum);
-             if(     GetPedestals()==1 ) { fHistDistrMaxIROC->Fill(max-h_mean);  fHistDistrSumIROC->Fill(sum -sumn*h_mean);}
+             if(     GetPedestals()==1 ) { fHistDistrMaxIROC->Fill(max-hmean);  fHistDistrSumIROC->Fill(sum -sumn*hmean);}
              else                        { fHistDistrMaxIROC->Fill(max);         fHistDistrSumIROC->Fill(sum );}
            }
          else
            {
-             fHistDistrBase2dOROC->Fill(h_mean,h_rms);
+             fHistDistrBase2dOROC->Fill(hmean,hrms);
              fHistDistrSumOROC->Fill(sum);
-             if(     GetPedestals()==1 ){ fHistDistrMaxOROC->Fill(max-h_mean); fHistDistrSumOROC->Fill(sum -sumn*h_mean);}
+             if(     GetPedestals()==1 ){ fHistDistrMaxOROC->Fill(max-hmean); fHistDistrSumOROC->Fill(sum -sumn*hmean);}
              else                       { fHistDistrMaxOROC->Fill(max);        fHistDistrSumOROC->Fill(sum)             ;}
            }
          
          fHistAddrAdcSum->SetBinContent(  nextHwAddress,sum);
          fHistAddrMapIndex->SetBinContent(nextHwAddress,fChannelIter);
-         fHistAddrBaseMean->SetBinContent(nextHwAddress,h_mean);
-         fHistAddrMaxAdcX->SetBinContent( nextHwAddress,max_x);
-         fHistAddrBaseRms->SetBinContent( nextHwAddress,h_rms);
+         fHistAddrBaseMean->SetBinContent(nextHwAddress,hmean);
+         fHistAddrMaxAdcX->SetBinContent( nextHwAddress,maxx);
+         fHistAddrBaseRms->SetBinContent( nextHwAddress,hrms);
        }
       fChannelIter++;
       if(nextpos<0)  { AliError("Error :  next pos < 0 "); break  ;}
@@ -816,16 +1087,16 @@ void AliTPCMonitor::FillHistsPadPlane()
 void AliTPCMonitor::ResetArrays() 
 {
   // Reset data arrays 
-  for(Int_t row = 0 ; row < kNRowsIroc; row++) 
+  for(Int_t row = 0 ; row < fkNRowsIroc; row++) 
     {
-    for(Int_t pad = 0 ; pad <  kNPadsIroc ; pad++) 
+    for(Int_t pad = 0 ; pad <  fkNPadsIroc ; pad++) 
       {
        fHistIROCIndex->SetCellContent(row+1,pad+1,-1);
       }
     }
-  for(Int_t row = 0 ; row < kNRowsOroc; row++) 
+  for(Int_t row = 0 ; row < fkNRowsOroc; row++) 
     {
-    for(Int_t pad = 0 ; pad <  kNPadsOroc ; pad++) 
+    for(Int_t pad = 0 ; pad <  fkNPadsOroc ; pad++) 
       {
        fHistOROCIndex->SetCellContent(row+1,pad+1,-1);
       }
@@ -989,7 +1260,7 @@ void AliTPCMonitor::FillGlobal(Int_t sector)
 
 
 //__________________________________________________________________
-void AliTPCMonitor::GetXY( Double_t& xval , Double_t& yval , Int_t padmax, Int_t row , Int_t pad) 
+void AliTPCMonitor::GetXY( Double_t& xval , Double_t& yval , Int_t padmax, Int_t row , Int_t pad) const 
 {
   // Get x and y position of pad
   
@@ -1008,7 +1279,7 @@ void AliTPCMonitor::GetXY( Double_t& xval , Double_t& yval , Int_t padmax, Int_t
 } 
 
 //__________________________________________________________________
-Int_t AliTPCMonitor::GetPadAtX(Float_t xval, Int_t row, Int_t padmax)
+Int_t AliTPCMonitor::GetPadAtX(Float_t xval, Int_t row, Int_t padmax) const
 {
   // Get pad number at given position in x
   Int_t pad    = 0;
@@ -1022,7 +1293,7 @@ Int_t AliTPCMonitor::GetPadAtX(Float_t xval, Int_t row, Int_t padmax)
 }
 
 //__________________________________________________________________
-Int_t AliTPCMonitor::GetPadAtX(Float_t xval, Int_t row)
+Int_t AliTPCMonitor::GetPadAtX(Float_t xval, Int_t row) const
 {
 
  // Get pad number at given position in x
@@ -1112,14 +1383,14 @@ void AliTPCMonitor::DrawHists(Int_t histos)
       fHistOROCRMS->SetXTitle("row");  fHistOROCRMS->SetZTitle("baseline rms (ADC)");          fHistOROCRMS->SetYTitle("pad");  fHistOROCRMS->SetTitle(titleOROC);
 
       // SUM 
-      Char_t name_sum[256] ; sprintf(name_sum,"ADC sum (bins: %i, %i)",GetRangeSumMin() ,GetRangeSumMax() );
-      fHistIROCSUM->SetXTitle("row");      fHistIROCSUM->SetZTitle(name_sum);      fHistIROCSUM->SetYTitle("pad");      fHistIROCSUM->SetTitle(titleIROC);
-      fHistOROCSUM->SetXTitle("row");      fHistOROCSUM->SetZTitle(name_sum);      fHistOROCSUM->SetYTitle("pad");      fHistOROCSUM->SetTitle(titleOROC);
+      Char_t namesum[256] ; sprintf(namesum,"ADC sum (bins: %i, %i)",GetRangeSumMin() ,GetRangeSumMax() );
+      fHistIROCSUM->SetXTitle("row");      fHistIROCSUM->SetZTitle(namesum);      fHistIROCSUM->SetYTitle("pad");      fHistIROCSUM->SetTitle(titleIROC);
+      fHistOROCSUM->SetXTitle("row");      fHistOROCSUM->SetZTitle(namesum);      fHistOROCSUM->SetYTitle("pad");      fHistOROCSUM->SetTitle(titleOROC);
     
       // BASE
-      Char_t name_base[256] ; sprintf(name_base ,"base mean (timbebin: %i, %i )",GetRangeBaseMin(),GetRangeBaseMax());
-      fHistIROCBASE->SetXTitle("row"); fHistIROCBASE->SetZTitle(name_base);  fHistIROCBASE->SetYTitle("pad");      fHistIROCBASE->SetTitle(titleIROC);
-      fHistOROCBASE->SetXTitle("row"); fHistOROCBASE->SetZTitle(name_base);  fHistOROCBASE->SetYTitle("pad");      fHistOROCBASE->SetTitle(titleOROC);
+      Char_t namebase[256] ; sprintf(namebase ,"base mean (timbebin: %i, %i )",GetRangeBaseMin(),GetRangeBaseMax());
+      fHistIROCBASE->SetXTitle("row"); fHistIROCBASE->SetZTitle(namebase);  fHistIROCBASE->SetYTitle("pad");      fHistIROCBASE->SetTitle(titleIROC);
+      fHistOROCBASE->SetXTitle("row"); fHistOROCBASE->SetZTitle(namebase);  fHistOROCBASE->SetYTitle("pad");      fHistOROCBASE->SetTitle(titleOROC);
 
       if(fHistIROCClone) fHistIROCClone->Delete();
       if(fHistOROCClone) fHistOROCClone->Delete();
@@ -1234,11 +1505,11 @@ void AliTPCMonitor::DrawHists(Int_t histos)
          if(!(cglobC=(TCanvas*)gROOT->GetListOfCanvases()->FindObject("SIDE C all"))) cglobC = CreateCanvas("SIDE C all"); 
          if(!(cglobA=(TCanvas*)gROOT->GetListOfCanvases()->FindObject("SIDE A all"))) cglobA = CreateCanvas("SIDE A all"); 
            
-         Char_t gl_title1[256]; sprintf(gl_title1,"SIDE A Run %05i (EventID %i)",fRunId,fEventNumber);
-         Char_t gl_title2[256]; sprintf(gl_title2,"SIDE C Run %05i (EventID %i)",fRunId,fEventNumber);
+         Char_t globtitle1[256]; sprintf(globtitle1,"SIDE A Run %05i (EventID %i)",fRunId,fEventNumber);
+         Char_t globtitle2[256]; sprintf(globtitle2,"SIDE C Run %05i (EventID %i)",fRunId,fEventNumber);
            
-         fHistGlobalMaxA->SetTitle(gl_title1);
-         fHistGlobalMaxC->SetTitle(gl_title2);
+         fHistGlobalMaxA->SetTitle(globtitle1);
+         fHistGlobalMaxC->SetTitle(globtitle2);
          fHistGlobalMaxA->SetXTitle("x/mm");
          fHistGlobalMaxA->SetYTitle("y/mm");
          fHistGlobalMaxC->SetXTitle("x/mm");
@@ -1253,14 +1524,14 @@ void AliTPCMonitor::DrawHists(Int_t histos)
          cglobC->cd() ; fHistGlobalMaxC->Draw("COLZ");
          cglobA->cd() ; fHistGlobalMaxA->Draw("COLZ");
            
-         Char_t name_om[256];
-         sprintf(name_om,".x  %s/TPC/AliTPCMonitorExec.C(3)",gSystem->Getenv("ALICE_ROOT"));
+         Char_t nameom[256];
+         sprintf(nameom,".x  %s/TPC/AliTPCMonitorExec.C(3)",gSystem->Getenv("ALICE_ROOT"));
            
          if(fExecGlob==0) 
            { 
-             if(fVerb)cout << " set exec " << name_om << endl;
-             cglobC->AddExec("glob",name_om);
-             cglobA->AddExec("glob",name_om);
+             if(fVerb)cout << " set exec " << nameom << endl;
+             cglobC->AddExec("glob",nameom);
+             cglobA->AddExec("glob",nameom);
              fExecGlob = 1;
            } 
          else 
@@ -1268,9 +1539,9 @@ void AliTPCMonitor::DrawHists(Int_t histos)
              cglobC->DeleteExec("glob");
              cglobA->DeleteExec("glob");
                
-             if(fVerb)  cout << " set exec " << name_om << endl;
-             cglobC->AddExec("glob",name_om);
-             cglobA->AddExec("glob",name_om);
+             if(fVerb)  cout << " set exec " << nameom << endl;
+             cglobC->AddExec("glob",nameom);
+             cglobA->AddExec("glob",nameom);
                
            }
          cglobC->Update();
@@ -1351,18 +1622,18 @@ void AliTPCMonitor::ExecPad()
   Char_t   namesel[256];
   Char_t   namecanv[256];
 
-  Int_t    xbin_min  = 0;
-  Int_t    xbin_max  = 0;
-  Float_t  ybin_min  = 0;
-  Float_t  ybin_max  = 0;
-  Int_t    ROC       = 0;
+  Int_t    xbinmin  = 0;
+  Int_t    xbinmax  = 0;
+  Float_t  ybinmin  = 0;
+  Float_t  ybinmax  = 0;
+  Int_t    rocid     = 0;
   
   // Check wich Canvas executed the event 
   TH2S* fHistIndex=0;
   sprintf(namesel,select->GetName());
   if(strcmp(namesel,"fHistOROC")==0 || strcmp(namesel,"fHistOROCRMS")==0 || strcmp(namesel,"fHistOROCTime")==0 ) 
     {
-      ROC = 1;
+      rocid = 1;
       fPadUsedRoc =1;
       sprintf(projhist,"ProjectionOROC");
       sprintf(namecanv,"coroc_ch");
@@ -1370,24 +1641,24 @@ void AliTPCMonitor::ExecPad()
     }
   if(strcmp(namesel,"fHistIROC")==0 || strcmp(namesel,"fHistIROCRMS")==0 || strcmp(namesel,"fHistIROCTime")==0 ) 
     {
-      ROC = 0;
+      rocid = 0;
       fPadUsedRoc=0;
       sprintf(projhist,"ProjectionIROC");
       sprintf(namecanv,"ciroc_ch");
-      fHistIndex = fHistIROCIndex;
+      fHistIndex = fHistIROCIndex; 
     }
   
   // Check if Canvas already existed and get Ranges from former Prjection histogram 
-  if(cpad=(TCanvas*)gROOT->GetListOfCanvases()->FindObject(namecanv)) 
+  if((cpad=(TCanvas*)gROOT->GetListOfCanvases()->FindObject(namecanv))) 
     {
       cpad->cd();
       if(gROOT->Get(projhist)) 
        {
          setrange = 1;
-         xbin_min = ((TH1D*)gROOT->Get(projhist))->GetXaxis()->GetFirst();
-         xbin_max = ((TH1D*)gROOT->Get(projhist))->GetXaxis()->GetLast();
-         ybin_min = ((TH1D*)gROOT->Get(projhist))->GetMinimum();
-         ybin_max = ((TH1D*)gROOT->Get(projhist))->GetMaximum();
+         xbinmin = ((TH1D*)gROOT->Get(projhist))->GetXaxis()->GetFirst();
+         xbinmax = ((TH1D*)gROOT->Get(projhist))->GetXaxis()->GetLast();
+         ybinmin = ((TH1D*)gROOT->Get(projhist))->GetMinimum();
+         ybinmax = ((TH1D*)gROOT->Get(projhist))->GetMaximum();
          delete gROOT->Get("legfit");
          delete gROOT->Get("fg");
        }
@@ -1414,23 +1685,23 @@ void AliTPCMonitor::ExecPad()
   hwadd   = (Int_t)fHistChannelTime->GetCellContent(binchannel,0);
   fPadUsedHwAddr = hwadd;
   
-  if(ROC==0) npadRow = fMapHand->GetPadRow(hwadd);
-  else       npadRow = fMapHand->GetPadRow(hwadd)-63;
-  npad               = fMapHand->GetPad(hwadd);
-  nhw                = hwadd;
-  nmax               = (Int_t)hp->GetMaximum();
+  if(rocid==0)npadRow = fMapHand->GetPadRow(hwadd);
+  else        npadRow = fMapHand->GetPadRow(hwadd)-63;
+  npad                = fMapHand->GetPad(hwadd);
+  nhw                 = hwadd;
+  nmax                = (Int_t)hp->GetMaximum();
   
 
   TPaveText*  legstat = new TPaveText(0.18,0.65,0.3,0.8,"NDC");
 
   Int_t   connector   =  fMapHand->GetFECconnector(hwadd);
-  Int_t   FECnr       =  fMapHand->GetFECfromHw(hwadd);
-  Int_t   FECch       =  fMapHand->GetFECchannel(hwadd);
-  Int_t   Altro       =  fMapHand->GetAltro(hwadd);
-  Int_t   AltroCh     =  (fMapHand->GetAltroChannel(hwadd))%16;
-  Int_t   FECloc      =  fMapHand->U2fGetFECinRCU(FECnr) ;
-  Int_t   FEClocbran  =  fMapHand->U2fGetFECinBranch(FECnr);
-  Int_t   branch      =  fMapHand->U2fGetBranch(FECnr);
+  Int_t   fecnr       =  fMapHand->GetFECfromHw(hwadd);
+  Int_t   fecch       =  fMapHand->GetFECchannel(hwadd);
+  Int_t   altrochip   =  fMapHand->GetAltro(hwadd);
+  Int_t   altrochannel=  (fMapHand->GetAltroChannel(hwadd))%16;
+  Int_t   fecloc      =  fMapHand->U2fGetFECinRCU(fecnr) ;
+  Int_t   feclocbran  =  fMapHand->U2fGetFECinBranch(fecnr);
+  Int_t   branch      =  fMapHand->U2fGetBranch(fecnr);
 
   
   Short_t fecget      = (hwadd & AliTPCMonitorAltro::GetHwMaskFEC())   >> 7;
@@ -1441,13 +1712,13 @@ void AliTPCMonitor::ExecPad()
   Char_t nstat5[100];  Char_t nstat6[100];  Char_t nstat7[100];  Char_t nstat8[100];
   
   sprintf(nstat1,"Branch (map) \t %i (%i) \n",branchget,branch);
-  sprintf(nstat2,"Fec in patch \t %i \n",FECloc);
-  sprintf(nstat8,"Fec in branch (map)\t %i (%i)\n",fecget,FEClocbran);
+  sprintf(nstat2,"Fec in patch \t %i \n",fecloc);
+  sprintf(nstat8,"Fec in branch (map)\t %i (%i)\n",fecget,feclocbran);
   sprintf(nstat7,"Connector  \t %i \n",connector);
-  sprintf(nstat3,"Fec No.   \t %i \n",FECnr);
-  sprintf(nstat4,"Fec chan  \t %i \n",FECch);
-  sprintf(nstat5,"Altro chip\t %i \n",Altro);
-  sprintf(nstat6,"Altro chan\t %i \n",AltroCh);
+  sprintf(nstat3,"Fec No.   \t %i \n",fecnr);
+  sprintf(nstat4,"Fec chan  \t %i \n",fecch);
+  sprintf(nstat5,"Altro chip\t %i \n",altrochip);
+  sprintf(nstat6,"Altro chan\t %i \n",altrochannel);
   
   legstat->AddText(nstat1); legstat->AddText(nstat2);  legstat->AddText(nstat8);  legstat->AddText(nstat7);  
   legstat->AddText(nstat3); legstat->AddText(nstat4);  legstat->AddText(nstat5);  legstat->AddText(nstat6);
@@ -1463,9 +1734,9 @@ void AliTPCMonitor::ExecPad()
   
   if(setrange) 
     {
-      hp->GetXaxis()->SetRange(xbin_min,xbin_max);
-      hp->SetMinimum(ybin_min);
-      hp->SetMaximum(ybin_max);
+      hp->GetXaxis()->SetRange(xbinmin,xbinmax);
+      hp->SetMinimum(ybinmin);
+      hp->SetMaximum(ybinmax);
     }
   else  
     { 
@@ -1479,20 +1750,20 @@ void AliTPCMonitor::ExecPad()
   // Make Fit to peak
   if(GetPedestals() && fDisableFit==0) 
     {
-      Int_t max_x  =    (Int_t)fHistAddrMaxAdcX->GetBinContent(hwadd);
+      Int_t maxx  =    (Int_t)fHistAddrMaxAdcX->GetBinContent(hwadd);
       Float_t max  =  (Float_t)fHistAddrMaxAdc->GetBinContent(hwadd);
       Float_t base =  (Float_t)fHistAddrBaseMean->GetBinContent(hwadd);
       if(base!=0) 
        {
          if( ((max+base)/base)>1.2) 
            {
-             TF1* fg = new TF1("fg",AliTPCMonitor::Gamma4,max_x-5,max_x+5,4);
+             TF1* fg = new TF1("fg",AliTPCMonitor::Gamma4,maxx-5,maxx+5,4);
              fg->SetParName(0,"Normalisation");
              fg->SetParName(1,"Minimum");
              fg->SetParName(2,"Width");
              fg->SetParName(3,"Base");
              fg->SetParameter(0,max);
-             fg->SetParameter(1,max_x-2);
+             fg->SetParameter(1,maxx-2);
              fg->SetParameter(2,1.5);
              fg->FixParameter(3,0);
              fg->SetLineColor(4);
@@ -1528,16 +1799,16 @@ void AliTPCMonitor::ExecRow()
   if(!select)    return;
   if(!select->InheritsFrom("TH2")) {   return;  }
 
-  Int_t ROC = 0;
+  Int_t rocid = 0;
   //  Char_t namehist[50];
   Char_t rowhist[60];
-  Char_t rowhist_sum[60];
-  Char_t rowhist_max[60];
-  Char_t rowhist_xmax[60];
+  Char_t rowhistsum[60];
+  Char_t rowhistmax[60];
+  Char_t rowhistxmax[60];
   
-  sprintf(rowhist,         "hrow_time");
-  sprintf(rowhist_xmax    ,"hx_max");
-  sprintf(rowhist_max    , "hrow_max");
+  sprintf(rowhist,         "hrowtime");
+  sprintf(rowhistxmax    ,"hxmax");
+  sprintf(rowhistmax    , "hrowmax");
   
   // get position 
   Int_t   px  = gPad->GetEventX();
@@ -1547,36 +1818,36 @@ void AliTPCMonitor::ExecRow()
   Float_t y   = gPad->PadtoY(upy);
   Float_t x   = gPad->PadtoX(upx);
   
-  TCanvas*crow_time   = 0;
-  TCanvas*crow_max    = 0;
-  TCanvas*cx_max      = 0;
+  TCanvas*crowtime   = 0;
+  TCanvas*crowmax    = 0;
+  TCanvas*cxmax      = 0;
   
   TH2S*  fHistIndex  = 0;
 
   // ranges from already existing histos 
-  Int_t    row_time_xmin = 0;
-  Int_t    row_time_xmax = 0;
-  Int_t    row_time_ymin = 0;
-  Int_t    row_time_ymax = 0;
-  Float_t  row_time_zmin = 0;
-  Float_t  row_time_zmax = 0;
+  Int_t    rowtimexmin = 0;
+  Int_t    rowtimexmax = 0;
+  Int_t    rowtimeymin = 0;
+  Int_t    rowtimeymax = 0;
+  Float_t  rowtimezmin = 0;
+  Float_t  rowtimezmax = 0;
   
-  Int_t    prof_row_xmin = 0;
-  Int_t    prof_row_xmax = 0;
-  Double_t prof_row_ymin = 0;
-  Double_t prof_row_ymax = 0;
+  Int_t    profrowxmin = 0;
+  Int_t    profrowxmax = 0;
+  Double_t profrowymin = 0;
+  Double_t profrowymax = 0;
 
-  Int_t    prof_x_xmin   = 0;
-  Int_t    prof_x_xmax   = 0;
-  Double_t prof_x_ymin   = 0;
-  Double_t prof_x_ymax   = 0;
+  Int_t    profxxmin   = 0;
+  Int_t    profxxmax   = 0;
+  Double_t profxymin   = 0;
+  Double_t profxymax   = 0;
 
 
   Int_t    setrange      = 0;
 
 
-  if(     strcmp(select->GetName(),"fHistIROC")==0 || strcmp(select->GetName(),"fHistIROCRMS")==0 ) { fHistIndex = fHistIROCIndex;     ROC =1;   } 
-  else if(strcmp(select->GetName(),"fHistOROC")==0 || strcmp(select->GetName(),"fHistOROCRMS")==0 ) { fHistIndex = fHistOROCIndex;     ROC =2;   }
+  if(     strcmp(select->GetName(),"fHistIROC")==0 || strcmp(select->GetName(),"fHistIROCRMS")==0 ) { fHistIndex = fHistIROCIndex;     rocid =1;   } 
+  else if(strcmp(select->GetName(),"fHistOROC")==0 || strcmp(select->GetName(),"fHistOROCRMS")==0 ) { fHistIndex = fHistOROCIndex;     rocid =2;   }
   else                                                                                  { cout << " not implemented for this histo " << endl; return; }
   
   gPad->GetCanvas()->FeedbackMode(kTRUE);
@@ -1584,40 +1855,40 @@ void AliTPCMonitor::ExecRow()
  
 
   // check if canvases exist //
-  crow_time  = (TCanvas*)gROOT->GetListOfCanvases()->FindObject("crow_time");
-  crow_max   = (TCanvas*)gROOT->GetListOfCanvases()->FindObject("crow_max");
-  cx_max     = (TCanvas*)gROOT->GetListOfCanvases()->FindObject("cx_max");
+  crowtime  = (TCanvas*)gROOT->GetListOfCanvases()->FindObject("crowtime");
+  crowmax   = (TCanvas*)gROOT->GetListOfCanvases()->FindObject("crowmax");
+  cxmax     = (TCanvas*)gROOT->GetListOfCanvases()->FindObject("cxmax");
   
-  if(!crow_time)   crow_time   = CreateCanvas("crow_time") ;
-  if(!crow_max)    crow_max    = CreateCanvas("crow_max")  ;
-  if(!cx_max  )    cx_max      = CreateCanvas("cx_max")    ;
+  if(!crowtime)   crowtime   = CreateCanvas("crowtime") ;
+  if(!crowmax)    crowmax    = CreateCanvas("crowmax")  ;
+  if(!cxmax  )    cxmax      = CreateCanvas("cxmax")    ;
   
   // check ranges of already existing histos 
   if(gROOT->Get(rowhist)) 
     {
-      row_time_xmin  = ((TH2F*)gROOT->Get(rowhist))->GetXaxis()->GetFirst();
-      row_time_xmax  = ((TH2F*)gROOT->Get(rowhist))->GetXaxis()->GetLast();
-      row_time_ymin  = ((TH2F*)gROOT->Get(rowhist))->GetYaxis()->GetFirst();
-      row_time_ymax  = ((TH2F*)gROOT->Get(rowhist))->GetYaxis()->GetLast();
-      row_time_zmin  = ((TH2F*)gROOT->Get(rowhist))->GetMinimum();
-      row_time_zmax  = ((TH2F*)gROOT->Get(rowhist))->GetMaximum();
+      rowtimexmin  = ((TH2F*)gROOT->Get(rowhist))->GetXaxis()->GetFirst();
+      rowtimexmax  = ((TH2F*)gROOT->Get(rowhist))->GetXaxis()->GetLast();
+      rowtimeymin  = ((TH2F*)gROOT->Get(rowhist))->GetYaxis()->GetFirst();
+      rowtimeymax  = ((TH2F*)gROOT->Get(rowhist))->GetYaxis()->GetLast();
+      rowtimezmin  = ((TH2F*)gROOT->Get(rowhist))->GetMinimum();
+      rowtimezmax  = ((TH2F*)gROOT->Get(rowhist))->GetMaximum();
       
-      prof_row_xmin  = ((TH1F*)gROOT->Get(rowhist_max))->GetXaxis()->GetFirst();
-      prof_row_xmax  = ((TH1F*)gROOT->Get(rowhist_max))->GetXaxis()->GetLast();
-      prof_row_ymin  = ((TH1F*)gROOT->Get(rowhist_max))->GetMinimum();
-      prof_row_ymax  = ((TH1F*)gROOT->Get(rowhist_max))->GetMaximum();
+      profrowxmin  = ((TH1F*)gROOT->Get(rowhistmax))->GetXaxis()->GetFirst();
+      profrowxmax  = ((TH1F*)gROOT->Get(rowhistmax))->GetXaxis()->GetLast();
+      profrowymin  = ((TH1F*)gROOT->Get(rowhistmax))->GetMinimum();
+      profrowymax  = ((TH1F*)gROOT->Get(rowhistmax))->GetMaximum();
 
-      prof_x_xmin    = ((TH1F*)gROOT->Get(rowhist_xmax))->GetXaxis()->GetFirst();
-      prof_x_xmax    = ((TH1F*)gROOT->Get(rowhist_xmax))->GetXaxis()->GetLast();
-      prof_x_ymin    = ((TH1F*)gROOT->Get(rowhist_xmax))->GetMinimum();
-      prof_x_ymax    = ((TH1F*)gROOT->Get(rowhist_xmax))->GetMaximum();
+      profxxmin    = ((TH1F*)gROOT->Get(rowhistxmax))->GetXaxis()->GetFirst();
+      profxxmax    = ((TH1F*)gROOT->Get(rowhistxmax))->GetXaxis()->GetLast();
+      profxymin    = ((TH1F*)gROOT->Get(rowhistxmax))->GetMinimum();
+      profxymax    = ((TH1F*)gROOT->Get(rowhistxmax))->GetMaximum();
 
       setrange =1;
       
       delete gROOT->Get(rowhist);
-      delete gROOT->Get(rowhist_max);
-      delete gROOT->Get(rowhist_sum);
-      delete gROOT->Get("hx_max");
+      delete gROOT->Get(rowhistmax);
+      delete gROOT->Get(rowhistsum);
+      delete gROOT->Get("hxmax");
       delete gROOT->Get("legrow");
     }
   
@@ -1627,7 +1898,7 @@ void AliTPCMonitor::ExecRow()
   Int_t binchannel = (Int_t)fHistIndex->GetCellContent(testx,testy);
   
   if(binchannel>30000)    return;
-  if(binchannel<=0 ) { crow_time->Update() ;    crow_max->Update() ;    return ;  }
+  if(binchannel<=0 ) { crowtime->Update() ;    crowmax->Update() ;    return ;  }
   
   // get hwaddress 
   Int_t hwadd     = (Int_t)fHistChannelTime->GetCellContent(binchannel,0);
@@ -1636,9 +1907,9 @@ void AliTPCMonitor::ExecRow()
   Int_t numofpads =  fMapHand->GetNumofPads(row);
   
   // create histos 
-  TH2F *hrow_time = new TH2F(rowhist     , ""  ,numofpads,0,numofpads,GetTimeBins(),0.0,GetTimeBins());
-  TH1F *hrow_max  = new TH1F(rowhist_max , ""  ,numofpads,0,numofpads);
-  TH1F *hx_max    = new TH1F(rowhist_xmax, ""  ,159,0,159      );
+  TH2F *hrowtime = new TH2F(rowhist     , ""  ,numofpads,0,numofpads,GetTimeBins(),0.0,GetTimeBins());
+  TH1F *hrowmax  = new TH1F(rowhistmax , ""  ,numofpads,0,numofpads);
+  TH1F *hxmax    = new TH1F(rowhistxmax, ""  ,159,0,159      );
   
   // Row profile ///////////
   if(fVerb) cout << " Number of pads " << numofpads << endl;
@@ -1648,12 +1919,12 @@ void AliTPCMonitor::ExecRow()
       Int_t channel   = (Int_t)fHistAddrMapIndex->GetBinContent(addrinrow);
       if(channel==-1) continue;
       
-      hrow_max->SetBinContent(padnr+1,fHistAddrMaxAdc->GetBinContent(addrinrow));
+      hrowmax->SetBinContent(padnr+1,fHistAddrMaxAdc->GetBinContent(addrinrow));
       TH1D *hp = fHistChannelTime->ProjectionY("hp",channel,channel);
       for(Int_t time = 0;time<GetTimeBins();time++) {
        
        Float_t val = hp->GetBinContent(time);
-       hrow_time->SetCellContent(padnr+1,time+1,val);
+       hrowtime->SetCellContent(padnr+1,time+1,val);
       }
     }
   
@@ -1671,76 +1942,76 @@ void AliTPCMonitor::ExecRow()
        {
          hw = fMapHand->GetPadAddInRow(nrow,padnr);
          if(fPadMapHw[hw]==-1){ continue                                                      ; }
-         else                { hx_max->SetBinContent(nrow+1,fHistAddrMaxAdc->GetBinContent(hw))   ;    }
+         else                { hxmax->SetBinContent(nrow+1,fHistAddrMaxAdc->GetBinContent(hw))   ;     }
        }
     }
   
-  cx_max->cd();
-  Char_t hx_titl[50] ; sprintf(hx_titl,"max adc in pads at x=%5.1f mm",xval);
-  hx_max->SetTitle(hx_titl);
-  hx_max->SetXTitle("row");
-  if(!GetPedestals()) hx_max->SetYTitle("max adc (baseline sub.)");
-  else                hx_max->SetYTitle("max adc ");
-  hx_max->SetMinimum(0.01);
-  hx_max->Draw("l");
+  cxmax->cd();
+  Char_t hxtitle[50] ; sprintf(hxtitle,"max adc in pads at x=%5.1f mm",xval);
+  hxmax->SetTitle(hxtitle);
+  hxmax->SetXTitle("row");
+  if(!GetPedestals()) hxmax->SetYTitle("max adc (baseline sub.)");
+  else                hxmax->SetYTitle("max adc ");
+  hxmax->SetMinimum(0.01);
+  hxmax->Draw("l");
   
   if(setrange)
     {
-      hx_max->GetXaxis()->SetRange(prof_x_xmin,prof_x_xmax);
-      hx_max->SetMinimum(prof_x_ymin);
-      hx_max->SetMaximum(prof_x_ymax);
+      hxmax->GetXaxis()->SetRange(profxxmin,profxxmax);
+      hxmax->SetMinimum(profxymin);
+      hxmax->SetMaximum(profxymax);
     }
   
-  cx_max->Update();
+  cxmax->Update();
  
-  crow_time->cd();
+  crowtime->cd();
   Char_t title[256];
-  Char_t title_max[256];
-  if(ROC==1) {sprintf(title,"%s Row=%d",((TH2*)select)->GetTitle(),row)   ;    sprintf(title_max,"IROC  max/sum Row=%d",row   );} 
-  else       {sprintf(title,"%s Row=%d",((TH2*)select)->GetTitle(),row-63);    sprintf(title_max,"OROC  max/sum Row=%d",row-63);}
+  Char_t titlemax[256];
+  if(rocid==1) {sprintf(title,"%s Row=%d",((TH2*)select)->GetTitle(),row)   ;    sprintf(titlemax,"IROC  max/sum Row=%d",row   );} 
+  else         {sprintf(title,"%s Row=%d",((TH2*)select)->GetTitle(),row-63);    sprintf(titlemax,"OROC  max/sum Row=%d",row-63);}
   if(fVerb) cout << " set name " << endl;
   
 
   // row vs time
-  crow_time->cd();
-  hrow_time->SetTitleSize(0.04);
-  hrow_time->SetTitle(title);
-  hrow_time->SetYTitle("timbin");
-  hrow_time->SetXTitle("pad in row");
-  hrow_time->SetZTitle("signal (ADC)");
+  crowtime->cd();
+  hrowtime->SetTitleSize(0.04);
+  hrowtime->SetTitle(title);
+  hrowtime->SetYTitle("timbin");
+  hrowtime->SetXTitle("pad in row");
+  hrowtime->SetZTitle("signal (ADC)");
 
-  hrow_time->GetXaxis()->SetTitleColor(1);
-  hrow_time->SetMaximum(1000.0);
-  hrow_time->SetMinimum(0.0);
+  hrowtime->GetXaxis()->SetTitleColor(1);
+  hrowtime->SetMaximum(1000.0);
+  hrowtime->SetMinimum(0.0);
   
   if(setrange) 
     {
-      hrow_time->GetXaxis()->SetRange(row_time_xmin,row_time_xmax);
-      hrow_time->GetYaxis()->SetRange(row_time_ymin,row_time_ymax);
-      hrow_time->SetMinimum(row_time_zmin);
-      hrow_time->SetMaximum(row_time_zmax);
+      hrowtime->GetXaxis()->SetRange(rowtimexmin,rowtimexmax);
+      hrowtime->GetYaxis()->SetRange(rowtimeymin,rowtimeymax);
+      hrowtime->SetMinimum(rowtimezmin);
+      hrowtime->SetMaximum(rowtimezmax);
     }
 
-  hrow_time->Draw("COLZ");
-  crow_time->UseCurrentStyle();
-  crow_time->Update();
+  hrowtime->Draw("COLZ");
+  crowtime->UseCurrentStyle();
+  crowtime->Update();
 
   // max and sum /////////////////////////
-  crow_max->cd();
+  crowmax->cd();
   if(setrange) {
-    hrow_max->GetXaxis()->SetRange(prof_row_xmin,prof_row_xmax);
-    hrow_max->SetMinimum(prof_row_ymin);
-    hrow_max->SetMaximum(prof_row_ymax);
+    hrowmax->GetXaxis()->SetRange(profrowxmin,profrowxmax);
+    hrowmax->SetMinimum(profrowymin);
+    hrowmax->SetMaximum(profrowymax);
   }
-  hrow_max->SetTitleSize(0.04);
-  hrow_max->SetTitle(title);
-  hrow_max->SetYTitle("max adc");
-  hrow_max->SetXTitle("pad in row");
-  hrow_max->GetXaxis()->SetTitleColor(1);
+  hrowmax->SetTitleSize(0.04);
+  hrowmax->SetTitle(title);
+  hrowmax->SetYTitle("max adc");
+  hrowmax->SetXTitle("pad in row");
+  hrowmax->GetXaxis()->SetTitleColor(1);
 
-  hrow_max->SetLineColor(2);
-  hrow_max->Draw("l");                  
-  crow_max->Update();
+  hrowmax->SetLineColor(2);
+  hrowmax->Draw("l");                  
+  crowmax->Update();
   
   return;
 }
@@ -1757,26 +2028,26 @@ void AliTPCMonitor::Write10bitChannel()
   Int_t  row     = (Int_t)fMapHand->GetPadRow(fPadUsedHwAddr); 
   Int_t  channel = (Int_t)fPadMapHw[fPadUsedHwAddr];
   
-  Char_t filename_root[256];
-  Char_t filename_dat[256];
+  Char_t filenameroot[256];
+  Char_t filenamedat[256];
   Char_t projhist[256];
 
   if(fPadUsedRoc==1) { sprintf(projhist,"ProjectionOROC"); }
   if(fPadUsedRoc==0) { sprintf(projhist,"ProjectionIROC"); }
   
-  sprintf(filename_dat, "Channel_Run%05i_EventID_%i_Pad_%i_Row_%i.dat"      ,fRunId,fEventNumber,pad,row);
-  sprintf(filename_root,"Channel_Run%05i_EventID_%i_Pad_%i_Row_%i.root"     ,fRunId,fEventNumber,pad,row);
+  sprintf(filenamedat, "Channel_Run%05i_EventID_%i_Pad_%i_Row_%i.dat"      ,fRunId,fEventNumber,pad,row);
+  sprintf(filenameroot,"Channel_Run%05i_EventID_%i_Pad_%i_Row_%i.root"     ,fRunId,fEventNumber,pad,row);
   
   TH1D* hpr = 0; 
-  if(hpr=(TH1D*)gROOT->Get(projhist)) 
+  if((hpr=(TH1D*)gROOT->Get(projhist))) 
     {
       // root histo 
-      TFile f(filename_root,"recreate");
+      TFile f(filenameroot,"recreate");
       hpr->Write();
       f.Close();
 
       // raw singal 
-      ofstream datout(filename_dat,ios::out);
+      ofstream datout(filenamedat,ios::out);
       datout <<"Timebin \t ADC value " << endl; 
       for(Int_t i = 1; i <GetTimeBins(); i++)
        {
@@ -1800,8 +2071,8 @@ void AliTPCMonitor::ExecTransform()
 
   Char_t namecanv[256]; 
   Char_t projhist[256];
-  Char_t name_htr_imag[256];
-  Char_t name_htr_real[256];
+  Char_t namehtrimag[256];
+  Char_t namehtrreal[256];
   
   if(fPadUsedRoc==1) {    sprintf(namecanv,"coroc_ch_trans") ;    sprintf(projhist,"ProjectionOROC");  }
   if(fPadUsedRoc==0) {    sprintf(namecanv,"ciroc_ch_trans") ;    sprintf(projhist,"ProjectionIROC");  }
@@ -1812,11 +2083,11 @@ void AliTPCMonitor::ExecTransform()
   else      hproj = (TH1D*)gROOT->Get(projhist) ;
 
   
-  if(fPadUsedRoc==1) {  sprintf(name_htr_imag,"htrans_imag_freq_oroc");    sprintf(name_htr_real,"htrans_real_freq_oroc");  } 
-  else               {  sprintf(name_htr_imag,"htrans_imag_freq_iroc");    sprintf(name_htr_real,"htrans_real_freq_iroc");  }
+  if(fPadUsedRoc==1) {  sprintf(namehtrimag,"htransimagfreq_oroc");    sprintf(namehtrreal,"htransrealfreq_oroc");  } 
+  else               {  sprintf(namehtrimag,"htransimagfreq_iroc");    sprintf(namehtrreal,"htransrealfreq_iroc");  }
   
-  if( gROOT->Get(name_htr_imag))  delete  gROOT->Get(name_htr_imag);
-  if( gROOT->Get(name_htr_real))  delete  gROOT->Get(name_htr_real);
+  if( gROOT->Get(namehtrimag))  delete  gROOT->Get(namehtrimag);
+  if( gROOT->Get(namehtrreal))  delete  gROOT->Get(namehtrreal);
   
   TCanvas *ctrans = 0;
   if(!(ctrans = (TCanvas*)gROOT->GetListOfCanvases()->FindObject(namecanv))) 
@@ -1825,9 +2096,9 @@ void AliTPCMonitor::ExecTransform()
       ctrans->Divide(1,2);
     }
   
-  Int_t bin_first  =  hproj->GetXaxis()->GetFirst();
-  Int_t bin_last   =  hproj->GetXaxis()->GetLast();
-  Int_t bins       =  bin_last -bin_first +1;
+  Int_t binfirst  =  hproj->GetXaxis()->GetFirst();
+  Int_t binlast   =  hproj->GetXaxis()->GetLast();
+  Int_t bins       =  binlast -binfirst +1;
     
   Int_t power = 0;
   for(Int_t pot = 0; pot<=10 ; pot++) 
@@ -1839,27 +2110,27 @@ void AliTPCMonitor::ExecTransform()
   bins = (Int_t)TMath::Power(2,power);
   
   // sampling frequency ;
-  Double_t  delta_t = 1.0/(Float_t)GetSamplingFrequency();
+  Double_t  deltat = 1.0/(Float_t)GetSamplingFrequency();
   
   // output histo
-  TH1D* htrans_real_freq = new TH1D(name_htr_real,name_htr_real,10000,-1/(2*delta_t),1/(2*delta_t));
-  TH1D* htrans_imag_freq = new TH1D(name_htr_imag,name_htr_imag,10000,-1/(2*delta_t),1/(2*delta_t));
+  TH1D* htransrealfreq = new TH1D(namehtrreal,namehtrreal,10000,-1/(2*deltat),1/(2*deltat));
+  TH1D* htransimagfreq = new TH1D(namehtrimag,namehtrimag,10000,-1/(2*deltat),1/(2*deltat));
 
 
-  Char_t title_real[256];
-  Char_t title_imag[256];
-  if(fPadUsedRoc==1) {    sprintf(title_real,"OROC DFT real part");  sprintf(title_imag,"OROC DFT imag part");  } 
-  else {                  sprintf(title_real,"IROC DFT real part");  sprintf(title_imag,"IROC DFT imag part");  }
+  Char_t titlereal[256];
+  Char_t titleimag[256];
+  if(fPadUsedRoc==1) {    sprintf(titlereal,"OROC DFT real part");  sprintf(titleimag,"OROC DFT imag part");  } 
+  else {                  sprintf(titlereal,"IROC DFT real part");  sprintf(titleimag,"IROC DFT imag part");  }
   
-  htrans_real_freq->SetTitle(title_real);  htrans_real_freq->SetXTitle("f/hz");  htrans_real_freq->SetYTitle("z_{real}(f)");
-  htrans_imag_freq->SetTitle(title_imag);  htrans_imag_freq->SetXTitle("f/hz");  htrans_imag_freq->SetYTitle("z_{imag}(f)");
+  htransrealfreq->SetTitle(titlereal);  htransrealfreq->SetXTitle("f/hz");  htransrealfreq->SetYTitle("z_{real}(f)");
+  htransimagfreq->SetTitle(titleimag);  htransimagfreq->SetXTitle("f/hz");  htransimagfreq->SetYTitle("z_{imag}(f)");
   
   
   // create complex packed data array  
-  const Int_t datasiz = 2*bins;
-  Double_t*  data = new Double_t[datasiz];
+  const Int_t kdatasiz = 2*bins;
+  Double_t*  data = new Double_t[kdatasiz];
   for(Int_t i=0;i<2*bins;i++)  { data[i]   =  0.0;}
-  for(Int_t i=0;i<bins;i++)    { data[2*i] = (Double_t)hproj->GetBinContent(bin_first+i); }
+  for(Int_t i=0;i<bins;i++)    { data[2*i] = (Double_t)hproj->GetBinContent(binfirst+i); }
   
   // make fourier transformation
   AliTPCMonitorFFT* four = new AliTPCMonitorFFT();
@@ -1871,26 +2142,26 @@ void AliTPCMonitor::ExecTransform()
     {
       if(i<bins) 
        {
-         if(i<(bins/2))  { freq = i/(bins*delta_t)            ; } 
-         else            { freq = -1*((bins-i)/(bins*delta_t)); }
-         htrans_real_freq->Fill( freq,data[2*i]  );
-         htrans_imag_freq->Fill( freq,data[2*i+1]);
+         if(i<(bins/2))  { freq = i/(bins*deltat)            ; } 
+         else            { freq = -1*((bins-i)/(bins*deltat)); }
+         htransrealfreq->Fill( freq,data[2*i]  );
+         htransimagfreq->Fill( freq,data[2*i+1]);
          
          
        }
     }
   
   ctrans->cd(1);
-  htrans_real_freq->Draw();
+  htransrealfreq->Draw();
   ctrans->cd(2);
-  htrans_imag_freq->Draw();
+  htransimagfreq->Draw();
   ctrans->Update();
   delete four;
   delete data;
 }
 
 //__________________________________________________________________
-void AliTPCMonitor::ShowSel(Int_t* comp_val)               
+void AliTPCMonitor::ShowSel(Int_t* compval)               
 {
   
   // Show only selected components 
@@ -1898,9 +2169,9 @@ void AliTPCMonitor::ShowSel(Int_t* comp_val)
   // Than remove all not matching pads form histos 
   
   Int_t   connector   =  0;
-  Int_t   FECnr       =  0;
-  Int_t   Altro       =  0;
-  Int_t   FEClocbran  =  0;
+  Int_t   fecnr       =  0;
+  Int_t   altrochip   =  0;
+  Int_t   feclocbran  =  0;
   Int_t   branch      =  0;
   Short_t rcuget      =  0;
   Int_t   emptyI      =  1;
@@ -1912,18 +2183,18 @@ void AliTPCMonitor::ShowSel(Int_t* comp_val)
  
   
   //  restore original histos 
-  for(Int_t row = 0; row<kNRowsIroc;  row++) 
+  for(Int_t row = 0; row<fkNRowsIroc;  row++) 
     {
-    for(Int_t pad = 0; pad<kNPadsIroc;  pad++) 
+    for(Int_t pad = 0; pad<fkNPadsIroc;  pad++) 
       {
       index = (Int_t)fHistIROCIndex->GetCellContent(row+1,pad+1);
       if(index==-1)continue;
       else  fHistIROC->SetCellContent(row+1,pad+1,fHistIROCClone->GetCellContent(row+1,pad+1));
       }
     }
-  for(Int_t row = 0; row<kNRowsOroc;  row++) 
+  for(Int_t row = 0; row<fkNRowsOroc;  row++) 
     {
-      for(Int_t pad = 0; pad<kNPadsOroc;  pad++) 
+      for(Int_t pad = 0; pad<fkNPadsOroc;  pad++) 
        {
          index = (Int_t)fHistOROCIndex->GetCellContent(row+1,pad+1);
          if(index==-1)continue;
@@ -1939,10 +2210,10 @@ void AliTPCMonitor::ShowSel(Int_t* comp_val)
   Int_t npads       =0;
   Int_t subrows     =0;
   
-  for(Int_t row = 0; row< (kNRowsIroc + kNRowsOroc);  row++) 
+  for(Int_t row = 0; row< (fkNRowsIroc + fkNRowsOroc);  row++) 
     {
-      if(row<kNRowsIroc) {  fHist=fHistIROC ; fHistIndex = fHistIROCIndex; npads = kNPadsIroc; subrows =0         ;}
-      else               {  fHist=fHistOROC ; fHistIndex = fHistOROCIndex; npads = kNPadsOroc; subrows =kNRowsIroc;}
+      if(row<fkNRowsIroc) {  fHist=fHistIROC ; fHistIndex = fHistIROCIndex; npads = fkNPadsIroc; subrows =0         ;}
+      else                {  fHist=fHistOROC ; fHistIndex = fHistOROCIndex; npads = fkNPadsOroc; subrows =fkNRowsIroc;}
       
       for(Int_t pad = 0; pad<npads;  pad++) 
        {
@@ -1951,28 +2222,28 @@ void AliTPCMonitor::ShowSel(Int_t* comp_val)
          hwadd    = (Int_t)fHistChannelTime->GetCellContent(index,0);
          
          // global fecnr
-         FECnr     =  fMapHand->GetFECfromHw(hwadd);
-         if(comp_val[0]!=-1 && FECnr!=comp_val[0])      {        fHist->SetCellContent(row-subrows+1,pad+1,0);           continue;     }
+         fecnr     =  fMapHand->GetFECfromHw(hwadd);
+         if(compval[0]!=-1 && fecnr!=compval[0])      {          fHist->SetCellContent(row-subrows+1,pad+1,0);           continue;     }
          
          // rcu
          rcuget      = (hwadd & AliTPCMonitorAltro::GetHwMaskRCU())>> 12;
-         if(comp_val[1]!=-1 && rcuget!=comp_val[1])     {        fHist->SetCellContent(row-subrows+1,pad+1,0);           continue;     }
+         if(compval[1]!=-1 && rcuget!=compval[1])     {          fHist->SetCellContent(row-subrows+1,pad+1,0);           continue;     }
          
          // branch
-         branch    =  fMapHand->U2fGetBranch(FECnr) ;
-         if(comp_val[2]!=-1 && branch!=comp_val[2])     {        fHist->SetCellContent(row-subrows+1,pad+1,0);           continue;     }
+         branch    =  fMapHand->U2fGetBranch(fecnr) ;
+         if(compval[2]!=-1 && branch!=compval[2])     {          fHist->SetCellContent(row-subrows+1,pad+1,0);           continue;     }
          
          // local fec
-         FEClocbran=   fMapHand->U2fGetFECinBranch(FECnr) ;
-         if(comp_val[3]!=-1 && FEClocbran!=comp_val[3]) {        fHist->SetCellContent(row-subrows+1,pad+1,0);           continue;     }
+         feclocbran=   fMapHand->U2fGetFECinBranch(fecnr) ;
+         if(compval[3]!=-1 && feclocbran!=compval[3]) {          fHist->SetCellContent(row-subrows+1,pad+1,0);           continue;     }
          
          // connector
          connector =  fMapHand->GetFECconnector(hwadd);
-         if(comp_val[4]!=-1 && connector!=comp_val[4])  {        fHist->SetCellContent(row-subrows+1,pad+1,0);           continue;     }
+         if(compval[4]!=-1 && connector!=compval[4])  {          fHist->SetCellContent(row-subrows+1,pad+1,0);           continue;     }
          
          // Altro chip
-         Altro     =  fMapHand->GetAltro(hwadd);       
-         if(comp_val[5]!=-1 && Altro!=comp_val[5])      {        fHist->SetCellContent(row-subrows+1,pad+1,0);           continue;     }
+         altrochip     =  fMapHand->GetAltro(hwadd);   
+         if(compval[5]!=-1 && altrochip!=compval[5])      {      fHist->SetCellContent(row-subrows+1,pad+1,0);           continue;     }
          emptyI =0;
        }
     }
@@ -2047,13 +2318,13 @@ void AliTPCMonitor::ResizeCanv()
   if(gROOT->GetListOfCanvases()->FindObject(            "csum")) {    delete gROOT->GetListOfCanvases()->FindObject("csum");      }
   if(gROOT->GetListOfCanvases()->FindObject(  "ciroc_ch_trans")) {    delete gROOT->GetListOfCanvases()->FindObject("ciroc_ch_trans");}
   if(gROOT->GetListOfCanvases()->FindObject(  "coroc_ch_trans")) {    delete gROOT->GetListOfCanvases()->FindObject("coroc_ch_trans");}
-  if(gROOT->GetListOfCanvases()->FindObject(       "crow_time")) {    delete gROOT->GetListOfCanvases()->FindObject("crow_time"); }
-  if(gROOT->GetListOfCanvases()->FindObject(        "crow_max")) {    delete gROOT->GetListOfCanvases()->FindObject("crow_max");  }
-  if(gROOT->GetListOfCanvases()->FindObject(          "cx_max")) {    delete gROOT->GetListOfCanvases()->FindObject("cx_max");    }
+  if(gROOT->GetListOfCanvases()->FindObject(       "crowtime")) {    delete gROOT->GetListOfCanvases()->FindObject("crowtime"); }
+  if(gROOT->GetListOfCanvases()->FindObject(        "crowmax")) {    delete gROOT->GetListOfCanvases()->FindObject("crowmax");  }
+  if(gROOT->GetListOfCanvases()->FindObject(          "cxmax")) {    delete gROOT->GetListOfCanvases()->FindObject("cxmax");    }
   if(gROOT->GetListOfCanvases()->FindObject(        "crmsoroc")) {    delete gROOT->GetListOfCanvases()->FindObject("crmsoroc");         fExecPadOrocRms = 0;   }
   if(gROOT->GetListOfCanvases()->FindObject(        "crmsiroc")) {    delete gROOT->GetListOfCanvases()->FindObject("crmsiroc");         fExecPadIrocRms = 0;   }
-  if(gROOT->GetListOfCanvases()->FindObject(        "crow_max")) {    delete gROOT->GetListOfCanvases()->FindObject("crow_max");  }
-  if(gROOT->GetListOfCanvases()->FindObject(        "crow_max")) {    delete gROOT->GetListOfCanvases()->FindObject("crow_max");  }
+  if(gROOT->GetListOfCanvases()->FindObject(        "crowmax")) {    delete gROOT->GetListOfCanvases()->FindObject("crowmax");  }
+  if(gROOT->GetListOfCanvases()->FindObject(        "crowmax")) {    delete gROOT->GetListOfCanvases()->FindObject("crowmax");  }
 
 }
 
@@ -2120,7 +2391,7 @@ Int_t AliTPCMonitor::ExecProcess()
 }
 
 //__________________________________________________________________
-Int_t AliTPCMonitor::GetRCUPatch(Int_t runid, Int_t eqid)
+Int_t AliTPCMonitor::GetRCUPatch(Int_t runid, Int_t eqid) const
 {
   
   // Return RCU patch index for given equipment id eqid 
@@ -2151,7 +2422,7 @@ Int_t AliTPCMonitor::GetRCUPatch(Int_t runid, Int_t eqid)
 }
 
 //__________________________________________________________________
-void AliTPCMonitor::DumpHeader(AliRawReaderRoot * fReaderROOT)
+void AliTPCMonitor::DumpHeader(AliRawReaderRoot * fReaderROOT) const
 {
   // Dump Event header for ROOT format
   
@@ -2164,17 +2435,17 @@ void AliTPCMonitor::DumpHeader(AliRawReaderRoot * fReaderROOT)
 }
 
 //__________________________________________________________________
-void AliTPCMonitor::DumpHeader(AliTPCMonitorDateFormat* DateForm)
+void AliTPCMonitor::DumpHeader(AliTPCMonitorDateFormat* dateform) const
 {
   // Dump Event header for DATE format
   
-  cout << "EquipmentHeader : DateForm->GetEquipmentSize()               :" << DateForm->GetEquipmentSize()          << endl;
-  cout << "EquipmentHeader : DateForm->GetEquipmentType()               :" << DateForm->GetEquipmentType()          << endl;
-  cout << "EquipmentHeader : DateForm->GetEquipmentID()                 :" << DateForm->GetEquipmentID()            << endl;
-  cout << "EquipmentHeader : DateForm->GetEquipmentTypeAttribute()      :" << DateForm->GetEquipmentTypeAttribute() << endl;
-  cout << "EquipmentHeader : DateForm->GetEquipmentBasicSize()          :" << DateForm->GetEquipmentBasicSize()     << endl;
-  cout << "EquipmentHeader : DateForm->GetEquipmentHeaderSize()         :" << DateForm->GetEquipmentHeaderSize()    << endl;
-  cout << "EquipmentHeader : DateForm->IsLastSubEventHeader()           :" << DateForm->IsLastSubEventHeader()      << endl;
+  cout << "EquipmentHeader : dateform->GetEquipmentSize()               :" << dateform->GetEquipmentSize()          << endl;
+  cout << "EquipmentHeader : dateform->GetEquipmentType()               :" << dateform->GetEquipmentType()          << endl;
+  cout << "EquipmentHeader : dateform->GetEquipmentID()                 :" << dateform->GetEquipmentID()            << endl;
+  cout << "EquipmentHeader : dateform->GetEquipmentTypeAttribute()      :" << dateform->GetEquipmentTypeAttribute() << endl;
+  cout << "EquipmentHeader : dateform->GetEquipmentBasicSize()          :" << dateform->GetEquipmentBasicSize()     << endl;
+  cout << "EquipmentHeader : dateform->GetEquipmentHeaderSize()         :" << dateform->GetEquipmentHeaderSize()    << endl;
+  cout << "EquipmentHeader : dateform->IsLastSubEventHeader()           :" << dateform->IsLastSubEventHeader()      << endl;
 }
 
 //__________________________________________________________________
@@ -2225,9 +2496,9 @@ TCanvas* AliTPCMonitor::CreateCanvas(Char_t* name)
   else if(strcmp(name,"coroc_ch_trans")==0) {    canv   = new TCanvas("coroc_ch_trans","coroc_ch_trans",(Int_t)(3.0*xspace+xoffset),(Int_t)(yspace+0.5*ysize),(Int_t)(1.5*xsize),(Int_t)(1.5*ysize)); return canv;  }
   else if(strcmp(name,"ciroc_ch_trans")==0) {    canv   = new TCanvas("ciroc_ch_trans","ciroc_ch_trans",(Int_t)(3.0*xspace+xoffset),                       0 ,(Int_t)(1.5*xsize),(Int_t)(1.5*ysize)); return canv;  }
   // row profile histograms
-  else if(strcmp(name,"crow_time"     )==0) {    canv   = new TCanvas("crow_time"     ,"crow_time"  ,              1*xspace+xoffset,         2*yspace +ysize ,(Int_t)(1.0*xsize),(Int_t)(1.0*ysize)); return canv;  }
-  else if(strcmp(name,"crow_max"      )==0) {    canv   = new TCanvas("crow_max"      ,"crow_max"   ,              2*xspace+xoffset,         2*yspace +ysize ,(Int_t)(1.0*xsize),(Int_t)(1.0*ysize)); return canv;  }
-  else if(strcmp(name,"cx_max"        )==0) {    canv   = new TCanvas("cx_max"        ,"cx_max"     ,              3*xspace+xoffset,         2*yspace +ysize ,(Int_t)(1.0*xsize),(Int_t)(1.0*ysize)); return canv;  }
+  else if(strcmp(name,"crowtime"     )==0) {    canv   = new TCanvas("crowtime"     ,"crowtime"  ,              1*xspace+xoffset,         2*yspace +ysize ,(Int_t)(1.0*xsize),(Int_t)(1.0*ysize)); return canv;  }
+  else if(strcmp(name,"crowmax"      )==0) {    canv   = new TCanvas("crowmax"      ,"crowmax"   ,              2*xspace+xoffset,         2*yspace +ysize ,(Int_t)(1.0*xsize),(Int_t)(1.0*ysize)); return canv;  }
+  else if(strcmp(name,"cxmax"        )==0) {    canv   = new TCanvas("cxmax"        ,"cxmax"     ,              3*xspace+xoffset,         2*yspace +ysize ,(Int_t)(1.0*xsize),(Int_t)(1.0*ysize)); return canv;  }
   else                                      {    cout   << " Warning Canvas name unknown "  << endl;                                                                                                  return 0   ;  }
 }
 
@@ -2272,7 +2543,7 @@ TH1* AliTPCMonitor::GetHisto(char* histname)
     {
       hist = (TH1*)fHistList->FindObject(histname);
     }
-  else
+  else 
     {
       cout << " AliTPCMonitor::GetHisto :: Can not find histo with name " << histname << endl;
     }