//______________________________________________________________________________
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)
{
//
// 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);
}
//______________________________________________________________________________
// 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");
}
//______________________________________________________________________________
{
//
// 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");
}
//______________________________________________________________________________
// 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();
+ }
}
//______________________________________________________________________________
// 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));
}
//______________________________________________________________________________
// returns number of events from histogram
//
- if (fHistUsedEvents) return fHistUsedEvents->Integral();
- return 0;
+ if (fHistUsedEvents) return fHistUsedEvents->Integral();
+ return 0;
}
//_____________________________________________________________________________
// 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, "->");
}