65{
66
67 if(m_Run!=iRun)
68 {
69 m_Run=iRun;
70 vec.clear();
71 vec1.clear();
72
75
76 if(m_isTrip)
77 {
80 char trip_st[255];
81 char trip_nd[255];
82 string m_tStat;
83 string m_tStop;
84 time_t runtripst;
85 time_t runtripnd;
86
87 for(int c = 0;c < m;c++)
88 {
90 strcpy(trip_st, m_tStat.c_str());
91 struct tm tm1;
92 int i = sscanf(trip_st,"%04d-%02d-%02d %02d:%02d:%02d",&(tm1.tm_year),&(tm1.tm_mon),&(tm1.tm_mday),&(tm1.tm_hour),&(tm1.tm_min),&(tm1.tm_sec));
93 tm1.tm_year -= 1900;
94 tm1.tm_mon -= 1;
95 tm1.tm_isdst = 0;
96 tm1.tm_yday = 0;
97 tm1.tm_wday = 0;
98 runtripst = mktime(&tm1);
99 vec.push_back(runtripst);
100
102 strcpy(trip_nd, m_tStop.c_str());
103 struct tm tm2;
104 int j = sscanf(trip_nd,"%04d-%02d-%02d %02d:%02d:%02d",&(tm2.tm_year),&(tm2.tm_mon),&(tm2.tm_mday),&(tm2.tm_hour),&(tm2.tm_min),&(tm2.tm_sec));
105 tm2.tm_year -= 1900;
106 tm2.tm_mon -= 1;
107 tm2.tm_isdst = 0;
108 tm2.tm_yday = 0;
109 tm2.tm_wday = 0;
110 runtripnd = mktime(&tm2);
111 vec1.push_back(runtripnd);
112
113 }
114 }
115 }
116
117 bool flag = false;
118 if(m_isTrip)
119 {
120 for(
int f = 0;f <
vec.size();f++)
121 {
122 if((etime >
vec[f])&&(etime < vec1[f])) flag =
true;
123 }
124 }
125 if(flag) m_nEvt++;
126 return flag;
127}