#include "AliAnalysisManager.h" #include "AliAnalysisTask.h" int main() { AliAnalysisManager *mgr = new AliAnalysisManager("my_analysis"); // add a task to the manager AliAnalysisTask *task = new AliAnalysisTask("my_task"); mgr->AddTask(task); // initialize the manager mgr->Init(); // start the analysis loop mgr->StartAnalysis(); // clean up delete task; delete mgr; return 0; }
#include "AliAnalysisManager.h" #include "AliVEvent.h" int main() { AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); AliVEvent *ev = mgr->GetInputEvent(); if (ev) { // process the event } else { std::cerr << "Error: No input event found." << std::endl; } return 0; }In this example, we retrieve the input event object from the AliAnalysisManager instance. We can then perform event-level analysis using the event object. Package/library: AliRoot