FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairRingSorterTask.h
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 
13 #ifndef FairRingSorterTask_H
14 #define FairRingSorterTask_H
15 
16 #include "FairRingSorter.h" // for FairRingSorter
17 #include "FairTask.h" // for FairTask, InitStatus
18 
19 #include <Rtypes.h> // for Bool_t, Int_t, kTRUE, etc
20 #include <TString.h> // for TString
21 
22 class FairTimeStamp;
23 class TClonesArray;
24 
26 {
27  public:
30  : FairTask("SorterTask")
31  , fSorter(0)
32  , fPersistance(kTRUE)
33  , fDigiPixelMCInfo(kFALSE)
34  , fNumberOfCells(1000)
35  , fWidthOfCells(10)
36  , fInputBranch()
37  , fInputArray(0)
38  , fOutputBranch()
39  , fFolder()
40  , fOutputArray(0)
41  , fEntryNr(0)
42  {
43  SetVerbose(0);
44  }
45 
47  FairRingSorterTask(const char* name)
48  : FairTask(name)
49  , fSorter(0)
50  , fPersistance(kTRUE)
51  , fDigiPixelMCInfo(kFALSE)
52  , fNumberOfCells(1000)
53  , fWidthOfCells(10)
54  , fInputBranch()
55  , fInputArray(0)
56  , fOutputBranch()
57  , fFolder()
58  , fOutputArray(0)
59  , fEntryNr(0)
60  {
61  SetVerbose(0);
62  }
63 
64  FairRingSorterTask(Int_t numberOfCells,
65  Double_t widthOfCells,
66  TString inputBranch,
67  TString outputBranch,
68  TString folderName)
69  : FairTask("Sorter")
70  , fSorter(0)
71  , fPersistance(kTRUE)
72  , fDigiPixelMCInfo(kFALSE)
73  , fNumberOfCells(numberOfCells)
74  , fWidthOfCells(widthOfCells)
75  , fInputBranch(inputBranch)
76  , fInputArray(0)
77  , fOutputBranch(outputBranch)
78  , fFolder(folderName)
79  , fOutputArray(0)
80  , fEntryNr(0)
81  {
82  SetVerbose(0);
83  }
84 
86  virtual ~FairRingSorterTask() { delete fSorter; }
87 
89  virtual InitStatus Init();
90  virtual InitStatus ReInit();
91 
93  virtual void Exec(Option_t* opt);
94  virtual void FinishEvent();
95  virtual void FinishTask();
96 
97  virtual void SetParContainers(){};
98 
99  void SetPersistance(Bool_t p = kTRUE) { fPersistance = p; };
100  Bool_t GetPersistance() { return fPersistance; };
101 
102  virtual void AddNewDataToTClonesArray(FairTimeStamp* data);
103  virtual FairRingSorter* InitSorter(Int_t numberOfCells, Double_t widthOfCells) const;
104 
105  protected:
108  Bool_t fPersistance;
112  Double_t fWidthOfCells; // in ns
114  TString fInputBranch;
115  TClonesArray* fInputArray;
117  TString fOutputBranch;
118  TString fFolder;
119  TClonesArray* fOutputArray;
120  Int_t fEntryNr;
123 
125 };
126 
127 #endif
TClonesArray * fInputArray
virtual InitStatus Init()
virtual void FinishEvent()
FairRingSorterTask(Int_t numberOfCells, Double_t widthOfCells, TString inputBranch, TString outputBranch, TString folderName)
InitStatus
Definition: FairTask.h:33
virtual void SetParContainers()
void SetPersistance(Bool_t p=kTRUE)
FairRingSorterTask(const char *name)
ClassDef(FairRingSorterTask, 2)
virtual void AddNewDataToTClonesArray(FairTimeStamp *data)
void SetVerbose(Int_t iVerbose)
Definition: FairTask.cxx:99
virtual void FinishTask()
virtual void Exec(Option_t *opt)
virtual InitStatus ReInit()
FairRingSorterTask & operator=(const FairRingSorterTask &)
FairRingSorter * fSorter
TClonesArray * fOutputArray
virtual FairRingSorter * InitSorter(Int_t numberOfCells, Double_t widthOfCells) const