]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Coding violation reduction (Stefan)
authormarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 30 Oct 2007 13:21:04 +0000 (13:21 +0000)
committermarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 30 Oct 2007 13:21:04 +0000 (13:21 +0000)
17 files changed:
TPC/AliTPCMonitor.cxx
TPC/AliTPCMonitor.h
TPC/AliTPCMonitorAltro.cxx
TPC/AliTPCMonitorAltro.h
TPC/AliTPCMonitorConfig.cxx
TPC/AliTPCMonitorConfig.h
TPC/AliTPCMonitorDateFile.cxx
TPC/AliTPCMonitorDateFile.h
TPC/AliTPCMonitorDateFormat.cxx
TPC/AliTPCMonitorDateFormat.h
TPC/AliTPCMonitorDateMonitor.h
TPC/AliTPCMonitorDialog.cxx
TPC/AliTPCMonitorDialog.h
TPC/AliTPCMonitorFFT.cxx
TPC/AliTPCMonitorFFT.h
TPC/AliTPCMonitorMappingHandler.cxx
TPC/AliTPCMonitorMappingHandler.h

index 4763d1a7c2ff3fbc37e729c866ab0c61fb9af99a..dcaea80f37125ceab9634ea5de8b4d0e5399478a 100755 (executable)
@@ -15,6 +15,9 @@
 
 /*
 $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
 
@@ -24,24 +27,24 @@ New TPC monitoring package from Stefan Kniege. The monitoring package can be sta
 */   
 
 ////////////////////////////////////////////////////////////////////////
-//
-// 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
-//       
-//
+////
+//// 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
+////       
+////
 /////////////////////////////////////////////////////////////////////////
 
  
@@ -1829,10 +1832,10 @@ void AliTPCMonitor::ExecRow()
   Float_t  rowtimezmin = 0;
   Float_t  rowtimezmax = 0;
   
-  Int_t    prof_rowxmin = 0;
-  Int_t    prof_rowxmax = 0;
-  Double_t prof_rowymin = 0;
-  Double_t prof_rowymax = 0;
+  Int_t    profrowxmin = 0;
+  Int_t    profrowxmax = 0;
+  Double_t profrowymin = 0;
+  Double_t profrowymax = 0;
 
   Int_t    profxxmin   = 0;
   Int_t    profxxmax   = 0;
@@ -1870,10 +1873,10 @@ void AliTPCMonitor::ExecRow()
       rowtimezmin  = ((TH2F*)gROOT->Get(rowhist))->GetMinimum();
       rowtimezmax  = ((TH2F*)gROOT->Get(rowhist))->GetMaximum();
       
-      prof_rowxmin  = ((TH1F*)gROOT->Get(rowhistmax))->GetXaxis()->GetFirst();
-      prof_rowxmax  = ((TH1F*)gROOT->Get(rowhistmax))->GetXaxis()->GetLast();
-      prof_rowymin  = ((TH1F*)gROOT->Get(rowhistmax))->GetMinimum();
-      prof_rowymax  = ((TH1F*)gROOT->Get(rowhistmax))->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();
 
       profxxmin    = ((TH1F*)gROOT->Get(rowhistxmax))->GetXaxis()->GetFirst();
       profxxmax    = ((TH1F*)gROOT->Get(rowhistxmax))->GetXaxis()->GetLast();
@@ -1996,9 +1999,9 @@ void AliTPCMonitor::ExecRow()
   // max and sum /////////////////////////
   crowmax->cd();
   if(setrange) {
-    hrowmax->GetXaxis()->SetRange(prof_rowxmin,prof_rowxmax);
-    hrowmax->SetMinimum(prof_rowymin);
-    hrowmax->SetMaximum(prof_rowymax);
+    hrowmax->GetXaxis()->SetRange(profrowxmin,profrowxmax);
+    hrowmax->SetMinimum(profrowymin);
+    hrowmax->SetMaximum(profrowymax);
   }
   hrowmax->SetTitleSize(0.04);
   hrowmax->SetTitle(title);
@@ -2167,7 +2170,7 @@ void AliTPCMonitor::ShowSel(Int_t* compval)
   
   Int_t   connector   =  0;
   Int_t   fecnr       =  0;
-  Int_t   altrochip       =  0;
+  Int_t   altrochip   =  0;
   Int_t   feclocbran  =  0;
   Int_t   branch      =  0;
   Short_t rcuget      =  0;
@@ -2388,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 
index 6faf2e279ebe5ba1fd0488c51ada4fbab831e182..2125334e072af13235b0e34d943908fbc224ef8f 100755 (executable)
@@ -9,16 +9,16 @@
 
 
 ////////////////////////////////////////////////////////////////////////
-//
-// AliTPCMonitor class
-// 
-// Main class for the TPC raw data Monitor.
-// The Monitor can handle rootified data, files and online streams in DATE format.
-// The monitor GUI is started by the macro TPCMonitor.C
-// 
-// Author: Stefan Kniege, IKF, Frankfurt
-//       
-//
+////
+//// AliTPCMonitor class
+//// 
+//// Main class for the TPC raw data Monitor.
+//// The Monitor can handle rootified data, files and online streams in DATE format.
+//// The monitor GUI is started by the macro TPCMonitor.C
+//// 
+//// Author: Stefan Kniege, IKF, Frankfurt
+////       
+////
 /////////////////////////////////////////////////////////////////////////
 
 #include "AliTPCMonitorConfig.h"
@@ -68,14 +68,14 @@ class AliTPCMonitor : public AliTPCMonitorConfig {
     void          ExecTransform();
     
     void          FillGlobal(Int_t sector);
-    void          FillHistsDecode( AliTPCMonitorAltro* altro , Int_t rcu_patch, Int_t id=0);
+    void          FillHistsDecode( AliTPCMonitorAltro* altro , Int_t rcupatch, Int_t secid=0);
     void          FillHistsPadPlane();
     
     static double Gamma4(double* x, double* par);
     Int_t         GetChannelsProc()  const  { return fChannelIter     ;}
     Int_t         GetEventID()       const  { return fEventNumber     ;}
     TH1*          GetHisto(char* histname);
-    Int_t         GetRCUPatch(Int_t runid, Int_t eqid);
+    Int_t         GetRCUPatch(Int_t runid, Int_t eqid) const;
     
     Int_t         GetPadAtX(Float_t xval, Int_t row, Int_t padmax) const ;                            
     Int_t         GetPadAtX(Float_t xval, Int_t row) const ;                                          
@@ -89,7 +89,7 @@ class AliTPCMonitor : public AliTPCMonitorConfig {
     void          SetMirror(Int_t val)      { fMirror=val;}
     void          SetVerbose(Int_t val)     { fVerb = val;}
     void          SetMappingHandler(AliTPCMonitorMappingHandler* val ) { fMapHand  = val;}
-    void          ShowSel(Int_t* comp_val);
+    void          ShowSel(Int_t* compval);
     void          SetEqIds();
     
     void          ResizeCanv();
index 9e74513f23511c8db2859f7c812a793032228ab0..176cbdbbc5f82e6b7b6e0884f90219b229b6b69d 100755 (executable)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.2  2007/10/12 13:36:27  cvetan
+Coding convention fixes from Stefan
+
 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.
 
@@ -39,7 +42,7 @@ New TPC monitoring package from Stefan Kniege. The monitoring package can be sta
 #include "AliTPCMonitorAltro.h"
 #include "AliLog.h" 
 #include <Riostream.h>
-
+using namespace std;
 ClassImp(AliTPCMonitorAltro)  
 
 //_____________________________________________________________________________________________
@@ -149,7 +152,7 @@ void AliTPCMonitorAltro::Allocate10BitArray()
   // Create array for 10 bit decoded data
   fallocate10BitArray = true;
   f10BitArray = new Short_t[Get10BitArraySize()];
-}
+} 
 
 //_____________________________________________________________________________________________
 long long *AliTPCMonitorAltro::Get40BitArray() 
@@ -165,19 +168,19 @@ Short_t *AliTPCMonitorAltro::Get10BitArray()
   return f10BitArray;
 }
 
-//_____________________________________________________________________________________________
-Int_t AliTPCMonitorAltro::Get40BitArraySize() 
-{
-  // Return number of 40 bit words in payload 
-  return fmemory[fsize-1];
-}
+// //_____________________________________________________________________________________________
+// Int_t AliTPCMonitorAltro::Get40BitArraySize() 
+// {
+//   // Return number of 40 bit words in payload 
+//   return fmemory[fsize-1];
+// }
 
-//_____________________________________________________________________________________________
-Int_t AliTPCMonitorAltro::Get10BitArraySize() 
-{ 
-  // Return number of 10 bit words in payload 
-  return fmemory[fsize-1]*4;
-}
+// //_____________________________________________________________________________________________
+// Int_t AliTPCMonitorAltro::Get10BitArraySize() 
+// 
+//   // Return number of 10 bit words in payload 
+//   return fmemory[fsize-1]*4;
+// }
 
 //_____________________________________________________________________________________________
 void AliTPCMonitorAltro::Decodeto40Bit() 
index 3d32ec13e26e869963f3e12fa461e62325d08ec2..3adb98618712b316504c8fa307c7c4e35bf0c571 100755 (executable)
@@ -35,9 +35,9 @@ class AliTPCMonitorAltro : public TNamed {
     Int_t        DecodeTrailer(Int_t pos);
 
     Long64_t*    Get40BitArray();
-    Short_t     *Get10BitArray();
-    Int_t        Get40BitArraySize(); 
-    Int_t        Get10BitArraySize();  
+    Short_t     *Get10BitArray();     
+    Int_t        Get40BitArraySize()     const { return fmemory[fsize-1];}  
+    Int_t        Get10BitArraySize()     const { return fmemory[fsize-1]*4;}  
     Char_t*      GetActFileName()        const { return ffilename;}
     
     static Int_t GetHwMaskFEC()                { return fgkHwMaskFEC;}
index f061a3f344e24061e2e0fa2b8a7262dcc3931c6b..e675358aa896eee67f5d28dbc9d293aa958d8e85 100755 (executable)
 
 /*
 $Log$
+Revision 1.2  2007/10/12 13:36:27  cvetan
+Coding convention fixes from Stefan
+
 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.
 
 */ 
 
-////////////////////////////////////////////////////////////////////////
-//
-// AliTPCMonitorConfig class
-//
-// Configuration handler class for AliTPCMonitor
-//
-// The basic configuration will be read from the file AliTPCMonitorConfig.txt
-// and can be changed online via the Button "Conf. Ranges"
-// Basic configuration settings are e.g. the range for the determination 
-// of the baseline, maximum adc value and the settings for the pedestal calculation.
-// 
-// Author: Stefan Kniege, IKF, Frankfurt
-//       
-//
+//////////////////////////////////////////////////////////////////////////
+////
+//// AliTPCMonitorConfig class
+////
+//// Configuration handler class for AliTPCMonitor
+////
+//// The basic configuration will be read from the file AliTPCMonitorConfig.txt
+//// and can be changed online via the Button "Conf. Ranges"
+//// Basic configuration settings are e.g. the range for the determination 
+//// of the baseline, maximum adc value and the settings for the pedestal calculation.
+//// 
+//// Author: Stefan Kniege, IKF, Frankfurt
+////       
+////
 /////////////////////////////////////////////////////////////////////////
 
 
@@ -86,7 +89,7 @@ AliTPCMonitorConfig::AliTPCMonitorConfig(const Char_t* name, const Char_t* title
   fTimeBins(1024),
   fMaxHwAddr(24000),
   fFitPulse(1),
-  fProcOneSector(1)
+  fProcOneSector(0)
 {
   // Constructor 
   for(Int_t i =0; i<36; i++) { fSectorArr[i]  =  0;}
index d0e56fcf50ea72d7fbd682a4fbe1977f7577072d..bc2b8714f0330e2b342ee6f5ab72f08b710fd53b 100755 (executable)
@@ -6,15 +6,18 @@
 
 /* $Id$ */
 
-////////////////////////////////////////////////////////////////////////
-//
-// AliTPCMonitorConfig class
-//
-// Configuration handler class for AliTPCMonitor
-// 
-// Author: Stefan Kniege, IKF, Frankfurt
-//       
-//
+//////////////////////////////////////////////////////////////////////////
+////
+//// AliTPCMonitorConfig class
+////
+//// Configuration handler class for AliTPCMonitor.
+//// The class reads and stores basic configurations
+//// for the AliTPCMonitor class. The values can be changed
+//// online or written to the configuration file  AliTPCMonitorConfig.txt 
+//// 
+//// Author: Stefan Kniege, IKF, Frankfurt
+////       
+////
 /////////////////////////////////////////////////////////////////////////
 
 #include "TNamed.h" 
index f0fad1cc59bd1c137f8ace81372be96e259f8f21..8f209dcbd7faeef0dc027dbb597ff1d5dabbc739 100755 (executable)
 
 /*
 $Log$
+Revision 1.2  2007/10/12 13:36:27  cvetan
+Coding convention fixes from Stefan
+
 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.
 
 */ 
 
 ////////////////////////////////////////////////////////////////////////
-//
-// AliTPCMonitorDateFile class
-// 
-// Class for handling the data structure in a DATE file
-// Used to read DATE files for the TPC raw data Monitor 
-//
-// Author: Roland Bramm
-//         Stefan Kniege, IKF, Frankfurt
-//       
-//
+////
+//// AliTPCMonitorDateFile class
+//// 
+//// Class for handling the data structure in a DATE file
+//// Used to read DATE files for the TPC raw data Monitor 
+////
+//// Author: Roland Bramm
+////         Stefan Kniege, IKF, Frankfurt
+////       
+////
 /////////////////////////////////////////////////////////////////////////
 
 
@@ -149,7 +152,7 @@ void AliTPCMonitorDateFile::SetFileSize()
 }
 
 //____________________________________________________________________________
-Int_t AliTPCMonitorDateFile::GetFileSize() 
+Int_t AliTPCMonitorDateFile::GetFileSize() const
 {
   // Return size of DATE file
   return ffileSize;
@@ -172,14 +175,14 @@ void AliTPCMonitorDateFile::ReadEvent()
          
          fin->read((Char_t*)fmem,sfmem);
                fin->seekg(ffilePos);
-               AliTPCMonitorDateFormat *DateForm;
-               DateForm = new AliTPCMonitorDateFormat((Char_t *)&fmem);
+               AliTPCMonitorDateFormat *dateform;
+               dateform = new AliTPCMonitorDateFormat((Char_t *)&fmem);
                
 
          
-               toSwapEndian = DateForm->IsEventWrongEndian();
+               toSwapEndian = dateform->IsEventWrongEndian();
                if(toSwapEndian == true){
-                       delete DateForm;
+                       delete dateform;
                        for(Int_t i = 0; i < 68; i++) {
                                swapcarry[0] = fmem[(i*4)+0];
                                swapcarry[1] = fmem[(i*4)+1];
@@ -190,9 +193,9 @@ void AliTPCMonitorDateFile::ReadEvent()
                                fmem[(i*4)+2] = swapcarry[1];
                                fmem[(i*4)+3] = swapcarry[0];
                        }
-                       DateForm = new AliTPCMonitorDateFormat((Char_t *)&fmem);
+                       dateform = new AliTPCMonitorDateFormat((Char_t *)&fmem);
                }
-               size = DateForm->GetEventSize();
+               size = dateform->GetEventSize();
                if(size > GetAllocatedSizeofArray()) {
                  AllocateArray((Int_t)(size*1.1));
                }
@@ -214,14 +217,14 @@ void AliTPCMonitorDateFile::ReadEvent()
                }else{
                  freadPosOverflow = true;
                }
-               delete DateForm;
+               delete dateform;
        }else{
          freadPosOverflow = true;
        }
 }
 
 //____________________________________________________________________________
-Bool_t AliTPCMonitorDateFile::IsLastEvent() 
+Bool_t AliTPCMonitorDateFile::IsLastEvent() const
 {
   // Check if event is last event in file
   Bool_t retval;
@@ -233,7 +236,7 @@ Bool_t AliTPCMonitorDateFile::IsLastEvent()
 }
 
 //____________________________________________________________________________
-Bool_t AliTPCMonitorDateFile::IsEventValid()
+Bool_t AliTPCMonitorDateFile::IsEventValid() const
 {
   // Check Over flow flag 
   Bool_t retval;
@@ -245,14 +248,14 @@ Bool_t AliTPCMonitorDateFile::IsEventValid()
 }
 
 //____________________________________________________________________________
-Int_t AliTPCMonitorDateFile::GetFilePosition() 
+Int_t AliTPCMonitorDateFile::GetFilePosition() const
 {
   // Return current position in file
   return ffilePos;
 }
 
 //____________________________________________________________________________
-Int_t AliTPCMonitorDateFile::GetAllocatedSizeofArray() 
+Int_t AliTPCMonitorDateFile::GetAllocatedSizeofArray() const
 {
   // Return size of allocated data array
   return fbigMemsize;
index 0ab1355c8ca16a71d8520d7ce2e5ac1052dfe96e..d820b18457120357ccc3b8340e59e83683c497a5 100755 (executable)
@@ -8,15 +8,15 @@
 
 
 ////////////////////////////////////////////////////////////////////////
-//
-// AliTPCMonitorDateFile class
-// 
-// Class for handling the data structure in a DATE file
-// 
-// Authors: Roland Bramm
-//          Stefan Kniege, IKF, Frankfurt
-//       
-//
+////
+//// AliTPCMonitorDateFile class
+//// 
+//// Class for handling the data structure in a DATE file
+//// 
+//// Authors: Roland Bramm
+////          Stefan Kniege, IKF, Frankfurt
+////       
+////
 /////////////////////////////////////////////////////////////////////////
 
 
@@ -26,7 +26,7 @@
 using namespace std;
 
 class AliTPCMonitorDateFile : public TNamed {
-       public:
+       public: 
        AliTPCMonitorDateFile();
        AliTPCMonitorDateFile(const  AliTPCMonitorDateFile &datefile);
        AliTPCMonitorDateFile& operator= (const AliTPCMonitorDateFile& datefile);
@@ -35,13 +35,13 @@ class AliTPCMonitorDateFile : public TNamed {
        void    AllocateArray(int size);
        void    CloseDateFile();
        
-       Int_t   GetAllocatedSizeofArray();
-       Int_t   GetFileSize(); 
-       Int_t   GetFilePosition();
+       Int_t   GetAllocatedSizeofArray() const;
+       Int_t   GetFileSize() const
+       Int_t   GetFilePosition() const;
        Char_t* GetMemoryPointer();
        
-       Bool_t  IsLastEvent();
-       Bool_t  IsEventValid();
+       Bool_t  IsLastEvent() const;
+       Bool_t  IsEventValid() const;
        
        Bool_t  IsDateFileOpen();
        void    OpenDateFile(string name);
index 782a43a27c9bbc650784bef6cab619f1e5b5eeb3..968ad82bc9e55a8cbf97b73abc9bdd43a525c867 100755 (executable)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*
+/* 
 $Log$
+Revision 1.3  2007/10/12 13:36:27  cvetan
+Coding convention fixes from Stefan
+
 Revision 1.2  2007/09/17 16:34:54  cvetan
 The package was overwriting the rootcint flags. This was fixed by applying the necessary changes in the DATE-dependent parts of the code
 
@@ -25,15 +28,16 @@ New TPC monitoring package from Stefan Kniege. The monitoring package can be sta
 
 
 ////////////////////////////////////////////////////////////////////////
-//
-// AliTPCMonitorDateFormat class
-//
-// Class for decoding raw data headers in DATE format
-// Reads event and subevent header informations form DATE files
-// 
-// Authors: Roland Bramm, 
-//          Stefan Kniege, IKF, Frankfurt
-//       
+////
+//// AliTPCMonitorDateFormat class
+////
+//// Class for decoding raw data headers in DATE format
+////
+//// Reads event and subevent header informations form DATE files
+//// 
+//// Authors: Roland Bramm, 
+////          Stefan Kniege, IKF, Frankfurt
+////       
 /////////////////////////////////////////////////////////////////////////
 
 #include "AliTPCMonitorDateFormat.h"
@@ -45,9 +49,9 @@ AliTPCMonitorDateFormat::AliTPCMonitorDateFormat(Char_t* data):
   fdataPtr(data),
   fsubEventPtr(data),
   fcurrentPtr(data),
-  event((struct eventHeaderStruct*) fdataPtr),
-  subEvent(0),
-  equipment(0)
+  fevent((struct eventHeaderStruct*) fdataPtr),
+  fsubEvent(0),
+  fequipment(0)
 {
   // Constructor
 }
@@ -59,9 +63,9 @@ AliTPCMonitorDateFormat::AliTPCMonitorDateFormat(const AliTPCMonitorDateFormat &
   fdataPtr(dateformat.fdataPtr),
   fsubEventPtr(dateformat.fsubEventPtr),
   fcurrentPtr(dateformat.fcurrentPtr),
-  event((struct eventHeaderStruct*)dateformat.fdataPtr),
-  subEvent(dateformat.subEvent),
-  equipment(dateformat.equipment)
+  fevent((struct eventHeaderStruct*)dateformat.fdataPtr),
+  fsubEvent(dateformat.fsubEvent),
+  fequipment(dateformat.fequipment)
 {
   // copy constructor
 }
@@ -76,9 +80,9 @@ AliTPCMonitorDateFormat &AliTPCMonitorDateFormat:: operator= (const AliTPCMonito
       fdataPtr=dateformat.fdataPtr;
       fsubEventPtr=dateformat.fsubEventPtr;
       fcurrentPtr=dateformat.fcurrentPtr;
-      event=dateformat.event;
-      subEvent=dateformat.subEvent;
-      equipment=dateformat.equipment;
+      fevent=dateformat.fevent;
+      fsubEvent=dateformat.fsubEvent;
+      fequipment=dateformat.fequipment;
     }
   return *this;
 }
@@ -90,81 +94,81 @@ AliTPCMonitorDateFormat::~AliTPCMonitorDateFormat()
 }
 
 //____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetEventSize()
+Int_t AliTPCMonitorDateFormat::GetEventSize()const
 {
   // Return event size
-  return (Int_t)event->eventSize;
+  return (Int_t)fevent->eventSize;
 }
 
 //____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetEventHeaderSize()
+Int_t AliTPCMonitorDateFormat::GetEventHeaderSize()const
 {
   // Return event header size
-  return (Int_t)event->eventHeadSize;
+  return (Int_t)fevent->eventHeadSize;
 }
 
 //____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetEventHeaderBaseSize()
+Int_t AliTPCMonitorDateFormat::GetEventHeaderBaseSize()const
 {
   // Return event header base size
        return (Int_t)EVENT_HEAD_BASE_SIZE;
 }
 
 //____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetEventID()
+Int_t AliTPCMonitorDateFormat::GetEventID()const
 {
   // Return event ID
-  return (Int_t)EVENT_ID_GET_NB_IN_RUN(event->eventId);
+  return (Int_t)EVENT_ID_GET_NB_IN_RUN(fevent->eventId);
 }
 
 //____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetEventLDC()
+Int_t AliTPCMonitorDateFormat::GetEventLDC()const
 {
   // Return event LDC
-  return (Int_t)event->eventLdcId;
+  return (Int_t)fevent->eventLdcId;
 }
 
 //____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetEventGDC()
+Int_t AliTPCMonitorDateFormat::GetEventGDC()const
 {
   // return event GDC
-  return (Int_t)event->eventGdcId;
+  return (Int_t)fevent->eventGdcId;
 }
 
 //____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetEventRunID()
+Int_t AliTPCMonitorDateFormat::GetEventRunID()const
 {
   // Return run ID
-  return (Int_t)event->eventRunNb;
+  return (Int_t)fevent->eventRunNb;
 }
 
 //____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetEventVersion()
+Int_t AliTPCMonitorDateFormat::GetEventVersion()const
 {
   // Return event version
-  return (Int_t)event->eventVersion;
+  return (Int_t)fevent->eventVersion; 
 }
 
 //____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetEventVersionMajor()
+Int_t AliTPCMonitorDateFormat::GetEventVersionMajor()const
 {
   // retrun event version (16-32 bit)
   return (Int_t)(GetEventVersion()>>16);
 }
 
 //____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetEventVersionMinor()
+Int_t AliTPCMonitorDateFormat::GetEventVersionMinor()const
 {
   // return event version (0-15 bit)
   return (Int_t)(GetEventVersion()&0x0000ffff);
 }
 
 //____________________________________________________________________________
-Bool_t AliTPCMonitorDateFormat::IsEventSuperEvent()
+Bool_t AliTPCMonitorDateFormat::IsEventSuperEvent()const
 {
   // Check if event ist super event
   Bool_t retval;
-  if(TEST_SYSTEM_ATTRIBUTE( event->eventTypeAttribute, ATTR_SUPER_EVENT ) == 1)
+  if(TEST_SYSTEM_ATTRIBUTE( fevent->eventTypeAttribute, ATTR_SUPER_EVENT ) == 1)
     retval = true;
   else
     retval = false;
@@ -172,11 +176,11 @@ Bool_t AliTPCMonitorDateFormat::IsEventSuperEvent()
 }
 
 //____________________________________________________________________________
-Bool_t AliTPCMonitorDateFormat::IsEventStartOfRun()
+Bool_t AliTPCMonitorDateFormat::IsEventStartOfRun()const
 {
   // Check if event ist Start of Run
   Bool_t retval;
-  if(event->eventType == START_OF_RUN)
+  if(fevent->eventType == START_OF_RUN)
     retval = true;
   else
     retval = false;
@@ -184,11 +188,11 @@ Bool_t AliTPCMonitorDateFormat::IsEventStartOfRun()
 }
 
 //____________________________________________________________________________
-Bool_t AliTPCMonitorDateFormat::IsEventEndOfRun()
+Bool_t AliTPCMonitorDateFormat::IsEventEndOfRun()const
 {
   // Check if event is End of Run
   Bool_t retval;
-  if(event->eventType == END_OF_RUN)
+  if(fevent->eventType == END_OF_RUN)
     retval = true;
   else
     retval = false;
@@ -196,11 +200,11 @@ Bool_t AliTPCMonitorDateFormat::IsEventEndOfRun()
 }
 
 //____________________________________________________________________________
-Bool_t AliTPCMonitorDateFormat::IsEventPhysicsEvent()
+Bool_t AliTPCMonitorDateFormat::IsEventPhysicsEvent()const
 {
   // Check if event is Physics event
   Bool_t retval;
-  if(event->eventType == PHYSICS_EVENT)
+  if(fevent->eventType == PHYSICS_EVENT)
     retval = true;
   else
     retval = false;
@@ -208,11 +212,11 @@ Bool_t AliTPCMonitorDateFormat::IsEventPhysicsEvent()
 }
 
 //____________________________________________________________________________
-Bool_t AliTPCMonitorDateFormat::IsEventSwapped()
+Bool_t AliTPCMonitorDateFormat::IsEventSwapped()const
 {
   // Check if event is swapped
   Bool_t retval;
-  if(TEST_SYSTEM_ATTRIBUTE( event->eventTypeAttribute, ATTR_EVENT_SWAPPED ) == 1)
+  if(TEST_SYSTEM_ATTRIBUTE( fevent->eventTypeAttribute, ATTR_EVENT_SWAPPED ) == 1)
     retval = true;
   else
     retval = false;
@@ -220,11 +224,11 @@ Bool_t AliTPCMonitorDateFormat::IsEventSwapped()
 }
 
 //____________________________________________________________________________
-Bool_t AliTPCMonitorDateFormat::IsEventWrongEndian()
+Bool_t AliTPCMonitorDateFormat::IsEventWrongEndian()const
 {
   // Check endian  
   Bool_t retval;
-  if(EVENT_MAGIC_NUMBER == event->eventMagic)
+  if(EVENT_MAGIC_NUMBER == fevent->eventMagic)
     retval = false;
   else
     retval = true;
@@ -238,10 +242,10 @@ void AliTPCMonitorDateFormat::GotoSubEventHeader()
   // Set subevent Pointer to sub event
   if(IsEventSuperEvent() ==true){
     fsubEventPtr = fdataPtr+GetEventHeaderSize();
-    subEvent = (struct eventHeaderStruct*) (fsubEventPtr);
+    fsubEvent = (struct eventHeaderStruct*) (fsubEventPtr);
   }else{
     fsubEventPtr = fdataPtr;
-               subEvent = (struct eventHeaderStruct*) (fsubEventPtr);
+               fsubEvent = (struct eventHeaderStruct*) (fsubEventPtr);
   }
 }
 
@@ -250,11 +254,11 @@ void AliTPCMonitorDateFormat::GotoNextSubEventHeader()
 {
   // set subevent pointer to next  sub event 
   fsubEventPtr += GetSubEventSize();
-  subEvent = (struct eventHeaderStruct*) (fsubEventPtr);
+  fsubEvent = (struct eventHeaderStruct*) (fsubEventPtr);
 }
 
 //____________________________________________________________________________
-Bool_t AliTPCMonitorDateFormat::IsLastSubEventHeader()
+Bool_t AliTPCMonitorDateFormat::IsLastSubEventHeader()const
 {
   // Check if sub event is last sub event
   Bool_t retval;
@@ -276,31 +280,31 @@ Bool_t AliTPCMonitorDateFormat::IsLastSubEventHeader()
 }
 
 //____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetSubEventSize()
+Int_t AliTPCMonitorDateFormat::GetSubEventSize()const
 {
   // Return sub event size
-  return (Int_t)subEvent->eventSize;
+  return (Int_t)fsubEvent->eventSize;
 }
 
 //____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetSubEventHeaderSize()
+Int_t AliTPCMonitorDateFormat::GetSubEventHeaderSize()const
 {
   // Return sub event header size
-  return (Int_t)subEvent->eventHeadSize;
+  return (Int_t)fsubEvent->eventHeadSize;
 }
 
 //____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetSubEventLDC()
+Int_t AliTPCMonitorDateFormat::GetSubEventLDC()const
 {
   // Return sub event LDC
-  return (Int_t)subEvent->eventLdcId;
+  return (Int_t)fsubEvent->eventLdcId;
 }
 
 //____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetSubEventGDC()
+Int_t AliTPCMonitorDateFormat::GetSubEventGDC()const
 {
   // return sub event GDC
-       return (Int_t)subEvent->eventGdcId;
+       return (Int_t)fsubEvent->eventGdcId;
 }
 
 
@@ -309,7 +313,7 @@ Bool_t AliTPCMonitorDateFormat::IsSubEventSuperEvent()
 {
   // Check if sub event is super event
        Bool_t retval;
-       if(TEST_SYSTEM_ATTRIBUTE( subEvent->eventTypeAttribute, ATTR_SUPER_EVENT ) == 1)
+       if(TEST_SYSTEM_ATTRIBUTE( fsubEvent->eventTypeAttribute, ATTR_SUPER_EVENT ) == 1)
                retval = true;
        else
                retval = false;
@@ -317,11 +321,11 @@ Bool_t AliTPCMonitorDateFormat::IsSubEventSuperEvent()
 }
 
 //____________________________________________________________________________
-Bool_t AliTPCMonitorDateFormat::IsSubEventStartOfRun()
-{
+Bool_t AliTPCMonitorDateFormat::IsSubEventStartOfRun()const
+{ 
   // Check if sub event is start of run
   Bool_t retval;
-  if(subEvent->eventType == START_OF_RUN)
+  if(fsubEvent->eventType == START_OF_RUN)
     retval = true;
   else
     retval = false;
@@ -329,11 +333,11 @@ Bool_t AliTPCMonitorDateFormat::IsSubEventStartOfRun()
 }
 
 //____________________________________________________________________________
-Bool_t AliTPCMonitorDateFormat::IsSubEventEndOfRun()
+Bool_t AliTPCMonitorDateFormat::IsSubEventEndOfRun()const
 {
   // Check if sub event is end of run
   Bool_t retval;
-  if(subEvent->eventType == END_OF_RUN)
+  if(fsubEvent->eventType == END_OF_RUN)
     retval = true;
   else
     retval = false;
@@ -341,11 +345,11 @@ Bool_t AliTPCMonitorDateFormat::IsSubEventEndOfRun()
 }
 
 //____________________________________________________________________________
-Bool_t AliTPCMonitorDateFormat::IsSubEventPhysicsEvent()
+Bool_t AliTPCMonitorDateFormat::IsSubEventPhysicsEvent()const
 {
   // Check if sub event is physics event
   Bool_t retval;
-  if(subEvent->eventType == PHYSICS_EVENT)
+  if(fsubEvent->eventType == PHYSICS_EVENT)
     retval = true;
   else
     retval = false;
@@ -357,7 +361,7 @@ void AliTPCMonitorDateFormat::GotoFirstEquipment()
 {
   // Set current pointer to first equipment
   fcurrentPtr = fsubEventPtr + GetSubEventHeaderSize();
-  equipment = (struct equipmentHeaderStruct*) (fcurrentPtr);
+  fequipment = (struct equipmentHeaderStruct*) (fcurrentPtr);
 }
 
 //____________________________________________________________________________
@@ -365,15 +369,15 @@ void AliTPCMonitorDateFormat::GotoNextEquipment()
 {
   // Set current pointer to next equipment
   fcurrentPtr += GetEquipmentSize();
-  equipment = (struct equipmentHeaderStruct*) (fcurrentPtr);
+  fequipment = (struct equipmentHeaderStruct*) (fcurrentPtr);
 }
 
 //____________________________________________________________________________
-Bool_t AliTPCMonitorDateFormat::IsLastEquipment()
+Bool_t AliTPCMonitorDateFormat::IsLastEquipment() const
 {
   // Check if equipment is last equipment
   Bool_t retval;
-  Int_t position;
+  Int_t position; 
   position = fcurrentPtr - fsubEventPtr;
   if( (position+GetEquipmentSize()) < GetSubEventSize() )
                  retval = false;
@@ -383,55 +387,55 @@ Bool_t AliTPCMonitorDateFormat::IsLastEquipment()
 }
 
 //____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetEquipmentSize()
+Int_t AliTPCMonitorDateFormat::GetEquipmentSize() const
 {
   // Return equipment size
-  return (Int_t)equipment->equipmentSize;
+  return (Int_t)fequipment->equipmentSize;
 }
 
 //____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetPayloadSize()
+Int_t AliTPCMonitorDateFormat::GetPayloadSize() const
 {
   // Return payload slze
   Int_t retval = 0;
   if(GetEventVersion() < 196610){
-    retval = (Int_t)equipment->equipmentSize;
+    retval = (Int_t)fequipment->equipmentSize;
   }else{
-    retval = (Int_t)equipment->equipmentSize - GetEquipmentHeaderSize();
+    retval = (Int_t)fequipment->equipmentSize - GetEquipmentHeaderSize();
   }
   return retval;
 }
 
 //____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetEquipmentType()
+Int_t AliTPCMonitorDateFormat::GetEquipmentType() const
 {
   // Return equipment type
-  return (Int_t)equipment->equipmentType;
+  return (Int_t)fequipment->equipmentType;
 }
 
 //____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetEquipmentID()
+Int_t AliTPCMonitorDateFormat::GetEquipmentID() const
 {
   // Return equipment ID
-  return (Int_t)equipment->equipmentId;
+  return (Int_t)fequipment->equipmentId;
 }
 
 //____________________________________________________________________________
 Int_t* AliTPCMonitorDateFormat::GetEquipmentTypeAttribute()
 {
   // Return equipment type attribute
-  return (Int_t*)equipment->equipmentTypeAttribute;
+  return (Int_t*)fequipment->equipmentTypeAttribute;
 }
 
 //____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetEquipmentBasicSize()
+Int_t AliTPCMonitorDateFormat::GetEquipmentBasicSize() const
 {
   // Return equipment basic size
-  return (Int_t)equipment->equipmentBasicElementSize;
+  return (Int_t)fequipment->equipmentBasicElementSize;
 }
 
 //____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetEquipmentHeaderSize()
+Int_t AliTPCMonitorDateFormat::GetEquipmentHeaderSize() const
 {
   // Return equipment header size
   return sizeof(struct equipmentHeaderStruct);
@@ -439,7 +443,7 @@ Int_t AliTPCMonitorDateFormat::GetEquipmentHeaderSize()
 
 
 //____________________________________________________________________________
-Char_t *AliTPCMonitorDateFormat::GetFirstDataPointer()
+Char_t *AliTPCMonitorDateFormat::GetFirstDataPointer() 
 {
   // Return data pointer (after equipment header)
   Char_t *datapointer;
@@ -454,7 +458,7 @@ Char_t *AliTPCMonitorDateFormat::GetFirstDataPointer()
 }
 
 //____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetPosition()
+Int_t AliTPCMonitorDateFormat::GetPosition() const
 {
   // Return current position relative to start of event
   Int_t retval = (Int_t) (fcurrentPtr - fdataPtr);
@@ -462,7 +466,7 @@ Int_t AliTPCMonitorDateFormat::GetPosition()
 }
 
 //____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetPositionSubEvent()
+Int_t AliTPCMonitorDateFormat::GetPositionSubEvent() const
 {
   // Return subevent position  relative to start of event
   Int_t retval = (Int_t) (fsubEventPtr - fdataPtr);
index a44cc948a0da38c16137d01a0c8ebb8eedc23d62..2c33460364265ec49ba4bed93d697677f0ea286b 100755 (executable)
@@ -8,14 +8,14 @@
 
 
 ////////////////////////////////////////////////////////////////////////
-//
-// AliTPCMonitorDateFormat class
-//
-// Class for decoding raw data headers in DATE format
-// 
-// Authors: Roland Bramm, 
-//          Stefan Kniege, IKF, Frankfurt
-//       
+////
+//// AliTPCMonitorDateFormat class
+////
+//// Class for decoding raw data headers in DATE format
+//// 
+//// Authors: Roland Bramm, 
+////          Stefan Kniege, IKF, Frankfurt
+////       
 /////////////////////////////////////////////////////////////////////////
 
 struct eventHeaderStruct;
@@ -29,68 +29,68 @@ class AliTPCMonitorDateFormat : public TNamed {
  public:
     AliTPCMonitorDateFormat(Char_t* data);
     AliTPCMonitorDateFormat(const  AliTPCMonitorDateFormat &dateformat);
-    AliTPCMonitorDateFormat& operator= (const AliTPCMonitorDateFormat& dateformat);
-    ~AliTPCMonitorDateFormat();
+    AliTPCMonitorDateFormat& operator= (const AliTPCMonitorDateFormat& dateformat); 
+    ~AliTPCMonitorDateFormat(); 
 
     //Super Event Header
-    Int_t   GetEventSize();
-    Int_t   GetEventHeaderSize();
-    Int_t   GetEventHeaderBaseSize();
-    Int_t   GetEventID();
-    Int_t   GetEventLDC();
-    Int_t   GetEventGDC();
+    Int_t   GetEventSize() const;
+    Int_t   GetEventHeaderSize() const;
+    Int_t   GetEventHeaderBaseSize() const; 
+    Int_t   GetEventID() const;
+    Int_t   GetEventLDC() const;
+    Int_t   GetEventGDC() const;
 
-    Int_t   GetEventRunID();
-    Int_t   GetEventVersion();
-    Int_t   GetEventVersionMajor();
-    Int_t   GetEventVersionMinor();
-    Bool_t  IsEventSuperEvent();
-    Bool_t  IsEventStartOfRun();
-    Bool_t  IsEventEndOfRun();
-    Bool_t  IsEventPhysicsEvent();
-    Bool_t  IsEventSwapped();
-    Bool_t  IsEventWrongEndian();
+    Int_t   GetEventRunID() const;
+    Int_t   GetEventVersion() const;
+    Int_t   GetEventVersionMajor() const;
+    Int_t   GetEventVersionMinor() const;
+    Bool_t  IsEventSuperEvent() const;
+    Bool_t  IsEventStartOfRun() const;
+    Bool_t  IsEventEndOfRun() const;
+    Bool_t  IsEventPhysicsEvent() const;
+    Bool_t  IsEventSwapped() const;
+    Bool_t  IsEventWrongEndian() const;
  
     //Sub Event Header
     void    GotoSubEventHeader();
     void    GotoNextSubEventHeader();
-    Bool_t  IsLastSubEventHeader();
+    Bool_t  IsLastSubEventHeader() const;
 
-    Int_t   GetSubEventSize();
-    Int_t   GetSubEventHeaderSize();
-    Int_t   GetSubEventLDC();
-    Int_t   GetSubEventGDC();
+    Int_t   GetSubEventSize() const;
+    Int_t   GetSubEventHeaderSize() const;
+    Int_t   GetSubEventLDC() const;
+    Int_t   GetSubEventGDC() const;
 
     Bool_t  IsSubEventSuperEvent();
-    Bool_t  IsSubEventStartOfRun();
-    Bool_t  IsSubEventEndOfRun();
-    Bool_t  IsSubEventPhysicsEvent();
+    Bool_t  IsSubEventStartOfRun() const;
+    Bool_t  IsSubEventEndOfRun() const;
+    Bool_t  IsSubEventPhysicsEvent() const;
 
     //Eqipments
     void    GotoFirstEquipment();
     void    GotoNextEquipment();
-    Bool_t  IsLastEquipment();
+    Bool_t  IsLastEquipment() const;
 
-    Int_t   GetEquipmentSize();
-    Int_t   GetEquipmentType();
-    Int_t   GetEquipmentID();
+    Int_t   GetEquipmentSize() const;
+    Int_t   GetEquipmentType() const;
+    Int_t   GetEquipmentID() const; 
     Int_t*  GetEquipmentTypeAttribute();
-    Int_t   GetEquipmentBasicSize();
-    Int_t   GetEquipmentHeaderSize();
-    Int_t   GetPayloadSize();
+    Int_t   GetEquipmentBasicSize()  const;
+    Int_t   GetEquipmentHeaderSize() const; 
+    Int_t   GetPayloadSize() const;
 
     //DATA
     Char_t* GetFirstDataPointer();
-    Int_t   GetPosition();
-    Int_t   GetPositionSubEvent();
+    Int_t   GetPosition() const;
+    Int_t   GetPositionSubEvent() const;
     
  private:
     Char_t*                fdataPtr;       // pointer to data array (start, will not be changed in event) 
     Char_t*                fsubEventPtr;   // pointer to SubEvent
     Char_t*                fcurrentPtr;    // pointer to current data position (header or data)
-    eventHeaderStruct*     event;          // event and
-    eventHeaderStruct*     subEvent;       // subevent structure
-    equipmentHeaderStruct* equipment;      // equipmemnt structure
+    eventHeaderStruct*     fevent;         // event and
+    eventHeaderStruct*     fsubEvent;      // subevent structure
+    equipmentHeaderStruct* fequipment;     // equipmemnt structure
   
     ClassDef(AliTPCMonitorDateFormat,1);
 };
index 505b618af3db9b9cadee300f2fd5b08f153f3b89..102f7714d369e5f87af0590978a88b9d6a3bd5b9 100755 (executable)
@@ -8,14 +8,14 @@
 
 
 ////////////////////////////////////////////////////////////////////////
-//
-// AliTPCMonitorDateMonitor class
-// 
-// Monitoring wrapper class for DATE monitoring
-// 
-// Authors: Roland Bramm, 
-//          Stefan Kniege, IKF, Frankfurt
-//       
+////
+//// AliTPCMonitorDateMonitor class
+//// 
+//// Monitoring wrapper class for DATE monitoring
+//// 
+//// Authors: Roland Bramm, 
+////          Stefan Kniege, IKF, Frankfurt
+////       
 /////////////////////////////////////////////////////////////////////////
 
 #include <string>
index 876cc7cfe72037b66baca2c06f16f09a40a98568..d4aa93d92d64a6b5030ffdc0bda47e270cc1682f 100755 (executable)
@@ -21,21 +21,21 @@ New TPC monitoring package from Stefan Kniege. The monitoring package can be sta
 */ 
 
 ////////////////////////////////////////////////////////////////////////
-//
-// AliTPCMonitorDialog class
-//
-// Class to handle dialogs for settings of files and configurations 
-// for the AliTPCMonitor
-// 
-// The dialog will be called by an AliTPCMonitor object from the macro TPCMonitor.C.
-// Depending on the version number passed when creating an Object of this class
-// a certain dialog window (see constructor)  for the TPCMonitor will be opened.
-// The data inserted will be passed to the configuration handler and read out
-// by the monitor object or a the monitor member function will be directly called.
-//  
-// Author: Stefan Kniege, IKF, Frankfurt
-//       
-//
+////
+//// AliTPCMonitorDialog class
+////
+//// Class to handle dialogs for settings of files and configurations 
+//// for the AliTPCMonitor
+//// 
+//// The dialog will be called by an AliTPCMonitor object from the macro TPCMonitor.C.
+//// Depending on the version number passed when creating an Object of this class
+//// a certain dialog window (see constructor)  for the TPCMonitor will be opened.
+//// The data inserted will be passed to the configuration handler and read out
+//// by the monitor object or a the monitor member function will be directly called.
+////  
+//// Author: Stefan Kniege, IKF, Frankfurt
+////       
+////
 /////////////////////////////////////////////////////////////////////////
 
 
@@ -52,15 +52,15 @@ New TPC monitoring package from Stefan Kniege. The monitoring package can be sta
 #include "TGWindow.h"
 #include "TVirtualPadEditor.h"
 #include "TTimer.h"
-#include "RQ_OBJECT.h"
 #include <Riostream.h>
 #include "Rtypes.h"
 #include "AliLog.h"
 
 ClassImp(AliTPCMonitorDialog)
 //_____________________________________________________________________________________________
-AliTPCMonitorDialog::AliTPCMonitorDialog(const TGWindow *p, const TGWindow *main, UInt_t w,
-                                          UInt_t h, UInt_t options, Int_t version,AliTPCMonitor* monitor):
+AliTPCMonitorDialog::AliTPCMonitorDialog(TGWindow *p, TGWindow *main, UInt_t w,
+                                        UInt_t h, UInt_t options, Int_t version,AliTPCMonitor* monitor): 
+  //fQObject(0),
   fFrameMain(new TGTransientFrame(p, main, w, h, options)),
   fFrameComp(0),
   fFrameHor(new TGHorizontalFrame(fFrameMain, 60, 20, kFixedWidth)),
@@ -71,8 +71,13 @@ AliTPCMonitorDialog::AliTPCMonitorDialog(const TGWindow *p, const TGWindow *main
   fLayout1(new TGLayoutHints(kLHintsTop    | kLHintsLeft | kLHintsExpandX, 2, 2, 2, 2)),
   fLayout2(new TGLayoutHints(kLHintsBottom | kLHintsRight                , 2, 2, 5, 1)),
   fLayout3(new TGLayoutHints(kLHintsTop    | kLHintsLeft, 5, 5, 5, 5)),
-  fMonitor(monitor)
-  
+  fMonitor(monitor),
+  fWidth(w),
+  fHeight(h),
+  fOptions(options),
+  fVersion(version),
+  fClient(p),
+  fMain(main)
 {
   // Constructor for Dialog window.  
   // Create a dialog window.depending on the version it is called with.. 
@@ -91,21 +96,76 @@ AliTPCMonitorDialog::AliTPCMonitorDialog(const TGWindow *p, const TGWindow *main
   CreateDialogVersion(version);
 }
 
-// //_____________________________________________________________________________
-// AliTPCMonitorDialog::AliTPCMonitorDialog(const AliTPCMonitorDialog &dialog) :
-// {
-//   // copy constructor (actually none forseen for this class 
-//   AliWarning("No copying forseen for this class");
-  
-// }
+//_____________________________________________________________________________
+AliTPCMonitorDialog::AliTPCMonitorDialog(const AliTPCMonitorDialog &dialog) :
+TNamed(dialog.GetName(),dialog.GetTitle()),
+//fQObject(0),
+fFrameMain(new TGTransientFrame(dialog.GetClient(), dialog.GetMainFrame(), dialog.GetWidth(), dialog.GetHeight())),
+fFrameComp(0),
+fFrameHor(new TGHorizontalFrame(fFrameMain, 60, 20, kFixedWidth)),
+fFrameGroup(0),
+fOkButton(new TGTextButton(fFrameHor, "&Ok", 1)),
+fListBox(0),
+fTab(new TGTab(fFrameMain, 300, 300)),
+fLayout1(new TGLayoutHints(kLHintsTop    | kLHintsLeft | kLHintsExpandX, 2, 2, 2, 2)),
+fLayout2(new TGLayoutHints(kLHintsBottom | kLHintsRight                , 2, 2, 5, 1)),
+fLayout3(new TGLayoutHints(kLHintsTop    | kLHintsLeft, 5, 5, 5, 5)),
+fMonitor(dialog.GetMonitor()),
+fWidth(dialog.GetWidth()),
+fHeight(dialog.GetHeight()),
+fOptions(dialog.GetOptions()),
+fVersion(dialog.GetVersion()),
+fClient(dialog.GetClient()),
+fMain(dialog.GetMainFrame())
+{
+  // copy constructor (actually none forseen for this class)
+  fFrameMain->Connect("CloseWindow()", "AliTPCMonitorDialog", this, "DoClose()");
+  fFrameMain->DontCallClose(); 
+  fFrameMain->SetCleanup(kDeepCleanup);
+  fOkButton->Connect("Clicked()", "AliTPCMonitorDialog", this, "DoOK()");
+  fFrameHor->AddFrame(fOkButton, fLayout1);
+  fFrameHor->Resize(150, fOkButton->GetDefaultHeight());
+  fFrameMain->AddFrame(    fFrameHor, fLayout2);
+  fTab->Connect("Selected(Int_t)", "AliTPCMonitorDialog", this, "DoTab(Int_t)");
+  CreateDialogVersion(dialog.GetVersion());
+}
 
-// //_____________________________________________________________________________
-// AliTPCMonitorDialog &AliTPCMonitorDialog::operator =(const AliTPCMonitorDialog& dialog)
-// {
-//   // assignement operator
-//   AliWarning("No assignment forseen for this class");
-//   return *this;
-// }
+ //_____________________________________________________________________________
+AliTPCMonitorDialog &AliTPCMonitorDialog::operator =(const AliTPCMonitorDialog& dialog) 
+{
+  // assignement operator (actually none forseen for this class)
+  if(this!=&dialog)
+    {
+      fFrameMain  = new TGTransientFrame(dialog.GetClient(), dialog.GetMainFrame(), dialog.GetWidth(), dialog.GetHeight());
+      fFrameComp  = 0;
+      fFrameHor   = new TGHorizontalFrame(fFrameMain, 60, 20, kFixedWidth);
+      fFrameGroup = 0;
+      fOkButton   =  new TGTextButton(fFrameHor, "&Ok", 1);
+      fListBox    = 0;
+      fTab        = new TGTab(fFrameMain, 300, 300);
+      fLayout1    = new TGLayoutHints(kLHintsTop    | kLHintsLeft | kLHintsExpandX, 2, 2, 2, 2);
+      fLayout2    = new TGLayoutHints(kLHintsBottom | kLHintsRight                , 2, 2, 5, 1);
+      fLayout3    = new TGLayoutHints(kLHintsTop    | kLHintsLeft, 5, 5, 5, 5);
+      fMonitor    = dialog.GetMonitor();
+      fWidth      = dialog.GetWidth();
+      fHeight     = dialog.GetHeight();
+      fOptions    = dialog.GetOptions();
+      fClient     = dialog.GetClient();
+      fVersion    = dialog.GetVersion();
+      fMain       = dialog.GetMainFrame();    
+      fFrameMain->Connect("CloseWindow()", "AliTPCMonitorDialog", this, "DoClose()");
+      fFrameMain->DontCallClose(); 
+      fFrameMain->SetCleanup(kDeepCleanup);
+      fOkButton->Connect("Clicked()", "AliTPCMonitorDialog", this, "DoOK()");
+      fFrameHor->AddFrame(fOkButton, fLayout1);
+      fFrameHor->Resize(150, fOkButton->GetDefaultHeight());
+      fFrameMain->AddFrame(    fFrameHor, fLayout2);
+      fTab->Connect("Selected(Int_t)", "AliTPCMonitorDialog", this, "DoTab(Int_t)");
+      CreateDialogVersion(dialog.GetVersion());
+    }
+   return *this;
+ }
 
 
 
@@ -254,7 +314,7 @@ void AliTPCMonitorDialog::HandleButtons(Int_t id)
     case 2: 
       {
        // Select FEE Component 
-       Int_t comp_sel=1;
+       Int_t compsel=1;
        Int_t fComponents[10];
        for(Int_t j = 0; j < 6; j++) 
          {
@@ -269,11 +329,11 @@ void AliTPCMonitorDialog::HandleButtons(Int_t id)
               j==4 && (fComponents[j] < -1 || fComponents[j]>6   ) ||
               j==5 && (fComponents[j] < -1 || fComponents[j]>8   )    )
              {
-               comp_sel =0;
+               compsel =0;
                AliError("Settings out of range ( version 2) "); 
              }
          }
-       if(comp_sel==1) 
+       if(compsel==1) 
          {
            if(fMonitor!=0 && fMonitor->GetEventProcessed() )fMonitor->ShowSel((Int_t*)fComponents);
            else                                             AliError("No event processed up to now");
@@ -292,16 +352,16 @@ void AliTPCMonitorDialog::HandleButtons(Int_t id)
        Int_t error = 1;
        
        if(s1.find(",")!=string::npos){
-         string sub1_1 = s1.substr(0,s1.find(","))               ;fConfigArr[0] = atoi(sub1_1.data());
-         string sub1_2 = s1.substr(s1.find(",")+1,s1.length() )  ;fConfigArr[1] = atoi(sub1_2.data());
+         string sub11 = s1.substr(0,s1.find(","))               ;fConfigArr[0] = atoi(sub11.data());
+         string sub12 = s1.substr(s1.find(",")+1,s1.length() )  ;fConfigArr[1] = atoi(sub12.data());
          if(fConfigArr[0]<fConfigArr[1] && fConfigArr[1]<1024){
            fMonitor->SetRangeBase(fConfigArr[0],fConfigArr[1]);
            error=0;
          }
        }
        if(s2.find(",")!=string::npos){
-         string sub2_1 = s2.substr(0,s2.find(","))               ;fConfigArr[2] = atoi(sub2_1.data());
-         string sub2_2 = s2.substr(s2.find(",")+1,s2.length() )  ;fConfigArr[3] = atoi(sub2_2.data());
+         string sub21 = s2.substr(0,s2.find(","))               ;fConfigArr[2] = atoi(sub21.data());
+         string sub22 = s2.substr(s2.find(",")+1,s2.length() )  ;fConfigArr[3] = atoi(sub22.data());
          if(fConfigArr[2]<fConfigArr[3] && fConfigArr[3]<1024){
            fMonitor->SetRangeMax(fConfigArr[2],fConfigArr[3]);
            error=0;
@@ -309,8 +369,8 @@ void AliTPCMonitorDialog::HandleButtons(Int_t id)
        }
 
        if(s3.find(",")!=string::npos){
-         string sub3_1 = s3.substr(0,s3.find(","))               ;fConfigArr[4] = atoi(sub3_1.data());
-         string sub3_2 = s3.substr(s3.find(",")+1,s3.length() )  ;fConfigArr[5] = atoi(sub3_2.data());
+         string sub31 = s3.substr(0,s3.find(","))               ;fConfigArr[4] = atoi(sub31.data());
+         string sub32 = s3.substr(s3.find(",")+1,s3.length() )  ;fConfigArr[5] = atoi(sub32.data());
          if(fConfigArr[4]<fConfigArr[5] && fConfigArr[5]<1024){
            fMonitor->SetRangeSum(fConfigArr[4],fConfigArr[5]);
            error=0;
@@ -325,24 +385,24 @@ void AliTPCMonitorDialog::HandleButtons(Int_t id)
 }
 
 //_____________________________________________________________________________________________
-void AliTPCMonitorDialog::DoTab(Int_t id)
+void AliTPCMonitorDialog::DoTab(Int_t id) 
 {
   printf("Tab item %d activated\n", id);
 }
 
 //_____________________________________________________________________________________________
-void AliTPCMonitorDialog::DoClose()
+void AliTPCMonitorDialog::DoClose() const
 {
   // Close the dialog window
   printf("\nTerminating dialog: via window manager\n");
-  CloseWindow();
+  CloseWindow(); 
   // Close the Ged editor if it was activated.
   if (TVirtualPadEditor::GetPadEditor(kFALSE) != 0)
     TVirtualPadEditor::Terminate();
 }
 
 //_____________________________________________________________________________________________
-void AliTPCMonitorDialog::CloseWindow()
+void AliTPCMonitorDialog::CloseWindow() const
 {
   // Called when window is closed via the window manager.
   delete this;
index 0a2bc7b98e253f4e06b2ee4643fb052349bda0ca..e6f765138540fe54bc96295fd25cdbc951c426b5 100755 (executable)
@@ -7,20 +7,19 @@
 /* $Id$ */
 
 ////////////////////////////////////////////////////////////////////////
-//
-// AliTPCMonitorDialog class
-//
-// Class to handle dialogs for settings of files and configurations 
-// for the AliTPCMonitor
-// 
-// Author: Stefan Kniege, IKF, Frankfurt
-//       
-//
+////
+//// AliTPCMonitorDialog class
+////
+//// Class to handle dialogs for settings of files and configurations 
+//// for the AliTPCMonitor
+//// 
+//// Author: Stefan Kniege, IKF, Frankfurt
+////       
+////
 /////////////////////////////////////////////////////////////////////////
 
 
 #include "TGFrame.h"  
-#include "RQ_OBJECT.h"
 #include "AliTPCMonitor.h" 
 class TGWindow;
 class TGTransientFrame;
@@ -35,25 +34,29 @@ class TGTextEntry;
 class TGTransientFrame;
 class TGCompositeFrame;
 class TGGroupFrame;
-class AliTPCMonitorDialog : public TNamed{
+class AliTPCMonitorDialog : public TNamed
+{
     
-    RQ_OBJECT("AliTPCMonitorDialog")
-    
-       
 public:
-    AliTPCMonitorDialog(const TGWindow *p, const TGWindow *main, UInt_t w, UInt_t h, UInt_t options = kVerticalFrame, Int_t version =1, AliTPCMonitor* monitor =0);
-    //AliTPCMonitorDialog(const  AliTPCMonitorDialog &dialog);
-    //AliTPCMonitorDialog& operator= (const AliTPCMonitorDialog& dialog);
+    AliTPCMonitorDialog(TGWindow *p, TGWindow *main, UInt_t w, UInt_t h, UInt_t options = kVerticalFrame, Int_t version =1, AliTPCMonitor* monitor =0);
+    AliTPCMonitorDialog(const  AliTPCMonitorDialog &dialog);
+    AliTPCMonitorDialog& operator= (const AliTPCMonitorDialog& dialog);
     virtual ~AliTPCMonitorDialog();
     
-    void DoClose();
-    void CloseWindow();
-    void DoOK();
-    void DoCancel();
-    void DoTab(Int_t id);
-    void HandleButtons(Int_t id = -1);
-    void CreateDialogVersion(Int_t version);
-    
+    void           DoClose()     const;
+    void           CloseWindow() const;
+    void           DoOK();
+    void           DoCancel(); 
+    void           DoTab(Int_t id);
+    void           HandleButtons(Int_t id = -1);
+    void           CreateDialogVersion(Int_t version);
+    UInt_t         GetWidth()     const { return fWidth;   }
+    UInt_t         GetHeight()    const { return fHeight;  }
+    UInt_t         GetOptions()   const { return fOptions; }
+    AliTPCMonitor* GetMonitor()   const { return fMonitor; }
+    TGWindow*      GetClient()   const { return fClient;  }
+    TGWindow*      GetMainFrame() const { return fMain;    }
+    Int_t          GetVersion()   const { return fVersion; }
  private:
     
     TGTransientFrame*    fFrameMain;    // Frames for dialog windows      
@@ -67,12 +70,19 @@ public:
     TGLayoutHints*       fLayout2;      // Layout for window versoin 2  
     TGLayoutHints*       fLayout3;      // Layout for window version 3 
     
-    
+  
+
     TGTextBuffer*        fBuf[7];       // Text buffer for GroupFrame
     TGTextEntry*         fEnt[7];       // Text entries for GroupFrame
     
     AliTPCMonitor*       fMonitor;      // Pointer to AliTPCMonitor to be called
     
+    UInt_t               fWidth;        // Width of the window
+    UInt_t               fHeight;       // Height of the window 
+    UInt_t               fOptions;      // Frame options 
+    Int_t                fVersion;       // Version of the dialog
+    TGWindow*            fClient;       // TGClient of Dialog
+    TGWindow*            fMain;         // Main fraem for Dialog window
     ClassDef(AliTPCMonitorDialog,1);
     
 };
index f9c044601d9ea2836472c51318a2d7bf9a59ecd7..ddd86d6edc6a8c7361c167f19da39a9089210899 100755 (executable)
 
 /*
 $Log$
+Revision 1.2  2007/10/12 13:36:27  cvetan
+Coding convention fixes from Stefan
+
 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.
 
 */ 
 
 ////////////////////////////////////////////////////////////////////////
-//
-// AliTPCMonitorFFT class
-//
-// Wrapper class to perform Fast Fourier Transformations.
-// The code is based on the Gnu Scientific Library. 
-// See documentation of gsl for further details.
-// 
-// Author: Stefan Kniege, IKF, Frankfurt
-//       
-//
+////
+//// AliTPCMonitorFFT class
+////
+//// Wrapper class to perform Fast Fourier Transformations.
+//// The code is based on the Gnu Scientific Library. 
+//// See documentation of gsl for further details.
+//// 
+//// Author: Stefan Kniege, IKF, Frankfurt
+////       
+////
 /////////////////////////////////////////////////////////////////////////
 
 
@@ -83,12 +86,12 @@ Int_t AliTPCMonitorFFT::ComplexRadix2InverseWrap(Double_t* data,Int_t stride, si
       return ret;
     }
   
-  const Double_t norm = 1.0 / n;
+  const Double_t knorm = 1.0 / n;
   size_t i;
   for (i = 0; i < n; i++)
     {
-      REAL(data,stride,i) *= norm;
-      IMAG(data,stride,i) *= norm;
+      REAL(data,stride,i) *= knorm;
+      IMAG(data,stride,i) *= knorm;
     }
   
   return ret;
@@ -127,14 +130,14 @@ Int_t AliTPCMonitorFFT::ComplexRadix2TransformWrap(Double_t* data,   Int_t strid
 
   for (bit = 0; bit < logn; bit++)
     {
-      Double_t w_real = 1.0;
-      Double_t w_imag = 0.0;
+      Double_t wreal = 1.0;
+      Double_t wimag = 0.0;
 
-      const Double_t theta = 2.0 * ((Int_t) sign) * M_PI / ((Double_t) (2 * dual));
+      const Double_t ktheta = 2.0 * ((Int_t) sign) * M_PI / ((Double_t) (2 * dual));
 
-      const Double_t s = sin (theta);
-      const Double_t t = sin (theta / 2.0);
-      const Double_t s2 = 2.0 * t * t;
+      const Double_t ks = sin (ktheta);
+      const Double_t kt = sin (ktheta / 2.0);
+      const Double_t ks2 = 2.0 * kt * kt;
 
       size_t a, b;
 
@@ -142,27 +145,27 @@ Int_t AliTPCMonitorFFT::ComplexRadix2TransformWrap(Double_t* data,   Int_t strid
        {
          for (a = 0; a < n; a+= 2 * dual)
            {
-             const size_t i = b + a;
-             const size_t j = b + a + dual;
+             const size_t ki = b + a;
+             const size_t kj = b + a + dual;
               
-             const Double_t t1_real = REAL(data,stride,i) + REAL(data,stride,j);
-             const Double_t t1_imag = IMAG(data,stride,i) + IMAG(data,stride,j);
-             const Double_t t2_real = REAL(data,stride,i) - REAL(data,stride,j);
-             const Double_t t2_imag = IMAG(data,stride,i) - IMAG(data,stride,j);
-
-             REAL(data,stride,i) = t1_real;
-             IMAG(data,stride,i) = t1_imag;
-             REAL(data,stride,j) = w_real*t2_real - w_imag * t2_imag;
-             IMAG(data,stride,j) = w_real*t2_imag + w_imag * t2_real;
+             const Double_t kt1real = REAL(data,stride,ki) + REAL(data,stride,kj);
+             const Double_t kt1imag = IMAG(data,stride,ki) + IMAG(data,stride,kj);
+             const Double_t kt2real = REAL(data,stride,ki) - REAL(data,stride,kj);
+             const Double_t kt2imag = IMAG(data,stride,ki) - IMAG(data,stride,kj);
+
+             REAL(data,stride,ki) = kt1real;
+             IMAG(data,stride,ki) = kt1imag;
+             REAL(data,stride,kj) = wreal*kt2real - wimag * kt2imag;
+             IMAG(data,stride,kj) = wreal*kt2imag + wimag * kt2real;
            }
 
-         /* trignometric recurrence for w-> exp(i theta) w */
+         /* trignometric recurrence for w-> exp(i ktheta) w */
 
          {
-           const Double_t tmp_real = w_real - s * w_imag - s2 * w_real;
-           const Double_t tmp_imag = w_imag + s * w_real - s2 * w_imag;
-           w_real = tmp_real;
-           w_imag = tmp_imag;
+           const Double_t ktmpreal = wreal - ks * wimag - ks2 * wreal;
+           const Double_t ktmpimag = wimag + ks * wreal - ks2 * wimag;
+           wreal = ktmpreal;
+           wimag = ktmpimag;
          }
        }
       dual /= 2;
@@ -177,7 +180,7 @@ Int_t AliTPCMonitorFFT::ComplexRadix2TransformWrap(Double_t* data,   Int_t strid
 }
 
 //__________________________________________________________________
-Int_t AliTPCMonitorFFT::ComplexBitReverseOrderWrap(Double_t* data, Int_t stride, size_t n, Int_t logn)
+Int_t AliTPCMonitorFFT::ComplexBitReverseOrderWrap(Double_t* data, Int_t stride, size_t n, Int_t logn) const
 {
   // Wrapper function from gnu scientific library
   /* This is the Goldrader bit-reversal algorithm */
@@ -193,12 +196,12 @@ Int_t AliTPCMonitorFFT::ComplexBitReverseOrderWrap(Double_t* data, Int_t stride,
       
       if (i < j)
         {
-          const Double_t tmp_real = REAL(data,stride,i);
-          const Double_t tmp_imag = IMAG(data,stride,i);
+          const Double_t ktmpreal = REAL(data,stride,i);
+          const Double_t ktmpimag = IMAG(data,stride,i);
           REAL(data,stride,i) = REAL(data,stride,j);
           IMAG(data,stride,i) = IMAG(data,stride,j);
-          REAL(data,stride,j) = tmp_real;
-          IMAG(data,stride,j) = tmp_imag;
+          REAL(data,stride,j) = ktmpreal;
+          IMAG(data,stride,j) = ktmpimag;
         }
       
       while (k <= j) 
@@ -215,27 +218,27 @@ Int_t AliTPCMonitorFFT::ComplexBitReverseOrderWrap(Double_t* data, Int_t stride,
 }
 
 //__________________________________________________________________
-Int_t AliTPCMonitorFFT::FFTBinaryLogn(size_t n)
+Int_t AliTPCMonitorFFT::FFTBinaryLogn(size_t n) const
 {
 
   // Return log on base 2
   size_t ntest ;
-  size_t binary_logn = 0 ;
+  size_t binarylogn = 0 ;
   size_t k = 1;
   
   while (k < n)
     {
       k *= 2;
-      binary_logn++;
+      binarylogn++;
     }
   
-  ntest = (1 << binary_logn) ;
+  ntest = (1 << binarylogn) ;
   
   if (n != ntest )       
     {
       return -1 ; /* n is not a power of 2 */
     } 
   
-  return binary_logn;
+  return binarylogn;
 }
 
index 12c9ca262438f2394d063f5051c33783ae8d93dc..860103698a2c1194f546e53f5036ef22bb64b041 100755 (executable)
@@ -8,16 +8,16 @@
 
 
 ////////////////////////////////////////////////////////////////////////
-//
-// AliTPCMonitorFFT class
-//
-// Wrapper class to perform Fast Fourier Transformations
-// Code based on Gnu Scientific Library 
-// See documentation of gsl for further details
-// 
-// Author: Stefan Kniege, IKF, Frankfurt
-//       
-//
+////
+//// AliTPCMonitorFFT class
+////
+//// Wrapper class to perform Fast Fourier Transformations
+//// Code based on Gnu Scientific Library 
+//// See documentation of gsl for further details
+//// 
+//// Author: Stefan Kniege, IKF, Frankfurt
+////       
+////
 /////////////////////////////////////////////////////////////////////////
 
 
@@ -39,8 +39,8 @@ class AliTPCMonitorFFT : public TNamed {
     Int_t     ComplexRadix2BackwardWrap( Double_t* data, Int_t stride, size_t n );  
     Int_t     ComplexRadix2InverseWrap(  Double_t* data, Int_t stride, size_t n ); 
     Int_t     ComplexRadix2TransformWrap(Double_t* data, Int_t stride, size_t n, Int_t sign ); 
-    Int_t     ComplexBitReverseOrderWrap(Double_t* data, Int_t stride, size_t n, Int_t logn); 
-    Int_t     FFTBinaryLogn(size_t n);
+    Int_t     ComplexBitReverseOrderWrap(Double_t* data, Int_t stride, size_t n, Int_t logn) const 
+    Int_t     FFTBinaryLogn(size_t n) const ;
 
  private:
     
index b85d3923093e82254de92dd4cf10c024ac5b718b..f5092a84f55751a00dac7c8ea20b6088f9230c85 100755 (executable)
 
 /*
   $Log$
+  Revision 1.2  2007/10/12 13:36:27  cvetan
+  Coding convention fixes from Stefan
+
   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.
 
 */ 
 
 ////////////////////////////////////////////////////////////////////////
-//
-// AliTPCMonitorMappingHandler class
-//
-// Class for handling mapping information TPC  
-//  
-// The mapping information for the TPC front end electornics (pads, front end cards) 
-// are handled by this class.
-// The information from the design mapping and from the hardware address can be 
-// cross checked in the TPCMonitor.C. 
-// Malfunctioning front end cards can be identified by looking at single channels 
-// displayed with  the TPCMonitor.  
-//   
-// 
-// Authors: Roland Bramm, 
-//          Stefan Kniege, IKF, Frankfurt
-//       
+////
+//// AliTPCMonitorMappingHandler class
+////
+//// Class for handling mapping information TPC  
+////  
+//// The mapping information for the TPC front end electornics (pads, front end cards) 
+//// are handled by this class.
+//// The information from the design mapping and from the hardware address can be 
+//// cross checked in the TPCMonitor.C. 
+//// Malfunctioning front end cards can be identified by looking at single channels 
+//// displayed with  the TPCMonitor.  
+////   
+//// 
+//// Authors: Roland Bramm, 
+////          Stefan Kniege, IKF, Frankfurt
+////       
 /////////////////////////////////////////////////////////////////////////
 
 
@@ -350,7 +353,7 @@ void AliTPCMonitorMappingHandler::ReadfecHwMap(Int_t sector)
   Int_t  fsector        = 0;
   Int_t  fec            = 0;
   Int_t  branch         = 0;
-  Int_t  rcu_patch      = 0;
+  Int_t  rcupatch      = 0;
   Int_t  altrchann      = 0;
   Int_t  altrchip       = 0;
   Int_t  nextHwAddress  = 0;
@@ -369,14 +372,14 @@ void AliTPCMonitorMappingHandler::ReadfecHwMap(Int_t sector)
          nfecs++;
          fec            = U2fGetFECinBranch(ind);
          branch         = U2fGetBranch(ind);
-         rcu_patch      = U2fGetRCU(ind);
+         rcupatch      = U2fGetRCU(ind);
                  
          for(Int_t ch = 0; ch<128; ch++)
            {
              altrchann      = ch%16;
              altrchip       = ch/16;
              
-             nextHwAddress  = (   ((branch&1)<<11) + (fec<<7) + (altrchip<<4) + (altrchann)  + ((rcu_patch-1)<<12) ); 
+             nextHwAddress  = (   ((branch&1)<<11) + (fec<<7) + (altrchip<<4) + (altrchann)  + ((rcupatch-1)<<12) ); 
              
              fMapHwFECglobal[nextHwAddress][0] = ind;
              fMapHwFECglobal[nextHwAddress][1] = ch ;
@@ -438,14 +441,14 @@ void  AliTPCMonitorMappingHandler::ReadRowMappingGlob(char* fpathtoMappingRowfil
 
 
 //_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::GetNumOfChannels()
+Int_t AliTPCMonitorMappingHandler::GetNumOfChannels() const
 {
   // Return number of channels
   return fnumofChannels;
 }
 
 //_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::GetSizeofArray()
+Int_t AliTPCMonitorMappingHandler::GetSizeofArray() const
 {
   // Return sise of global mapping fmapping array.
   // Value orresponds to max value of hardware addresses
@@ -454,7 +457,7 @@ Int_t AliTPCMonitorMappingHandler::GetSizeofArray()
 
 
 //_____________________________________________________________________________________________
-Short_t* AliTPCMonitorMappingHandler::GetLine(Int_t hwaddr)
+Short_t* AliTPCMonitorMappingHandler::GetLine(Int_t hwaddr)const
 {
   // Return pointer to mapping array for the hardware address hwaddr 
   Short_t* retval;
@@ -466,7 +469,7 @@ Short_t* AliTPCMonitorMappingHandler::GetLine(Int_t hwaddr)
 }
 
 //_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::GetIndex(Int_t hwaddr) 
+Int_t AliTPCMonitorMappingHandler::GetIndex(Int_t hwaddr) const
 {
   // Return readout index for the hardware address hwaddr
   Int_t retval;
@@ -478,7 +481,7 @@ Int_t AliTPCMonitorMappingHandler::GetIndex(Int_t hwaddr)
 }
 
 //_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::GetPadRow(Int_t hwaddr) 
+Int_t AliTPCMonitorMappingHandler::GetPadRow(Int_t hwaddr) const
 {
   // Return global pad row  for the hardware address hwaddr 
   Int_t retval;
@@ -490,7 +493,7 @@ Int_t AliTPCMonitorMappingHandler::GetPadRow(Int_t hwaddr)
 }
 
 //_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::GetPad(Int_t hwaddr) 
+Int_t AliTPCMonitorMappingHandler::GetPad(Int_t hwaddr) const
 {
   // Return pad number in row for the hardware address hwaddr 
   Int_t retval;
@@ -502,7 +505,7 @@ Int_t AliTPCMonitorMappingHandler::GetPad(Int_t hwaddr)
 }
 
 //_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::GetConnector(Int_t hwaddr) 
+Int_t AliTPCMonitorMappingHandler::GetConnector(Int_t hwaddr) const
 {
   // Return connector for the hardware address hwaddr 
   Int_t retval;
@@ -514,7 +517,7 @@ Int_t AliTPCMonitorMappingHandler::GetConnector(Int_t hwaddr)
 }
 
 //_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::GetPin(Int_t hwaddr) 
+Int_t AliTPCMonitorMappingHandler::GetPin(Int_t hwaddr) const
 {
   // Return pin for the hardware address hwaddr 
   Int_t retval;
@@ -526,7 +529,7 @@ Int_t AliTPCMonitorMappingHandler::GetPin(Int_t hwaddr)
 }
 
 //_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::GetFEC(Int_t hwaddr) 
+Int_t AliTPCMonitorMappingHandler::GetFEC(Int_t hwaddr) const
 {
   // Return fec number in IROC/OROC  for the hardware address hwaddr 
   Int_t retval;
@@ -538,7 +541,7 @@ Int_t AliTPCMonitorMappingHandler::GetFEC(Int_t hwaddr)
 }
 
 //_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::GetFECchannel(Int_t hwaddr) 
+Int_t AliTPCMonitorMappingHandler::GetFECchannel(Int_t hwaddr) const
 {
   // Return FEC channel for the hardware address hwaddr 
   Int_t retval;
@@ -550,7 +553,7 @@ Int_t AliTPCMonitorMappingHandler::GetFECchannel(Int_t hwaddr)
 }
 
 //_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::GetFECconnector(Int_t hwaddr) 
+Int_t AliTPCMonitorMappingHandler::GetFECconnector(Int_t hwaddr) const
 {
   // Return FEC connector for the hardware address hwaddr 
   Int_t retval;
@@ -562,7 +565,7 @@ Int_t AliTPCMonitorMappingHandler::GetFECconnector(Int_t hwaddr)
 }
 
 //_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::GetAltroChannel(Int_t hwaddr) 
+Int_t AliTPCMonitorMappingHandler::GetAltroChannel(Int_t hwaddr)  const
 {
   // Return Altro channel for the hardware address hwaddr 
   Int_t retval;
@@ -574,7 +577,7 @@ Int_t AliTPCMonitorMappingHandler::GetAltroChannel(Int_t hwaddr)
 }
 
 //_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::GetAltro(Int_t hwaddr) 
+Int_t AliTPCMonitorMappingHandler::GetAltro(Int_t hwaddr)  const
 {
   // Return Altro chip number in FEC for the hardware address hwaddr 
   Int_t retval;
@@ -587,7 +590,7 @@ Int_t AliTPCMonitorMappingHandler::GetAltro(Int_t hwaddr)
 
 
 //_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::GetNumofPads(Int_t row)
+Int_t AliTPCMonitorMappingHandler::GetNumofPads(Int_t row) 
 {
   // Return number of pads in row
   if(row<159)
@@ -613,49 +616,49 @@ Int_t AliTPCMonitorMappingHandler::GetPadAddInRow(Int_t row,Int_t pad )
 
 
 //_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::U2fGetFECnr(Int_t index)
+Int_t AliTPCMonitorMappingHandler::U2fGetFECnr(Int_t index) const
 {
   // Return FEC number for index  (FEC number should be equal to index)
   return  fu2ftestmapping[index][0];
 }
 
 //_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::U2fGetSide(Int_t fecnr)
+Int_t AliTPCMonitorMappingHandler::U2fGetSide(Int_t fecnr) const
 {
   // Return side on which FEC is installed
   return  fu2ftestmapping[fecnr][1];
 }
 
 //_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::U2fGetSector(Int_t fecnr)
+Int_t AliTPCMonitorMappingHandler::U2fGetSector(Int_t fecnr) const
 {
   // Return sector in which FEC is installed
   return  fu2ftestmapping[fecnr][2];
 }
 
 //_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::U2fGetRCU(Int_t fecnr)
+Int_t AliTPCMonitorMappingHandler::U2fGetRCU(Int_t fecnr) const
 {
   // Rerurn rcu patch in which FEC is installed
   return  fu2ftestmapping[fecnr][3];
 }
 
 //_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::U2fGetFECinRCU(Int_t fecnr)
+Int_t AliTPCMonitorMappingHandler::U2fGetFECinRCU(Int_t fecnr) const
 {
   // Return index of FEC in RCU (0-25)
   return  fu2ftestmapping[fecnr][4];
 }
 
 //_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::U2fGetFECinBranch(Int_t fecnr)
+Int_t AliTPCMonitorMappingHandler::U2fGetFECinBranch(Int_t fecnr) const
 {
   // Return index of FEC in branch (0-12)
   return  fu2ftestmapping[fecnr][5];
 }
 
 //_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::U2fGetBranch(Int_t fecnr)
+Int_t AliTPCMonitorMappingHandler::U2fGetBranch(Int_t fecnr) const
 {
   // Return branch in which FEC is installed (0,1)
   return  fu2ftestmapping[fecnr][6];
index a4c613000effd5ed2d8950d58bec13c6a498a56d..ecda87767d37d2dc85832a5f1a96cbaa11fbb49f 100755 (executable)
@@ -7,14 +7,14 @@
 /* $Id$ */
 
 ////////////////////////////////////////////////////////////////////////
-//
-// AliTPCMonitorMappingHandler class
-//
-// Class for handling mapping information TPC  
-//  
-// Authors: Roland Bramm, 
-//          Stefan Kniege, IKF, Frankfurt
-//       
+////
+//// AliTPCMonitorMappingHandler class
+////
+//// Class for handling mapping information TPC  
+////  
+//// Authors: Roland Bramm, 
+////          Stefan Kniege, IKF, Frankfurt
+////       
 /////////////////////////////////////////////////////////////////////////
 
 #include "TNamed.h" 
@@ -30,19 +30,19 @@ class AliTPCMonitorMappingHandler:   public TNamed {
     
     void     ReadMapping(char* mapfile);
     void     ReadRowMappingGlob(char* fpathtoMappingRowfile) ;
-    Int_t    GetNumOfChannels();
-    Int_t    GetSizeofArray();
-    Short_t* GetLine(          Int_t channel);
-    Int_t    GetIndex(         Int_t channel);
-    Int_t    GetPadRow(        Int_t channel);
-    Int_t    GetPad(           Int_t channel);
-    Int_t    GetConnector(     Int_t channel);
-    Int_t    GetPin(           Int_t channel);
-    Int_t    GetFEC(           Int_t channel);
-    Int_t    GetFECchannel(    Int_t channel);
-    Int_t    GetFECconnector(  Int_t channel);
-    Int_t    GetAltroChannel(  Int_t channel);
-    Int_t    GetAltro(         Int_t channel);
+    Int_t    GetNumOfChannels() const;
+    Int_t    GetSizeofArray() const ;
+    Short_t* GetLine(          Int_t channel) const;
+    Int_t    GetIndex(         Int_t channel) const;
+    Int_t    GetPadRow(        Int_t channel) const;
+    Int_t    GetPad(           Int_t channel) const;
+    Int_t    GetConnector(     Int_t channel) const;
+    Int_t    GetPin(           Int_t channel) const;
+    Int_t    GetFEC(           Int_t channel) const;
+    Int_t    GetFECchannel(    Int_t channel) const;
+    Int_t    GetFECconnector(  Int_t channel) const;
+    Int_t    GetAltroChannel(  Int_t channel) const;
+    Int_t    GetAltro(         Int_t channel) const;
     Int_t    GetPadAddInRow(   Int_t row, Int_t pad);
     Int_t    GetNumofPads(     Int_t row);
     
@@ -50,17 +50,17 @@ class AliTPCMonitorMappingHandler:   public TNamed {
     void     ReadfecHwMap(     Int_t sector);
     void     ReadfecGainMap(   char* fecgainmap);
      
-    Int_t    U2fGetBranch(     Int_t fecnr);
-    Int_t    U2fGetRCU(        Int_t fecnr);
-    Int_t    U2fGetFECinRCU(   Int_t fecnr);
-    Int_t    U2fGetFECinBranch(Int_t fecnr);
-    Int_t    U2fGetSide(       Int_t fecnr);
-    Int_t    U2fGetSector(     Int_t fecnr); 
-    Int_t    U2fGetFECnr(      Int_t index);
+    Int_t    U2fGetBranch(     Int_t fecnr) const;
+    Int_t    U2fGetRCU(        Int_t fecnr) const;
+    Int_t    U2fGetFECinRCU(   Int_t fecnr) const;
+    Int_t    U2fGetFECinBranch(Int_t fecnr) const;
+    Int_t    U2fGetSide(       Int_t fecnr) const;
+    Int_t    U2fGetSector(     Int_t fecnr) const;  
+    Int_t    U2fGetFECnr(      Int_t index) const;
     
-    Int_t    GetFECfromHw(Int_t hw)            { return fMapHwFECglobal[hw][0];}
-    Int_t    GetFECChfromHw(Int_t hw)          { return fMapHwFECglobal[hw][1];}
-    Float_t  GetFECchGain(Int_t fec, Int_t ch) { return fecGainMap[fec][ch];}
+    Int_t    GetFECfromHw(Int_t hw)            const { return fMapHwFECglobal[hw][0];}
+    Int_t    GetFECChfromHw(Int_t hw)          const { return fMapHwFECglobal[hw][1];}
+    Float_t  GetFECchGain(Int_t fec, Int_t ch) const { return fecGainMap[fec][ch];}
     
  private: