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

Contents of /PamCut/MiscCuts/OBTQualCut/OBTQualCut.cpp

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
First import

1 /*
2 * OBTQualCut.cpp
3 *
4 * Created on: 10-mar-2009
5 * Author: Sergio Ricciarini, Nicola Mori
6 */
7
8 /*! @file OBTQualCut.cpp The OBTQualCut class implementation file */
9
10 #include "OBTQualCut.h"
11
12 int OBTQualCut::Check(PamLevel2 *event){
13
14 // Check first event; TO BE CHANGED BACK
15 if (_previousRun==numeric_limits<UInt_t>::max()) {
16 _previousRun = event->GetRunInfo()->ID;
17 _previousOBT = event->GetOrbitalInfo()->OBT;
18 return OBT_INVALID;
19 }
20
21 // Check run
22 if (event->GetRunInfo()->ID != _previousRun){ // overwrite info on previous run and OBT
23 _previousRun = event->GetRunInfo()->ID;
24 _previousOBT = event->GetOrbitalInfo()->OBT;
25 // return OBT_NEWRUN; TO BE CHANGED BACK
26 return CUTOK;
27 }
28
29 // the run is the same as the previous event: check OBT
30
31 // Check OBT
32 if (event->GetOrbitalInfo()->OBT <= _previousOBT){ // invalid OBT: do not overwrite info on previous run and OBT
33 return OBT_INVALID;
34 }
35
36 // The OBT is good: overwrite info on previous OBT
37 _previousOBT = event->GetOrbitalInfo()->OBT;
38 return CUTOK;
39
40 }

  ViewVC Help
Powered by ViewVC 1.1.23