ATTPCROOT  0.3.0-alpha
A ROOT-based framework for analyzing data from active target detectors
AtDecoder2Task.h
Go to the documentation of this file.
1 
2 #ifndef _AtDECODER2TASK_H_
3 #define _AtDECODER2TASK_H_
4 
5 #include "AtCore2.h"
6 #include "AtDigiPar.h"
7 #include "AtPedestal.h"
8 #include "AtRawEvent.h"
9 #include "AtTpcMap.h"
10 
11 #include <FairLogger.h>
12 #include <FairTask.h>
13 
14 // ROOT classes
15 #include <TClonesArray.h>
16 #include <TString.h>
17 
18 // STL
19 #include <vector>
20 
21 using std::vector;
22 
23 class AtDecoder2Task : public FairTask {
24 private:
25  AtCore2 *fDecoder;
26 
27  vector<TString> fDataList[40];
28  Int_t fDataNum;
29 
30  Double_t fFPNPedestalRMS;
31 
32  Bool_t fExternalNumTbs;
33  Int_t fNumTbs;
34 
35  Bool_t fIsPersistence;
36 
37  std::shared_ptr<AtMap> fMap;
38 
39  AtDigiPar *fPar;
40  TClonesArray *fRawEventArray;
41  AtRawEvent *fRawEvent;
42 
43  Bool_t fOldData;
44  Bool_t fIsSeparatedData;
45  Bool_t fIsPositive;
46  Bool_t fIsPseudoTopology;
47 
48  Long64_t fEventIDLast;
49  Long64_t fEventID;
50 
51  Long64_t fInternalID;
52 
53  Int_t fNumCobo;
54  Int_t fMask;
55 
56 public:
61 
63  void SetNumTbs(Int_t numTbs);
65  void AddData(TString filename, Int_t coboIdx = 0);
67  void SetData(Int_t value);
69  void SetFPNPedestal(Double_t rms);
72  // void SetUseGainCalibration(Bool_t value = kTRUE);
74  // void SetGainCalibrationData(TString filename);
76  // void SetGainReference(Double_t constant, Double_t linear, Double_t quadratic = 0.);
78  void SetOldData(Bool_t oldData = kTRUE);
80  void SetUseSeparatedData(Bool_t value = kTRUE);
82  void SetEventID(Long64_t eventid = -1);
83 
84  void SetMap(std::shared_ptr<AtMap> map) { fMap = map; }
85  void SetPseudoTopologyFrame(Bool_t value);
86  void SetPTFMask(Int_t mask);
87 
88  Long64_t GetEventID();
89 
91  void SetPersistence(Bool_t value = kTRUE);
92  void SetPositivePolarity(Bool_t value = kFALSE);
93 
95  virtual InitStatus Init();
97  virtual void SetParContainers();
99  virtual void Exec(Option_t *opt);
101  virtual void FinishEvent();
102 
104  Int_t ReadEvent(Int_t eventID);
105 
106  void SetNumCobo(Int_t numCobo);
107 
109 };
110 
111 #endif
AtDecoder2Task::SetOldData
void SetOldData(Bool_t oldData=kTRUE)
Setting gain calibration data file. If not set, gain is not calibrated.
AtRawEvent.h
AtDecoder2Task::ReadEvent
Int_t ReadEvent(Int_t eventID)
Read event for AtSource.
Definition: AtDecoder2Task.cxx:193
AtPedestal.h
AtDecoder2Task::SetFPNPedestal
void SetFPNPedestal(Double_t rms)
Setting the FPN RMS value cut for pedestal region taking.
Definition: AtDecoder2Task.cxx:70
AtDecoder2Task::AddData
void AddData(TString filename, Int_t coboIdx=0)
Adding raw data file to the list.
Definition: AtDecoder2Task.cxx:62
AtDecoder2Task::SetParContainers
virtual void SetParContainers()
Setting parameter containers. This will be called inbetween Init() and Run().
Definition: AtDecoder2Task.cxx:156
AtDecoder2Task::SetPseudoTopologyFrame
void SetPseudoTopologyFrame(Bool_t value)
Definition: AtDecoder2Task.cxx:90
AtCore2
Definition: AtCore2.h:26
AtCore2.h
AtRawEvent
Definition: AtRawEvent.h:34
AtDecoder2Task::Exec
virtual void Exec(Option_t *opt)
Running the task. This will be called when Run() method invoked from FairRun.
Definition: AtDecoder2Task.cxx:171
AtDigiPar.h
AtDigiPar
Definition: AtDigiPar.h:14
AtDecoder2Task::SetUseSeparatedData
void SetUseSeparatedData(Bool_t value=kTRUE)
Setting to use not merged data files.
Definition: AtDecoder2Task.cxx:82
AtDecoder2Task::SetMap
void SetMap(std::shared_ptr< AtMap > map)
Definition: AtDecoder2Task.h:84
AtDecoder2Task::SetPTFMask
void SetPTFMask(Int_t mask)
Definition: AtDecoder2Task.cxx:99
AtDecoder2Task::SetNumCobo
void SetNumCobo(Int_t numCobo)
Definition: AtDecoder2Task.cxx:95
AtDecoder2Task::SetEventID
void SetEventID(Long64_t eventid=-1)
Setting event id for STSource.
Definition: AtDecoder2Task.cxx:86
AtDecoder2Task::GetEventID
Long64_t GetEventID()
Definition: AtDecoder2Task.cxx:104
AtDecoder2Task::ClassDef
ClassDef(AtDecoder2Task, 2)
AtDecoder2Task::SetPositivePolarity
void SetPositivePolarity(Bool_t value=kFALSE)
Definition: AtDecoder2Task.cxx:74
AtDecoder2Task::SetPersistence
void SetPersistence(Bool_t value=kTRUE)
If set, decoded raw data is written in ROOT file with AtRawEvent class.
Definition: AtDecoder2Task.cxx:53
AtDecoder2Task::SetData
void SetData(Int_t value)
Setting which data to be decoded.
Definition: AtDecoder2Task.cxx:66
AtDecoder2Task
Definition: AtDecoder2Task.h:23
AtTpcMap.h
AtDecoder2Task::Init
virtual InitStatus Init()
Initializing the task. This will be called when Init() method invoked from FairRun.
Definition: AtDecoder2Task.cxx:109
AtDecoder2Task::~AtDecoder2Task
~AtDecoder2Task()
Destructor.
Definition: AtDecoder2Task.cxx:51
AtDecoder2Task::SetNumTbs
void SetNumTbs(Int_t numTbs)
Setting the number of time buckets used when taking data.
Definition: AtDecoder2Task.cxx:57
AtDecoder2Task::AtDecoder2Task
AtDecoder2Task()
Constructor.
Definition: AtDecoder2Task.cxx:17
AtDecoder2Task::FinishEvent
virtual void FinishEvent()
Finishing the event.
Definition: AtDecoder2Task.cxx:208