14 |
|
|
15 |
/*! @enum LT_Return Return values for rejected events */ |
/*! @enum LT_Return Return values for rejected events */ |
16 |
enum LT_Return { |
enum LT_Return { |
17 |
LT_NEWRUN, ///< Discarded because it is the first event of the run. |
//LT_NEWRUN, ///< Discarded because it is the first event of the run. |
18 |
LT_INVALID |
LT_INVALID |
19 |
///< Discarded because the LT is greater than timeout. |
///< Discarded because the LT is greater than timeout. |
20 |
}; |
}; |
21 |
|
|
22 |
/*! @brief The live-time data quality cut: rejects the first event of each run and events with LT greater than an upper threshold (or with LT smaller than 0). |
/*! @brief The live-time data quality cut: rejects events with LT greater |
23 |
|
* than an upper threshold (or with LT smaller than 0). |
24 |
*/ |
*/ |
25 |
class LTQualCut: public PamCut { |
class LTQualCut: public PamCut { |
26 |
|
|
32 |
* considered invalid. It must be less than the trigger timeout on IDAQ board, which |
* considered invalid. It must be less than the trigger timeout on IDAQ board, which |
33 |
* is ~ 4600 ms. Default is 4500 (use of different values must be justified). |
* is ~ 4600 ms. Default is 4500 (use of different values must be justified). |
34 |
*/ |
*/ |
35 |
LTQualCut(const char* cutName, float threshold=4500) : |
LTQualCut(const char* cutName, float threshold = 4500) : |
36 |
PamCut(cutName), _previousRun(numeric_limits<UInt_t>::max()), _LT(-1.), _timeout(threshold) { |
PamCut(cutName), _previousRun(numeric_limits<UInt_t>::max()), _LT(-1.), _timeout(threshold) { |
37 |
} |
} |
38 |
/*! @brief Destructor. */ |
/*! @brief Destructor. */ |
44 |
* @param event The event to analyze. |
* @param event The event to analyze. |
45 |
* @return #CUTOK if LT < timeout. |
* @return #CUTOK if LT < timeout. |
46 |
* @return #LT_INVALID if LT > timeout. |
* @return #LT_INVALID if LT > timeout. |
|
* @return #LT_NEWRUN if the event is at the beginning of the run. |
|
47 |
*/ |
*/ |
48 |
int Check(PamLevel2 *event); |
int Check(PamLevel2 *event); |
49 |
|
|
51 |
* |
* |
52 |
* @return The live time of the last examined event in ms (-1 -> first event of the run). |
* @return The live time of the last examined event in ms (-1 -> first event of the run). |
53 |
*/ |
*/ |
54 |
float GetLT() { return _LT; } |
float GetLT() { |
55 |
|
return _LT; |
56 |
|
} |
57 |
|
|
58 |
private: |
private: |
59 |
unsigned int _previousRun; |
unsigned int _previousRun; |