189 KVDatime::~KVDatime()
209 sscanf(DateString,
"%4d-%02d-%02d %02d:%02d:%02d",
210 &Y, &
M, &D, &
h, &
m, &
s);
228 sscanf(DateString,
"%4d-%02d-%02d-%02d.%02d",
248 sscanf(DateString,
"%4d-%02d-%02d.%02d:%02d",
263 sscanf(DMYString,
"%2d/%2d/%4d", &D, &
M, &Y);
264 Set(Y,
M, D, 0, 0, 0);
282 if (sscanf(tmp.
Data(),
"%02d%3s%02d %02dH%02dM%02dS", &D,
Month, &Y, &
H, &
M, &
S) == 6) {
287 Set(Y, month, D,
H,
M,
S);
305 if (sscanf(tmp.
Data(),
"%02d-%02d-%02d %02dH%02dM%02dS", &D, &
Month, &Y, &
H, &
M, &
S) == 6) {
339 Error(
"SetGanacqDate",
"Format is incorrect: %s (should be like \"29-SEP-2005 09:42:17.00\" or \"29-SEP-05 09:42:17\")",
356 (year < 82 ? year += 2000 : year += 1900);
362 Set(year, month, day, hour, min, sec);
375 return Form(
"%d-%s-%4d %02d:%02d:%02d.00",
387 return Form(
"%02d/%02d/%4d",
465 if (sscanf(tmp.
Data(),
"%02d%3s%02d %02dH%02dM%02dS", &D,
Month, &Y, &
H, &
M, &
S) == 6)
485 if (sscanf(tmp.
Data(),
"%02d-%02d-%02d %02dH%02dM%02dS", &D, &
Month, &Y, &
H, &
M, &
S) == 6)
502 if (sscanf(date,
"%4d-%02d-%02d %02d:%02d:%02d",
519 if (sscanf(date,
"%4d-%02d-%02d-%02d.%02d",
536 if (sscanf(date,
"%4d-%02d-%02d.%02d:%02d",
560 year_ins -= ref_year;
566 total_ins += year_ins;
570 month_ins *= 365.25 / 12;
575 total_ins += month_ins;
Defines macros for standard error messages.
#define KV__ERROR(method)
KVIonRangeTableMaterial * M
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
#define KV__TOBJSTRING_TO_INT(arr, index, var)
char * Form(const char *fmt,...)
Extension of TDatime to handle various useful date formats.
static const Char_t * Month(Int_t m)
Double_t GetNumberOfSeconds(Int_t ref_year=0)
void SetDMYDate(const Char_t *DMYString)
Set date from string in format "DD/MM/YYYY".
void SetIRODSDate(const Char_t *IRODSDateString)
static Bool_t IsGANACQFormat(const Char_t *date)
static Bool_t IsSRBFormat(const Char_t *date)
TString fStr
internal buffer used by String method
const Char_t * String(EKVDateFormat fmt=kCTIME)
static Bool_t IsSQLFormat(const Char_t *date)
static Bool_t IsGANACQ2010Format(const Char_t *date)
void SetSQLDate(const Char_t *SQLDateString)
void SetGanacqNarvalDate(const Char_t *GanacqDateString)
const Char_t * AsDMYDateString() const
KVDatime & operator=(const KVDatime &)
copy assignment operator
const Char_t * AsGanacqDateString() const
void SetSRBDate(const Char_t *SRBDateString)
static Int_t ndatime
counter
static Bool_t IsGANACQNarvalFormat(const Char_t *date)
static KVList * fmonths
list of months
static Bool_t IsIRODSFormat(const Char_t *date)
void SetGanacq2010Date(const Char_t *GanacqDateString)
Double_t GetDureeInSeconds(KVDatime from)
void SetGanacqDate(const Char_t *GanacqDateString)
Extended TList class which owns its objects by default.
virtual TObject * At(Int_t idx) const
virtual void Add(TObject *obj)
virtual TObject * FindObject(const char *name) const
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
const char * AsSQLString() const
TDatime & operator=(const TDatime &d)
const char * AsString() const
TObject * At(Int_t idx) const
virtual Int_t IndexOf(const TObject *obj) const
TObjArray * Tokenize(const TString &delim) const
const char * Data() const
TString & ReplaceAll(const char *s1, const char *s2)
RooArgSet S(Args_t &&... args)