Add comments and fix warnings
authorcholm <cholm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 12 Jul 2010 13:21:53 +0000 (13:21 +0000)
committercholm <cholm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 12 Jul 2010 13:21:53 +0000 (13:21 +0000)
FMD/AliFMDPedestalDA.cxx
FMD/AliFMDPedestalDA.h

index e69d4cb..38dc9b2 100644 (file)
@@ -31,6 +31,7 @@
 #include "AliFMDAltroMapping.h"
 #include <iostream>
 #include <fstream>
+#include <iomanip>
 #include "AliLog.h"
 #include "TF1.h"
 #include "TObject.h"
@@ -127,11 +128,8 @@ void AliFMDPedestalDA::AddChannelContainer(TObjArray* sectorArray,
   TObjArray*        sampleArray = new TObjArray(samples);
   sampleArray->SetOwner();
   for (UInt_t sample = 0; sample < samples; sample++) {
-    TH1S* hSample = new TH1S(Form("FMD%d%c[%02d,03%d]_%d",
-                                 det,ring,sec,strip,sample),
-                            Form("FMD%d%c[%02d,%03%d]_%d",
-                                 det,ring,sec,strip),
-                            1024,-.5,1023.5);
+    TString name(Form("FMD%d%c[%02d,%03d]_%d", det,ring,sec,strip,sample));
+    TH1S* hSample = new TH1S(name.Data(),name.Data(), 1024,-.5,1023.5);
     hSample->SetXTitle("ADC");
     hSample->SetYTitle("Events");
     hSample->SetDirectory(0);
@@ -390,6 +388,9 @@ void AliFMDPedestalDA::Terminate(TFile* diagFile)
 //_____________________________________________________________________
 void AliFMDPedestalDA::FillinTimebins(std::ofstream& out, UShort_t /*ddl*/)
 {
+  // 
+  // Fill missing timebins
+  //
 #if 0
   unsigned short  boards[] = { 0x0, 0x1, 0x10, 0x11, 0xFFFF };
   unsigned short* board    = boards;
@@ -434,7 +435,9 @@ void AliFMDPedestalDA::FillinTimebins(std::ofstream& out, UShort_t /*ddl*/)
 //_____________________________________________________________________
 void AliFMDPedestalDA::WriteHeaderToFile() 
 {
+  //
   // Write headers to output files 
+  //
   AliFMDParameters* pars       = AliFMDParameters::Instance();
   fOutputFile.write(Form("# %s \n",pars->GetPedestalShuttleID()),13);
   TDatime now;
index d4b90d2..da291d3 100644 (file)
@@ -37,8 +37,6 @@ public:
    * @param pedDA Object to assign from
    */  
   AliFMDPedestalDA& operator=(const AliFMDPedestalDA&) { return *this; }
-
-  //  AliFMDPedestalDA& operator = (const AliFMDPedestalDA & pedDA) ; 
   /** 
    * Destructor
    * 
@@ -123,35 +121,36 @@ private:
                UShort_t chan) const;
   void FillinTimebins(std::ofstream& out, UShort_t ddl);
   /** Current strip */ 
-  Int_t fCurrentChannel;                                   //The current channel
+  Int_t fCurrentChannel;                           //The current channel
   /** Pedestal summary */ 
-  TH1F  fPedSummary;                                       //Summary of pedestals
+  TH1F  fPedSummary;                               //Summary of pedestals
   /** Noise summary */
-  TH1F  fNoiseSummary;                                     //Summary of noises
+  TH1F  fNoiseSummary;                             //Summary of noises
   /** Output file for zero-suppression for FMD1 */
-  std::ofstream fZSfileFMD1;                               //Stream for ZS FMD1
+  std::ofstream fZSfileFMD1;                       //Stream for ZS FMD1
   /** Output file for zero-suppression for FMD2 */
-  std::ofstream fZSfileFMD2;                               //Stream for ZS FMD2
+  std::ofstream fZSfileFMD2;                       //Stream for ZS FMD2
   /** Output file for zero-suppression for FMD3 */
-  std::ofstream fZSfileFMD3;                               //Stream for ZS FMD3 
+  std::ofstream fZSfileFMD3;                       //Stream for ZS FMD3 
   /** The minimum timebin seen for all channels */
-  TArrayS fMinTimebin;                                     //minimum timebin
+  TArrayS fMinTimebin;                             //minimum timebin
   /** The maximum timebin seen for all channels */
-  TArrayS fMaxTimebin;                                     //maximum timebin
+  TArrayS fMaxTimebin;                             //maximum timebin
   
   void  MakeSummary(UShort_t det, Char_t ring);
 
-  TH2* fSummaryFMD1i;                                      //Summary of FMD1
-  TH2* fSummaryFMD2i;                                      //Summary of FMD2I 
-  TH2* fSummaryFMD2o;                                      //Summary of FMD2O
-  TH2* fSummaryFMD3i;                                      //Summary of FMD3I
-  TH2* fSummaryFMD3o;                                      //Summary of FMD3O
+  TH2* fSummaryFMD1i;                              //Summary of FMD1
+  TH2* fSummaryFMD2i;                              //Summary of FMD2I 
+  TH2* fSummaryFMD2o;                              //Summary of FMD2O
+  TH2* fSummaryFMD3i;                              //Summary of FMD3I
+  TH2* fSummaryFMD3o;                              //Summary of FMD3O
   
   ClassDef(AliFMDPedestalDA,0)
 };
 
 inline Int_t
-AliFMDPedestalDA::HWIndex(UShort_t ddl, UShort_t b, UShort_t a, UShort_t c)const
+AliFMDPedestalDA::HWIndex(UShort_t ddl, UShort_t b, 
+                         UShort_t a, UShort_t c) const
 {
   // Save some array entries 
   UShort_t lb = (b > 1 ? b-16+2 : b);