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

Contents of /PamCut/MiscCuts/AbsTimeCut/AbsTimeCut.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Fri Jun 5 13:14:06 2009 UTC (15 years, 5 months ago) by pam-fi
Branch: MAIN
CVS Tags: Root_V8, MergedToHEAD_1, nuclei_reproc, MergedFromV8_1, BeforeMergingFromV8_1, V9, HEAD
Branch point for: V8
Changes since 1.1: +1 -3 lines
Minor fixes in Doxygen documentation.

1 /*
2 * AbsTimeCut.cpp
3 *
4 * Created on: 22-mag-2009
5 * Author: Nicola Mori
6 */
7
8 /*! @file AbsTimeCut.cpp The AbsTimeCut class implementation file */
9
10 #include "AbsTimeCut.h"
11
12 int AbsTimeCut::Check(PamLevel2 *event) {
13
14 _time.Set(event->GetOrbitalInfo()->absTime, kFALSE, 0, kFALSE);
15 // TTimestamp::GetDate() returns date in format YYYYMMDD so to compare it
16 // with 6-digits dates we must subtract 20000000
17 unsigned int date = _time.GetDate(kFALSE) - 20000000;
18 unsigned int time = _time.GetTime(kFALSE);
19
20 if (date < _initDate)
21 return ABSTIMECUT_TOOEARLY;
22 if (date == _initDate && time < _initTime)
23 return ABSTIMECUT_TOOEARLY;
24
25 if (date > _endDate)
26 return ABSTIMECUT_TOOLATE;
27 if (date == _endDate && time > _endTime)
28 return ABSTIMECUT_TOOLATE;
29
30 return CUTOK;
31 }

  ViewVC Help
Powered by ViewVC 1.1.23