forked from R3BRootGroup/R3BRoot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathR3BPdcMapped2Cal.h
122 lines (101 loc) · 3.78 KB
/
R3BPdcMapped2Cal.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
/******************************************************************************
* Copyright (C) 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH *
* Copyright (C) 2019 Members of R3B Collaboration *
* *
* This software is distributed under the terms of the *
* GNU General Public Licence (GPL) version 3, *
* copied verbatim in the file "LICENSE". *
* *
* In applying this license GSI does not waive the privileges and immunities *
* granted to it by virtue of its status as an Intergovernmental Organization *
* or submit itself to any jurisdiction. *
******************************************************************************/
#ifndef R3BPDCMAPPED2TCAL
#define R3BPDCMAPPED2TCAL
#include <vector>
#include "FairTask.h"
class TClonesArray;
class R3BTCalPar;
class R3BPdcMappedData;
class R3BPdcCalData;
class R3BEventHeader;
/**
* An analysis task to apply TCAL calibration for NeuLAND.
* This class reads NeuLAND mapped items with TDC values and
* produces time items with time in [ns]. It requires TCAL
* calibration parameters, which are produced in a separate
* analysis run containing R3BPdcMapped2CalFill task.
*/
class R3BPdcMapped2Cal : public FairTask
{
public:
/**
* Default constructor.
* Creates an instance of the task with default parameters.
*/
R3BPdcMapped2Cal();
/**
* Standard constructor.
* Creates an instance of the task.
* @param iVerbose a verbosity level.
*/
R3BPdcMapped2Cal(Int_t = 1);
/**
* Destructor.
* Frees the memory used by the object.
*/
virtual ~R3BPdcMapped2Cal();
/**
* Method for task initialization.
* This function is called by the framework before
* the event loop.
* @return Initialization status. kSUCCESS, kERROR or kFATAL.
*/
InitStatus Init();
/**
* Method for initialization of the parameter containers.
* Called by the framework prior to Init() method.
*/
void SetParContainers();
/**
* Method for re-initialization of parameter containers
* in case the Run ID has changed.
*/
InitStatus ReInit();
/**
* Method for event loop implementation.
* Is called by the framework every time a new event is read.
* @param option an execution option.
*/
void Exec(Option_t*);
/**
* A method for finish of processing of an event.
* Is called by the framework for each event after executing
* the tasks.
*/
void FinishEvent();
/**
* Method for finish of the task execution.
* Is called by the framework after processing the event loop.
*/
void FinishTask();
/**
* Method for setting the trigger value.
* @param trigger 1 - onspill, 2 - offspill, -1 - all events.
*/
inline void SetTrigger(Int_t trigger) { fTrigger = trigger; }
private:
TClonesArray* fMappedItems; /**< Array with mapped items - input data. */
TClonesArray* fCalItems; /**< Array with cal items - output data. */
TClonesArray* fCalTriggerItems; /**< Array with cal trigger items - output data. */
R3BTCalPar* fTcalPar; /**< TCAL parameter container. */
UInt_t fNofTcalPars; /**< Number of modules in parameter file. */
Double_t fClockFreq; /**< Clock cycle in [ns]. */
Int_t fnEvents;
// check for trigger should be done globablly (somewhere else)
R3BEventHeader* header; /**< Event header. */
Int_t fTrigger; /**< Trigger value. */
public:
ClassDef(R3BPdcMapped2Cal, 1)
};
#endif