Fixes in AliMixInputEventHandler to correctly set mixing parameters + reformating...
authormvala <mvala@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 1 Feb 2011 18:06:01 +0000 (18:06 +0000)
committermvala <mvala@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 1 Feb 2011 18:06:01 +0000 (18:06 +0000)
ANALYSIS/EventMixing/AliAnalysisTaskMixInfo.cxx
ANALYSIS/EventMixing/AliMixInfo.cxx
ANALYSIS/EventMixing/AliMixInputEventHandler.cxx

index c930e74..b54ab7a 100644 (file)
@@ -93,8 +93,8 @@ void AliAnalysisTaskMixInfo::UserExec(Option_t *)
             fMixInfo->FillHistogram(AliMixInfo::kMainEvents, mixEH->CurrentBinIndex());
          }
 
-      if (mixEH->CurrentEntryMix() >= 0)
-         AliDebug(AliLog::kDebug + 1, Form("Main %lld %d [%lld,%lld] %d", mixEH->CurrentEntry(), mixEH->NumberMixed(), mixEH->CurrentEntryMain(), mixEH->CurrentEntryMix(), mixEH->NumberMixed()));
+         if (mixEH->CurrentEntryMix() >= 0)
+            AliDebug(AliLog::kDebug + 1, Form("Main %lld %d [%lld,%lld] %d", mixEH->CurrentEntry(), mixEH->CurrentBinIndex(), mixEH->CurrentEntryMain(), mixEH->CurrentEntryMix(), mixEH->NumberMixed()));
       }
    }
    // Post output data.
@@ -115,7 +115,7 @@ void AliAnalysisTaskMixInfo::UserExecMix(Option_t *)
          AliError("Mix entry is -1 and it should not happen !!!!!");
          return ;
       }
-      AliDebug(AliLog::kDebug, Form("Mixing %lld %d [%lld,%lld] %d", mixEH->CurrentEntry(), mixEH->NumberMixed(), mixEH->CurrentEntryMain(), mixEH->CurrentEntryMix(), mixEH->CurrentBinIndex()));
+      AliDebug(AliLog::kDebug, Form("Mixing %lld %d [%lld,%lld] %d", mixEH->CurrentEntry(), mixEH->CurrentBinIndex(), mixEH->CurrentEntryMain(), mixEH->CurrentEntryMix(), mixEH->NumberMixed()));
    }
    // Post output data.
    PostData(1, fOutputList);
index 402c75a..8132f24 100644 (file)
@@ -206,12 +206,12 @@ void AliMixInfo::Draw(Option_t* option)
    style->SetPalette(4, cols);
    cMain->cd(2);
 //    cMain->SetGrid();
-   if (hMixInfo2D){
-   hMixInfo2D->SetMaximum(4);
-   hMixInfo2D->SetStats(0);
-   hMixInfo2D->SetTitle("");
-   hMixInfo2D->GetXaxis()->SetNdivisions(510);
-   hMixInfo2D->GetYaxis()->SetNdivisions(0);
+   if (hMixInfo2D) {
+      hMixInfo2D->SetMaximum(4);
+      hMixInfo2D->SetStats(0);
+      hMixInfo2D->SetTitle("");
+      hMixInfo2D->GetXaxis()->SetNdivisions(510);
+      hMixInfo2D->GetYaxis()->SetNdivisions(0);
    }
 
    if (hMixInfo2D) hMixInfo2D->Draw(Form("COL %s", option));
@@ -231,7 +231,7 @@ void AliMixInfo::DynamicExec(AliMixInfo *const mixInfo)
    // Function which is run when user move mouse over mix info
    //
 
-  if (!mixInfo) return;
+   if (!mixInfo) return;
 
    TObject *select = gPad->GetSelected();
    if (!select) return;
index 596c3e8..cac0cc3 100644 (file)
@@ -299,8 +299,8 @@ Bool_t AliMixInputEventHandler::MixBuffer()
    if (!fEntryCounter) {
       AliDebug(AliLog::kDebug + 3, Form("-> fEntryCounter == 0"));
       // runs UserExecMix for all tasks, if needed
-                       if (el) UserExecMixAllTasks(fEntryCounter, idEntryList, currentMainEntry, -1, 0);
-                       else UserExecMixAllTasks(fEntryCounter, -1, currentMainEntry, -1, 0);
+      if (el) UserExecMixAllTasks(fEntryCounter, idEntryList, currentMainEntry, -1, 0);
+      else UserExecMixAllTasks(fEntryCounter, -1, currentMainEntry, -1, 0);
       return kTRUE;
    }
    if (!el) {
@@ -310,7 +310,7 @@ Bool_t AliMixInputEventHandler::MixBuffer()
    } else {
       elNum = el->GetN();
       if (elNum < fBufferSize + 1) {
-                                UserExecMixAllTasks(fEntryCounter, idEntryList, currentMainEntry, -1, 0);
+         UserExecMixAllTasks(fEntryCounter, idEntryList, currentMainEntry, -1, 0);
          AliDebug(AliLog::kDebug + 3, Form("++++++++++++++ END SETUP EVENT %lld SKIPPED (%lld) +++++++++++++++++++", fEntryCounter, elNum));
          return kTRUE;
       }
@@ -320,7 +320,7 @@ Bool_t AliMixInputEventHandler::MixBuffer()
    Int_t counter = 0;
    AliInputEventHandler *eh = 0;
    TObjArrayIter next(&fInputHandlers);
-   while ((eh = dynamic_cast<AliInputEventHandler *> (next()))) {
+   while ((eh = dynamic_cast<AliInputEventHandler *>(next()))) {
       if (fEventPool && fEventPool->GetListOfEventCuts()->GetEntries() > 0) {
          entryMix = -1;
          if (elNum >= fBufferSize) {
@@ -387,7 +387,7 @@ Bool_t AliMixInputEventHandler::MixEventsMoreTimesWithOneEvent()
    if (!fEntryCounter) {
       // runs UserExecMix for all tasks, if needed
       if (el) UserExecMixAllTasks(fEntryCounter, idEntryList, currentMainEntry, -1, 0);
-                       else UserExecMixAllTasks(fEntryCounter, -1, currentMainEntry, -1, 0);
+      else UserExecMixAllTasks(fEntryCounter, -1, currentMainEntry, -1, 0);
       AliDebug(AliLog::kDebug + 3, Form("++++++++++++++ END SETUP EVENT %lld SKIPPED (fEntryCounter=0, idEntryList=%d) +++++++++++++++++++", fEntryCounter, idEntryList));
       return kTRUE;
    }
@@ -486,12 +486,11 @@ void AliMixInputEventHandler::UserExecMixAllTasks(Long64_t entryCounter, Int_t i
    while ((mixTask = (AliAnalysisTaskSE *) next())) {
       if (dynamic_cast<AliAnalysisTaskSE *>(mixTask)) {
          AliDebug(AliLog::kDebug, Form("%s %lld %d [%lld,%lld] %d", mixTask->GetName(), entryCounter, numMixed, entryMainReal, entryMixReal, idEntryList));
-         fCurrentEntry = idEntryList;
-         fCurrentEntryMain = entryCounter;
-         fCurrentEntryMix = entryMainReal;
-         fCurrentBinIndex = entryMixReal;
-
-         if (entryMixReal > -1) mixTask->UserExecMix("");
+         fCurrentEntry = entryCounter;
+         fCurrentEntryMain = entryMainReal;
+         fCurrentEntryMix = entryMixReal;
+         fCurrentBinIndex = idEntryList;
+         if (entryMixReal >= 0) mixTask->UserExecMix("");
       }
    }
 }