17 #ifndef BSEMCSORTERTASK_HH 18 #define BSEMCSORTERTASK_HH 20 #include <FairRingSorter.h> 21 #include <FairRingSorterTask.h> 22 #include <FairRootManager.h> 24 #include "TClonesArray.h" 40 BSEmcSorterTask(Int_t t_numberOfCells, Double_t t_widthOfCells,
const std::string &t_inputbranch,
const std::string &t_outputbranch)
41 : FairRingSorterTask(t_numberOfCells, t_widthOfCells, TString{t_inputbranch}, TString{t_outputbranch},
"Emc")
50 FairRootManager *ioman = FairRootManager::Instance();
51 TClonesArray *myArray = ioman->GetTClonesArray(fOutputBranch);
53 std::cout <<
"-I- BSEmcSorterTask::AddNewDataToTClonesArray Data: ";
54 std::cout << *(T *)(t_data) << std::endl;
56 new ((*myArray)[myArray->GetEntries()]) T(*(dynamic_cast<T *>(t_data)));
58 virtual FairRingSorter *
InitSorter(Int_t t_numberOfCells, Double_t t_widthOfCells)
const {
return new BSEmcRingSorter<T>(t_numberOfCells, t_widthOfCells); };
59 void SetSourceBranch(
const TString &t_branchname) { this->fInputBranch = t_branchname; }
60 void SetTargetBranch(
const TString &t_branchname) { this->fOutputBranch = t_branchname; }
virtual void AddNewDataToTClonesArray(FairTimeStamp *t_data)
templated version of a sorter task
templated version of a ring sorter
virtual FairRingSorter * InitSorter(Int_t t_numberOfCells, Double_t t_widthOfCells) const
BSEmcSorterTask(Int_t t_numberOfCells, Double_t t_widthOfCells, const std::string &t_inputbranch, const std::string &t_outputbranch)
void SetSourceBranch(const TString &t_branchname)
virtual ~BSEmcSorterTask()
ClassDef(BSEmcSorterTask, 1)
void SetTargetBranch(const TString &t_branchname)