5 #ifndef BSEMCSORTERTASK_HH 6 #define BSEMCSORTERTASK_HH 8 #include <FairRingSorter.h> 9 #include <FairRingSorterTask.h> 10 #include <FairRootManager.h> 12 #include "TClonesArray.h" 28 BSEmcSorterTask(Int_t t_numberOfCells, Double_t t_widthOfCells,
const std::string &t_inputbranch,
const std::string &t_outputbranch)
29 : FairRingSorterTask(t_numberOfCells, t_widthOfCells, TString{t_inputbranch}, TString{t_outputbranch},
"Emc")
38 FairRootManager *ioman = FairRootManager::Instance();
39 TClonesArray *myArray = ioman->GetTClonesArray(fOutputBranch);
41 std::cout <<
"-I- BSEmcSorterTask::AddNewDataToTClonesArray Data: ";
42 std::cout << *(T *)(t_data) << std::endl;
44 new ((*myArray)[myArray->GetEntries()]) T(*(dynamic_cast<T *>(t_data)));
46 virtual FairRingSorter *
InitSorter(Int_t t_numberOfCells, Double_t t_widthOfCells)
const {
return new BSEmcRingSorter<T>(t_numberOfCells, t_widthOfCells); };
47 void SetSourceBranch(
const TString &t_branchname) { this->fInputBranch = t_branchname; }
48 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)