/[PAMELA software]/PamCut/MiscCuts/OBTQualCut/OBTQualCut.h
ViewVC logotype

Contents of /PamCut/MiscCuts/OBTQualCut/OBTQualCut.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (download) (vendor branch)
Wed May 27 13:30:09 2009 UTC (15 years, 6 months ago) by pam-fi
Branch: DEV, MAIN
CVS Tags: v0r00, Root_V8, MergedToHEAD_1, nuclei_reproc, MergedFromV8_1, BeforeMergingFromV8_1, V9, HEAD
Branch point for: V8
Changes since 1.1: +0 -0 lines
File MIME type: text/plain
First import

1 /*
2 * OBTQualCut.h
3 *
4 * Created on: 10-mar-2009
5 * Author: Nicola Mori
6 */
7
8 /*! @file OBTQualCut.h The OBTQualCut class definition file */
9
10 #ifndef OBTQUALCUT_H_
11 #define OBTQUALCUT_H_
12
13 #include "../../PamCutBase/PamCutBase.h"
14
15 /*! @enum OBT_Return Return values for rejected events */
16 enum OBT_Return {
17 OBT_NEWRUN, ///< Discarded because it is the first event of the run.
18 OBT_INVALID ///< Discarded because the OBT is not valid.
19 };
20
21 using std::numeric_limits;
22 /*! @brief The On Board Time quality cut.
23 *
24 * This cut rejects events whose OBT is less than that of the previous event.
25 * When a new run starts, the previous OBT is set to the current one and the
26 * current event (ie., the first event of the run) is discarded.
27 */
28 class OBTQualCut: public PamCut {
29
30 public:
31 /*! @brief Constructor. */
32 OBTQualCut(const char *cutName) :
33 PamCut(cutName), _previousOBT(numeric_limits<UInt_t>::max()), _previousRun(numeric_limits<UInt_t>::max()) {
34 }
35 /*! @brief Destructor. */
36 ~OBTQualCut() {
37 }
38
39 /*! @brief The On Board Time quality check.
40 *
41 * @param event The event to analyze.
42 * @return #CUTOK if OBT > previous OBT.
43 * @return #OBT_NEWRUN if the event has been discarded since it is the first of the run
44 * @return #OBT_INVALID if OBT < previous OBT
45 */
46 int Check(PamLevel2 *event);
47
48 private:
49 UInt_t _previousOBT;
50 UInt_t _previousRun;
51
52 };
53
54 #endif /* OBTQUALCUT_H_ */

  ViewVC Help
Powered by ViewVC 1.1.23