]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG2/RESONANCES/AliRsnVATProcessInfo.cxx
Removed old ME classes, since the nex event mixing has been introduced and is integra...
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnVATProcessInfo.cxx
index fe020f30c07558ac4f284362e4a1d415e7ece39f..8d63553ec8d9d61b930a89efb05bb906413b33c6 100644 (file)
@@ -22,43 +22,43 @@ ClassImp(AliRsnVATProcessInfo)
 
 //______________________________________________________________________________
 AliRsnVATProcessInfo::AliRsnVATProcessInfo(const char *name) :
-  TNamed(name,name),
-  fHistUsedEvents(0x0),
-  fEventUsed(kFALSE),
-  fEventFunctions("AliRsnFunction", 0),
-  fPrintInfoNumber(1000)
+   TNamed(name, name),
+   fHistUsedEvents(0x0),
+   fEventUsed(kFALSE),
+   fEventFunctions("AliRsnFunction", 0),
+   fPrintInfoNumber(1000)
 {
 //
 // Constructor.
 // Does nothing more than initialization of data members.
 //
 
-  AliDebug(AliLog::kDebug+2, "Entering");
-  AliDebug(AliLog::kDebug+2, "Exiting");
+   AliDebug(AliLog::kDebug + 2, "Entering");
+   AliDebug(AliLog::kDebug + 2, "Exiting");
 }
 
 //______________________________________________________________________________
 AliRsnVATProcessInfo::AliRsnVATProcessInfo(const AliRsnVATProcessInfo& copy) :
-  TNamed(copy),
-  fHistUsedEvents(0x0),
-  fEventUsed(copy.fEventUsed),
-  fEventFunctions(copy.fEventFunctions),
-  fPrintInfoNumber(copy.fPrintInfoNumber)
+   TNamed(copy),
+   fHistUsedEvents(0x0),
+   fEventUsed(copy.fEventUsed),
+   fEventFunctions(copy.fEventFunctions),
+   fPrintInfoNumber(copy.fPrintInfoNumber)
 {
 //
 // Copy constructor.
 // Clones the histogram and copies the values of other data members
 //
 
-  AliDebug(AliLog::kDebug+2, "Entering");
-  
-  fHistUsedEvents  = (TH1I*)copy.fHistUsedEvents->Clone();
-  
-  AliDebug(AliLog::kDebug+2, "Exiting");
+   AliDebug(AliLog::kDebug + 2, "Entering");
+
+   fHistUsedEvents  = (TH1I*)copy.fHistUsedEvents->Clone();
+
+   AliDebug(AliLog::kDebug + 2, "Exiting");
 }
 
 //______________________________________________________________________________
-AliRsnVATProcessInfo& AliRsnVATProcessInfo::operator= 
+AliRsnVATProcessInfo& AliRsnVATProcessInfo::operator=
 (const AliRsnVATProcessInfo& copy)
 {
 //
@@ -66,16 +66,16 @@ AliRsnVATProcessInfo& AliRsnVATProcessInfo::operator=
 // Clones the histogram and copies the values of other data members.
 //
 
-  AliDebug(AliLog::kDebug+2, "Entering");
+   AliDebug(AliLog::kDebug + 2, "Entering");
+
+   fHistUsedEvents  = (TH1I*)copy.fHistUsedEvents->Clone();
+   fEventUsed       = copy.fEventUsed;
+   fPrintInfoNumber = copy.fPrintInfoNumber;
+   fEventFunctions  = copy.fEventFunctions;
+
+   AliDebug(AliLog::kDebug + 2, "Exiting");
 
-  fHistUsedEvents  = (TH1I*)copy.fHistUsedEvents->Clone();
-  fEventUsed       = copy.fEventUsed;
-  fPrintInfoNumber = copy.fPrintInfoNumber;
-  fEventFunctions  = copy.fEventFunctions;
-  
-  AliDebug(AliLog::kDebug+2, "Exiting");
-  
-  return (*this);
+   return (*this);
 }
 
 //______________________________________________________________________________
@@ -88,13 +88,13 @@ AliRsnVATProcessInfo::~AliRsnVATProcessInfo()
 // the data member pointers to NULL.
 //
 
-  AliDebug(AliLog::kDebug+2, "Entering");
-  
-  fHistUsedEvents  = 0x0;
-  fEventUsed       = 0;
-  fPrintInfoNumber = 0;
-  
-  AliDebug(AliLog::kDebug+2, "Exiting");
+   AliDebug(AliLog::kDebug + 2, "Entering");
+
+   fHistUsedEvents  = 0x0;
+   fEventUsed       = 0;
+   fPrintInfoNumber = 0;
+
+   AliDebug(AliLog::kDebug + 2, "Exiting");
 }
 
 //______________________________________________________________________________
@@ -102,37 +102,36 @@ void AliRsnVATProcessInfo::GenerateInfoList(TList *list)
 {
 //
 // Allocate in memory the histograms created in this class and store them
-// inside the TList object passed as argument, which usually belongs to 
+// inside the TList object passed as argument, which usually belongs to
 // an AnalysisTask object, and represents one of its outputs.
 // If the histogram was already initialized, it is deleted and recreated.
 //
 
-  AliDebug(AliLog::kDebug+2, "Entering");
-
-  // delete existing allocation of stored objects
-  if (fHistUsedEvents) delete fHistUsedEvents;
-  
-  // create stored objects
-  fHistUsedEvents = new TH1I(GetEventHistogramName(), "Skipped/used events", 3, 0, 3);
-
-  // ad objects to list
-  list->Add(fHistUsedEvents);
-  
-  // add all other functions
-  Int_t  i;
-  TString hName("");
-  AliRsnFunction *fcn = 0;
-  for (i = 0; i < fEventFunctions.GetEntries(); i++)
-  {
-    fcn = (AliRsnFunction*)fEventFunctions.At(i);
-    hName += GetName();
-    hName += '_';
-    hName += fcn->GetName();
-    if (fcn->IsUsingTH1()) list->Add(fcn->CreateHistogram(hName.Data(), ""));
-    else list->Add(fcn->CreateHistogramSparse(hName.Data(), ""));
-  }
-
-  AliDebug(AliLog::kDebug+2, "Exiting");
+   AliDebug(AliLog::kDebug + 2, "Entering");
+
+   // delete existing allocation of stored objects
+   if (fHistUsedEvents) delete fHistUsedEvents;
+
+   // create stored objects
+   fHistUsedEvents = new TH1I(GetEventHistogramName(), "Skipped/used events", 3, 0, 3);
+
+   // ad objects to list
+   list->Add(fHistUsedEvents);
+
+   // add all other functions
+   Int_t  i;
+   TString hName("");
+   AliRsnFunction *fcn = 0;
+   for (i = 0; i < fEventFunctions.GetEntries(); i++) {
+      fcn = (AliRsnFunction*)fEventFunctions.At(i);
+      hName += GetName();
+      hName += '_';
+      hName += fcn->GetName();
+      if (fcn->IsUsingTH1()) list->Add(fcn->CreateHistogram(hName.Data(), ""));
+      else list->Add(fcn->CreateHistogramSparse(hName.Data(), ""));
+   }
+
+   AliDebug(AliLog::kDebug + 2, "Exiting");
 }
 
 //______________________________________________________________________________
@@ -147,17 +146,16 @@ void AliRsnVATProcessInfo::FillInfo()
 // histogram (bin '0' = skipped, bin '1' = used).
 //
 
-  fHistUsedEvents->Fill(fEventUsed);
-  
-  if (!fEventUsed) return;
-  
-  Int_t i;
-  AliRsnFunction *fcn = 0;
-  for (i = 0; i < fEventFunctions.GetEntries(); i++)
-  {
-    fcn = (AliRsnFunction*)fEventFunctions.At(i);
-    fcn->Fill();
-  }
+   fHistUsedEvents->Fill(fEventUsed);
+
+   if (!fEventUsed) return;
+
+   Int_t i;
+   AliRsnFunction *fcn = 0;
+   for (i = 0; i < fEventFunctions.GetEntries(); i++) {
+      fcn = (AliRsnFunction*)fEventFunctions.At(i);
+      fcn->Fill();
+   }
 }
 
 //______________________________________________________________________________
@@ -168,7 +166,7 @@ void AliRsnVATProcessInfo::PrintInfo(const Long64_t &num)
 // to inform about number of events processed
 //
 
-  if ((num+1) % fPrintInfoNumber == 0) AliInfo(Form("Events processed %lld", num+1));
+   if ((num + 1) % fPrintInfoNumber == 0) AliInfo(Form("Events processed %lld", num + 1));
 }
 
 //______________________________________________________________________________
@@ -178,8 +176,8 @@ Long64_t AliRsnVATProcessInfo::GetNumerOfEventsProcessed()
 // returns number of events from histogram
 //
 
-  if (fHistUsedEvents) return fHistUsedEvents->Integral();
-  return 0;
+   if (fHistUsedEvents) return fHistUsedEvents->Integral();
+   return 0;
 }
 
 //_____________________________________________________________________________
@@ -189,11 +187,11 @@ void AliRsnVATProcessInfo::AddEventFunction(AliRsnFunction * fcn)
 // Adds a new computing function
 //
 
-  AliDebug(AliLog::kDebug+2,"<-");
-  
-  fEventFunctions.Print();
-  Int_t size = fEventFunctions.GetEntries();
-  new(fEventFunctions[size]) AliRsnFunction(*fcn);
-  
-  AliDebug(AliLog::kDebug+2,"->");
+   AliDebug(AliLog::kDebug + 2, "<-");
+
+   fEventFunctions.Print();
+   Int_t size = fEventFunctions.GetEntries();
+   new(fEventFunctions[size]) AliRsnFunction(*fcn);
+
+   AliDebug(AliLog::kDebug + 2, "->");
 }