KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVDatime.h
1/*******************************************************************************
2$Id: KVDatime.h,v 1.4 2008/04/10 15:43:45 franklan Exp $
3$Revision: 1.4 $
4$Date: 2008/04/10 15:43:45 $
5$Author: franklan $
6*******************************************************************************/
7
8#ifndef __KVDATIME_H
9#define __KVDATIME_H
10
11#include "TDatime.h"
12#include "TString.h"
13
14class KVList;
15
33class KVDatime: public TDatime {
34 static KVList* fmonths;
35 static Int_t ndatime;
36 void init();
38
39public:
40
51
52 KVDatime();
53 KVDatime(const Char_t* DateString, EKVDateFormat f = kGANACQ);
55 : TDatime((const TDatime&)d)
56 {
57 init();
58 }
60 KVDatime(const TDatime& d)
61 : TDatime(d)
62 {
63 init();
64 }
65 KVDatime(UInt_t tloc, Bool_t dosDate = kFALSE)
66 : TDatime(tloc, dosDate)
67 {
68 init();
69 }
70 KVDatime(Int_t date, Int_t time)
71 : TDatime(date, time)
72 {
73 init();
74 }
75 KVDatime(Int_t year, Int_t month, Int_t day,
76 Int_t hour, Int_t min, Int_t sec)
77 : TDatime(year, month, day, hour, min, sec)
78 {
79 init();
80 }
81 virtual ~ KVDatime();
82
83 void SetGanacqDate(const Char_t* GanacqDateString);
84 void SetGanacq2010Date(const Char_t* GanacqDateString);
85 void SetGanacqNarvalDate(const Char_t* GanacqDateString);
86 const Char_t* AsGanacqDateString() const;
87 const Char_t* AsDMYDateString() const;
88 void SetSQLDate(const Char_t* SQLDateString);
89 void SetSRBDate(const Char_t* SRBDateString);
90 void SetIRODSDate(const Char_t* IRODSDateString);
91 void SetDMYDate(const Char_t* DMYString);
92
93 const Char_t* String(EKVDateFormat fmt = kCTIME);
94
95 static Bool_t IsSQLFormat(const Char_t* date);
96 static Bool_t IsGANACQFormat(const Char_t* date);
97 static Bool_t IsGANACQ2010Format(const Char_t* date);
98 static Bool_t IsGANACQNarvalFormat(const Char_t* date);
99 static Bool_t IsSRBFormat(const Char_t* date);
100 static Bool_t IsIRODSFormat(const Char_t* date);
101
102 static const Char_t* Month(Int_t m);
103 Double_t GetNumberOfSeconds(Int_t ref_year = 0);
105
106 ClassDef(KVDatime, 0) //Extension of TDatime class
107};
108
109#endif
int Int_t
unsigned int UInt_t
#define d(i)
bool Bool_t
char Char_t
double Double_t
#define ClassDef(name, id)
Extension of TDatime to handle various useful date formats.
Definition KVDatime.h:33
static const Char_t * Month(Int_t m)
Definition KVDatime.cpp:545
Double_t GetNumberOfSeconds(Int_t ref_year=0)
Definition KVDatime.cpp:554
void SetDMYDate(const Char_t *DMYString)
Set date from string in format "DD/MM/YYYY".
Definition KVDatime.cpp:259
void SetIRODSDate(const Char_t *IRODSDateString)
Definition KVDatime.cpp:241
EKVDateFormat
Definition KVDatime.h:41
@ kGANACQ2010
Definition KVDatime.h:48
@ kGANACQ
Definition KVDatime.h:43
@ kGANACQNarval
Definition KVDatime.h:49
static Bool_t IsGANACQFormat(const Char_t *date)
Definition KVDatime.cpp:433
static Bool_t IsSRBFormat(const Char_t *date)
Definition KVDatime.cpp:513
TString fStr
internal buffer used by String method
Definition KVDatime.h:37
static Bool_t IsSQLFormat(const Char_t *date)
Definition KVDatime.cpp:496
static Bool_t IsGANACQ2010Format(const Char_t *date)
Definition KVDatime.cpp:455
void init()
Definition KVDatime.cpp:25
void SetSQLDate(const Char_t *SQLDateString)
Definition KVDatime.cpp:204
KVDatime(const KVDatime &d)
Definition KVDatime.h:54
void SetGanacqNarvalDate(const Char_t *GanacqDateString)
Definition KVDatime.cpp:297
const Char_t * AsDMYDateString() const
Definition KVDatime.cpp:385
KVDatime & operator=(const KVDatime &)
copy assignment operator
Definition KVDatime.cpp:179
KVDatime(Int_t date, Int_t time)
Definition KVDatime.h:70
const Char_t * AsGanacqDateString() const
Definition KVDatime.cpp:371
void SetSRBDate(const Char_t *SRBDateString)
Definition KVDatime.cpp:221
static Int_t ndatime
counter
Definition KVDatime.h:35
static Bool_t IsGANACQNarvalFormat(const Char_t *date)
Definition KVDatime.cpp:476
static KVList * fmonths
list of months
Definition KVDatime.h:34
static Bool_t IsIRODSFormat(const Char_t *date)
Definition KVDatime.cpp:530
void SetGanacq2010Date(const Char_t *GanacqDateString)
Definition KVDatime.cpp:273
KVDatime(UInt_t tloc, Bool_t dosDate=kFALSE)
Definition KVDatime.h:65
Double_t GetDureeInSeconds(KVDatime from)
Definition KVDatime.cpp:590
KVDatime(const TDatime &d)
Definition KVDatime.h:60
KVDatime(Int_t year, Int_t month, Int_t day, Int_t hour, Int_t min, Int_t sec)
Definition KVDatime.h:75
void SetGanacqDate(const Char_t *GanacqDateString)
Definition KVDatime.cpp:323
Extended TList class which owns its objects by default.
Definition KVList.h:28
double min(double x, double y)