Fix compilation warnings (Laurent)
authorpcrochet <pcrochet@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 11 Mar 2013 21:12:52 +0000 (21:12 +0000)
committerpcrochet <pcrochet@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 11 Mar 2013 21:12:52 +0000 (21:12 +0000)
PWG/muondep/AliAnalysisMuMu.cxx
PWG/muondep/AliAnalysisMuMu.h
PWG/muondep/AliAnalysisMuMuResult.cxx
PWG/muondep/AliAnalysisTriggerScalers.cxx

index 8cf1234..fcfc807 100644 (file)
@@ -257,14 +257,14 @@ void AliAnalysisMuMu::BasicCounts(Bool_t detailTriggers,
            !fgDefaultMuonTriggers.Contains(strigger->String().Data()) &&
            !fgDefaultDimuonTriggers.Contains(strigger->String().Data()) ) continue;
           
-      ULong64_t n = fCounterCollection->GetSum(Form("trigger:%s/event:%s/run:%d",
-                                                    strigger->String().Data(),"ALL",srun->String().Atoi()));
+      ULong64_t n = TMath::Nint(fCounterCollection->GetSum(Form("trigger:%s/event:%s/run:%d",
+                                                    strigger->String().Data(),"ALL",srun->String().Atoi())));
 
       details += TString::Format("\n%50s %10lld",strigger->String().Data(),n);
       
 
-      ULong64_t nps = fCounterCollection->GetSum(Form("trigger:%s/event:%s/run:%d",
-                                                      strigger->String().Data(),"PSALL",srun->String().Atoi()));
+      ULong64_t nps = TMath::Nint(fCounterCollection->GetSum(Form("trigger:%s/event:%s/run:%d",
+                                                      strigger->String().Data(),"PSALL",srun->String().Atoi())));
 
       if ( doPS )
       {
@@ -3175,11 +3175,11 @@ void AliAnalysisMuMu::GetMBR(Int_t runNumber, const char* eventSelection, Double
   error = 0.0;
   if ( strlen(eventSelection) > 0 )
   {
-    ULong64_t a = fCounterCollection->GetSum(Form("trigger:CINT7-B-NOPF-ALLNOTRD/event:%s/run:%d",
-                                                  eventSelection,runNumber));
+    ULong64_t a = TMath::Nint(fCounterCollection->GetSum(Form("trigger:CINT7-B-NOPF-ALLNOTRD/event:%s/run:%d",
+                                                  eventSelection,runNumber)));
     
-    ULong64_t b = fCounterCollection->GetSum(Form("trigger:CINT7-B-NOPF-ALLNOTRD&0MUL/event:%s/run:%d",
-                                                  eventSelection,runNumber));
+    ULong64_t b = TMath::Nint(fCounterCollection->GetSum(Form("trigger:CINT7-B-NOPF-ALLNOTRD&0MUL/event:%s/run:%d",
+                                                  eventSelection,runNumber)));
     
     value = b > 0 ? a/b : 0;
     error = value*AliAnalysisMuMuResult::ErrorAB(a,TMath::Sqrt(a),b,TMath::Sqrt(b));
index b0a92ca..b14cf7a 100644 (file)
@@ -31,12 +31,9 @@ class TGraph;
 class TH1;
 class TMap;
 
-class AliAnalysisMuMu : public TObject
+class AliAnalysisMuMu : public TObject, public TQObject
 {
 
-  RQ_OBJECT("AliAnalysisMuMu")
-  
-
 public:
   
   enum EColor
index fd17027..b783c24 100644 (file)
@@ -519,6 +519,10 @@ fMother(0x0),
 fKeys(0x0),
 fWeight(rhs.fWeight),
 fRebin(rhs.fRebin),
+fTriggerClass(rhs.fTriggerClass),
+fEventSelection(rhs.fEventSelection),
+fPairSelection(rhs.fPairSelection),
+fCentralitySelection(rhs.fCentralitySelection),
 fAlias()
 {
   /// copy ctor
@@ -2101,7 +2105,7 @@ Long64_t AliAnalysisMuMuResult::Merge(TCollection* list)
   Double_t nofTriggers = fNofTriggers*thisWeight;
   Double_t nofRuns = fNofRuns*thisWeight;
   
-  fNofRuns *= thisWeight;
+  fNofRuns = TMath::Nint(fNofRuns*thisWeight);
   
   while ( ( currObj = next() ) )
   {
@@ -2121,8 +2125,8 @@ Long64_t AliAnalysisMuMuResult::Merge(TCollection* list)
   }
   
   thisWeight/= sumOfWeights;
-  fNofRuns = nofRuns/sumOfWeights;
-  fNofTriggers = nofTriggers/sumOfWeights;
+  fNofRuns = TMath::Nint(nofRuns/sumOfWeights);
+  fNofTriggers = TMath::Nint(nofTriggers/sumOfWeights);
   fWeight /= sumOfWeights;
   
   AliInfo(Form("thisWeight=%e sumOfWeight=%8.2f noftriggers=%e weight=%e",thisWeight,sumOfWeights,1.0*fNofTriggers,fWeight));
@@ -2448,7 +2452,7 @@ void AliAnalysisMuMuResult::SetNofInputParticles(const TH1& hminv)
     
     if ( n > 0 )
     {
-      SetNofInputParticles(particleNames[i],n);
+      SetNofInputParticles(particleNames[i],TMath::Nint(n));
     }
   }
 }
index 461e667..a2bd9e9 100644 (file)
@@ -552,7 +552,7 @@ AliAnalysisTriggerScalers::GetTriggerScaler(Int_t runNumber, const char* level,
   const AliTriggerScalersRecord* begin = (AliTriggerScalersRecord*)(scalers->First());
   const AliTriggerScalersRecord* end = (AliTriggerScalersRecord*)(scalers->Last());
 
-  time_t duration = (end->GetTimeStamp()->GetBunchCross() - begin->GetTimeStamp()->GetBunchCross())*AliTimeStamp::fNanosecPerBC*1E-9;
+  time_t duration = TMath::Nint((end->GetTimeStamp()->GetBunchCross() - begin->GetTimeStamp()->GetBunchCross())*AliTimeStamp::fNanosecPerBC*1E-9);
   
   AliTriggerClass* triggerClass = static_cast<AliTriggerClass*>(trClasses.FindObject(triggerClassName));
   if (!triggerClass)
@@ -796,12 +796,12 @@ AliAnalysisTriggerScalers::IntegratedLuminosityGraph(Int_t runNumber, const char
       continue;
     }
     
+    Double_t factor(1.0);
+    
     if ( ShouldCorrectForPileUp() && nbcx > 0 && l0b[0] > 0 )
     {
       Double_t mu = Mu(l0b[0]/timelapse,nbcx);
-      Double_t factor = mu/(1-TMath::Exp(-mu));
-      
-      l0b[0] *= factor;
+      factor = mu/(1-TMath::Exp(-mu));
     }
     
     vseconds.push_back(seconds);
@@ -813,7 +813,7 @@ AliAnalysisTriggerScalers::IntegratedLuminosityGraph(Int_t runNumber, const char
       lt = (l0a[1]*1.0)/l0b[1];
     }
 
-    counter += l0b[0]*lt;
+    counter += TMath::Nint(factor*l0b[0]*lt);
 
     vlumi.push_back( counter / lumiTriggerCrossSection );
     
@@ -991,7 +991,7 @@ void AliAnalysisTriggerScalers::IntegratedLuminosity(const char* triggerList,
     const AliTriggerScalersRecord* begin = (AliTriggerScalersRecord*)(scalers->First());
     const AliTriggerScalersRecord* end = (AliTriggerScalersRecord*)(scalers->Last());
     
-    time_t duration = (end->GetTimeStamp()->GetBunchCross() - begin->GetTimeStamp()->GetBunchCross())*AliTimeStamp::fNanosecPerBC*1E-9;
+    time_t duration = TMath::Nint((end->GetTimeStamp()->GetBunchCross() - begin->GetTimeStamp()->GetBunchCross())*AliTimeStamp::fNanosecPerBC*1E-9);
 
     nextTrigger.Reset();
 
@@ -1503,7 +1503,7 @@ TGraph* AliAnalysisTriggerScalers::PlotTriggerEvolution(const char* triggerClass
         }
         
         vx.push_back(seconds);
-        vex.push_back(1.0);
+        vex.push_back(1);
         
         vy.push_back(value);