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

Annotation of /PamCut/MiscCuts/AbsTimeCut/AbsTimeCut.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Fri May 29 15:49:29 2009 UTC (15 years, 6 months ago) by pam-fi
Branch: MAIN
Added to repository.

1 pam-fi 1.1 /*
2     * AbsTimeCut.cpp
3     *
4     * Created on: 22-mag-2009
5     * Author: Nicola Mori
6     */
7    
8     /*! @file AbsTimeCut.h 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     cout << date << " " << time << endl;
21    
22     if (date < _initDate)
23     return ABSTIMECUT_TOOEARLY;
24     if (date == _initDate && time < _initTime)
25     return ABSTIMECUT_TOOEARLY;
26    
27     if (date > _endDate)
28     return ABSTIMECUT_TOOLATE;
29     if (date == _endDate && time > _endTime)
30     return ABSTIMECUT_TOOLATE;
31    
32     return CUTOK;
33     }

  ViewVC Help
Powered by ViewVC 1.1.23