/* * PndEmcClusterSorterTask.cxx */ #include #include "PndEmcCluster.h" #include "PndEmcClusterRingSorter.h" #include "TClonesArray.h" ClassImp(PndEmcClusterSorterTask); PndEmcClusterSorterTask::PndEmcClusterSorterTask() { } PndEmcClusterSorterTask::~PndEmcClusterSorterTask() { } void PndEmcClusterSorterTask::AddNewDataToTClonesArray(FairTimeStamp* data) { FairRootManager* ioman = FairRootManager::Instance(); TClonesArray* myArray = ioman->GetTClonesArray(fOutputBranch); if (fVerbose > 1){ std::cout << "-I- PndEmcClusterSorterTask::AddNewDataToTClonesArray Data: " ; std::cout << *(PndEmcCluster*)(data) << std::endl; } new ((*myArray)[myArray->GetEntries()]) PndEmcCluster(*(PndEmcCluster*)(data)); } FairRingSorter* PndEmcClusterSorterTask::InitSorter(Int_t numberOfCells, Double_t widthOfCells) const{ return new PndEmcClusterRingSorter(numberOfCells, widthOfCells); }