Corrected code to get rid of compilation warnings
authorhdalsgaa <hdalsgaa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 21 May 2008 09:42:54 +0000 (09:42 +0000)
committerhdalsgaa <hdalsgaa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 21 May 2008 09:42:54 +0000 (09:42 +0000)
FMD/AliFMDBaseDA.cxx
FMD/AliFMDBaseDA.h
FMD/AliFMDGainDA.cxx
FMD/AliFMDPedestalDA.cxx
FMD/AliFMDQADataMakerRec.cxx
FMD/AliFMDQADataMakerRec.h
FMD/AliFMDQADataMakerSim.cxx
FMD/AliFMDQADataMakerSim.h

index 373c732..10457f0 100644 (file)
@@ -50,7 +50,7 @@ AliFMDBaseDA::AliFMDBaseDA() : TNamed(),
 //_____________________________________________________________________
 AliFMDBaseDA::AliFMDBaseDA(const AliFMDBaseDA & baseDA) : 
   TNamed(baseDA),
-  fDiagnosticsFilename(baseDA.fDiagnosticsFilename),
+  fDiagnosticsFilename(baseDA.fDiagnosticsFilename.Data()),
   fOutputFile(),
   fConditionsFile(),
   fSaveHistograms(baseDA.fSaveHistograms),
@@ -82,7 +82,7 @@ void AliFMDBaseDA::Run(AliRawReader* reader) {
   TFile* diagFile = 0;
   if(fSaveHistograms)
     {
-      diagFile = TFile::Open(fDiagnosticsFilename,"RECREATE");
+      diagFile = TFile::Open(fDiagnosticsFilename.Data(),"RECREATE");
       for(UShort_t det=1;det<=3;det++) {
        UShort_t FirstRing = (det == 1 ? 1 : 0);
        
@@ -91,13 +91,13 @@ void AliFMDBaseDA::Run(AliRawReader* reader) {
          UShort_t nsec = (ir == 0 ? 40  : 20);
          UShort_t nstr = (ir == 0 ? 256 : 512);
          
-         gDirectory->cd(Form("%s:/",fDiagnosticsFilename));
+         gDirectory->cd(Form("%s:/",fDiagnosticsFilename.Data()));
          gDirectory->mkdir(Form("FMD%d%c",det,ring),Form("FMD%d%c",det,ring));
          for(UShort_t sec =0; sec < nsec;  sec++)  {
-           gDirectory->cd(Form("%s:/FMD%d%c",fDiagnosticsFilename,det,ring));
+           gDirectory->cd(Form("%s:/FMD%d%c",fDiagnosticsFilename.Data(),det,ring));
            gDirectory->mkdir(Form("sector_%d",sec));
            for(UShort_t strip = 0; strip < nstr; strip++) {
-             gDirectory->cd(Form("%s:/FMD%d%c/sector_%d",fDiagnosticsFilename,det,ring,sec));
+             gDirectory->cd(Form("%s:/FMD%d%c/sector_%d",fDiagnosticsFilename.Data(),det,ring,sec));
              gDirectory->mkdir(Form("strip_%d",strip));
              
             }
index df0192f..e1923d3 100644 (file)
@@ -22,7 +22,7 @@
 #include "TFile.h"
 #include "iostream"
 #include "fstream"
-
+#include "TString.h"
 #include "AliRawReader.h"
 #include "AliFMDDigit.h"
 #include "AliFMDParameters.h"
@@ -54,7 +54,8 @@ class AliFMDBaseDA: public TNamed {
   Int_t GetCurrentEvent() {return fCurrentEvent;}
   
   static const UInt_t kBaseDDL = 3072;
-  Char_t* fDiagnosticsFilename;
+  //Char_t* fDiagnosticsFilename;
+  TString fDiagnosticsFilename;
   std::ofstream fOutputFile;
   std::ofstream fConditionsFile;
   Bool_t fSaveHistograms;
index 2842e0b..aea5c5d 100644 (file)
@@ -174,7 +174,7 @@ void AliFMDGainDA::Analyse(UShort_t det,
   
   if(fSaveHistograms) {
     
-    gDirectory->cd(Form("%s:FMD%d%c/sector_%d/strip_%d",fDiagnosticsFilename,det,ring,sec,strip));
+    gDirectory->cd(Form("%s:FMD%d%c/sector_%d/strip_%d",fDiagnosticsFilename.Data(),det,ring,sec,strip));
     grChannel->Write(Form("grFMD%d%c_%d_%d",det,ring,sec,strip));
   }
   
@@ -261,7 +261,7 @@ void AliFMDGainDA::UpdatePulseAndADC(UShort_t det, Char_t ring, UShort_t sec, US
  
   
   if(fSaveHistograms) {
-    gDirectory->cd(Form("%s:FMD%d%c/sector_%d/strip_%d",fDiagnosticsFilename,det,ring,sec,channelNumber));
+    gDirectory->cd(Form("%s:FMD%d%c/sector_%d/strip_%d",fDiagnosticsFilename.Data(),det,ring,sec,channelNumber));
     hChannel->Write(Form("hFMD%d%c_%d_%d_pulse_%d",det,ring,sec,channelNumber,fCurrentPulse));
   }
   
index 0099784..a6b6e2c 100644 (file)
@@ -136,7 +136,7 @@ void AliFMDPedestalDA::Analyse(UShort_t det,
              << chi2ndf                     <<"\n";
   
   if(fSaveHistograms) {
-    gDirectory->cd(Form("%s:FMD%d%c/sector_%d/strip_%d",fDiagnosticsFilename,det,ring,sec,strip));
+    gDirectory->cd(Form("%s:FMD%d%c/sector_%d/strip_%d",fDiagnosticsFilename.Data(),det,ring,sec,strip));
     hChannel->GetXaxis()->SetRange(0,1023);
     hChannel->Write();
     
index 2bec4a8..b4ffb5d 100644 (file)
@@ -50,7 +50,9 @@ ClassImp(AliFMDQADataMakerRec)
 //_____________________________________________________________________
 AliFMDQADataMakerRec::AliFMDQADataMakerRec() : 
   AliQADataMakerRec(AliQA::GetDetName(AliQA::kFMD), 
-                   "FMD Quality Assurance Data Maker")
+                   "FMD Quality Assurance Data Maker"),
+  fDigitsArray(0),
+  fRecPointsArray(0)
 {
   // ctor
   fDigitsArray = new TClonesArray("AliFMDDigit", 1000) ; 
@@ -58,8 +60,11 @@ AliFMDQADataMakerRec::AliFMDQADataMakerRec() :
 }
 
 //_____________________________________________________________________
-AliFMDQADataMakerRec::AliFMDQADataMakerRec(const AliFMDQADataMakerRec& /*qadm*/) 
-  : AliQADataMakerRec()
+AliFMDQADataMakerRec::AliFMDQADataMakerRec(const AliFMDQADataMakerRec& qadm) 
+  : AliQADataMakerRec(AliQA::GetDetName(AliQA::kFMD), 
+                     "FMD Quality Assurance Data Maker"),
+    fDigitsArray(qadm.fDigitsArray),
+    fRecPointsArray(qadm.fRecPointsArray)
 {
   // copy ctor 
   // Parameters: 
@@ -67,6 +72,14 @@ AliFMDQADataMakerRec::AliFMDQADataMakerRec(const AliFMDQADataMakerRec& /*qadm*/)
   
 }
 //_____________________________________________________________________
+AliFMDQADataMakerRec& AliFMDQADataMakerRec::operator = (const AliFMDQADataMakerRec& qadm ) 
+{
+  fDigitsArray = qadm.fDigitsArray;
+  fRecPointsArray = qadm.fRecPointsArray;
+  
+  return *this;
+}
+//_____________________________________________________________________
 AliFMDQADataMakerRec::~AliFMDQADataMakerRec()
 {
   delete fDigitsArray;
@@ -210,7 +223,7 @@ void AliFMDQADataMakerRec::MakeRecPoints(TTree* clustersTree)
   TIter next(fRecPointsArray) ; 
   AliFMDRecPoint * rp ; 
   while ((rp = static_cast<AliFMDRecPoint*>(next()))) {
-    GetRecPointsData(0)->Fill(rp->Particles()) ;
+    GetRecPointsData(0)->Fill(rp->Edep()) ;
   }
 
 }
index dd8796a..54b2f58 100644 (file)
@@ -22,7 +22,8 @@ class AliFMDQADataMakerRec: public AliQADataMakerRec
 {
 public:
   AliFMDQADataMakerRec();
-  AliFMDQADataMakerRec(const AliFMDQADataMakerRec& qadm);   
+  AliFMDQADataMakerRec(const AliFMDQADataMakerRec& qadm);
+  AliFMDQADataMakerRec& operator = (const AliFMDQADataMakerRec& qadm) ;
   virtual ~AliFMDQADataMakerRec();
 private:
   virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * list);
index eb876bd..1cd167c 100644 (file)
@@ -56,15 +56,26 @@ AliFMDQADataMakerSim::AliFMDQADataMakerSim()
 }
 
 //_____________________________________________________________________
-AliFMDQADataMakerSim::AliFMDQADataMakerSim(const AliFMDQADataMakerSim& /*qadm*/) 
-  : AliQADataMakerSim()
+AliFMDQADataMakerSim::AliFMDQADataMakerSim(const AliFMDQADataMakerSim& qadm) 
+  : AliQADataMakerSim(),
+    fDigitsArray(qadm.fDigitsArray),
+    fHitsArray(qadm.fHitsArray)
 {
   //copy ctor 
+  
   // Parameters: 
   //    qadm    Object to copy from
   
 }
 //_____________________________________________________________________
+AliFMDQADataMakerSim& AliFMDQADataMakerSim::operator = (const AliFMDQADataMakerSim& qadm ) 
+{
+  fDigitsArray = qadm.fDigitsArray;
+  fHitsArray = qadm.fHitsArray;
+  
+  return *this;
+}
+//_____________________________________________________________________
 AliFMDQADataMakerSim::~AliFMDQADataMakerSim()
 {
   delete fDigitsArray;
@@ -107,7 +118,7 @@ void AliFMDQADataMakerSim::InitDigits()
 //_____________________________________________________________________
 void AliFMDQADataMakerSim::MakeHits(TClonesArray * hits)
 {
-  TIter next(fHitsArray);
+  TIter next(hits);
   AliFMDHit * hit;
   while ((hit = static_cast<AliFMDHit *>(next()))) 
     GetHitsData(0)->Fill(hit->Edep()/hit->Length()*0.032);
index eafcb59..a3a285b 100644 (file)
@@ -25,6 +25,7 @@ class AliFMDQADataMakerSim: public AliQADataMakerSim {
  public:
   AliFMDQADataMakerSim() ;          // ctor
   AliFMDQADataMakerSim(const AliFMDQADataMakerSim& qadm) ;   
+  AliFMDQADataMakerSim& operator = (const AliFMDQADataMakerSim& qadm) ;
   virtual ~AliFMDQADataMakerSim();  // dtor
   
  private:
@@ -42,8 +43,8 @@ class AliFMDQADataMakerSim: public AliQADataMakerSim {
   // virtual void   MakeSDigits(TTree * sigitTree) ; 
   virtual void   StartOfDetectorCycle() ; 
   
-  TClonesArray* fDigitsArray;
-  TClonesArray* fHitsArray;
+  TClonesArray *fDigitsArray;
+  TClonesArray *fHitsArray;
   
   ClassDef(AliFMDQADataMakerSim,0)  // description 
     };