FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MySorterTask.cxx
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 /*
9  * MySorterTask.cxx
10  *
11  * Created on: Mar 7, 2012
12  * Author: uhlig
13  */
14 
15 #include "MySorterTask.h"
16 
17 #include "MyDataClass.h"
18 #include "MyRingSorter.h"
19 
22 {}
23 
25 
27 {
29  TClonesArray* myArray = ioman->GetTClonesArray(fOutputBranch);
30  if (fVerbose > 1) {
31  std::cout << "-I- MySorterTask::AddNewDataToTClonesArray Data: ";
32  std::cout << *(MyDataClass*)(data) << std::endl;
33  }
34  new ((*myArray)[myArray->GetEntries()]) MyDataClass(*(MyDataClass*)(data));
35 }
36 
37 FairRingSorter* MySorterTask::InitSorter(Int_t numberOfCells, Double_t widthOfCells) const
38 {
39  return new MyRingSorter(numberOfCells, widthOfCells);
40 }
41 
static FairRootManager * Instance()
ClassImp(FairEventBuilder)
virtual ~MySorterTask()
TClonesArray * GetTClonesArray(TString branchName)
Int_t fVerbose
Definition: FairTask.h:100
virtual void AddNewDataToTClonesArray(FairTimeStamp *data)
virtual FairRingSorter * InitSorter(Int_t numberOfCells, Double_t widthOfCells) const