]> git.uio.no Git - u/mrichter/AliRoot.git/blame - RALICE/AliTimestamp.h
Increase maximum momentum for track reconstruction
[u/mrichter/AliRoot.git] / RALICE / AliTimestamp.h
CommitLineData
3ea81e9c 1#ifndef ALITIMESTAMP_H
2#define ALITIMESTAMP_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6// $Id$
7
8#include "TTimeStamp.h"
9#include "TString.h"
10
11class AliTimestamp : public TTimeStamp
12{
13 public:
14 AliTimestamp(); // Default constructor
15 AliTimestamp(TTimeStamp& t); // Constructor
16 virtual ~AliTimestamp(); // Destructor
17 AliTimestamp(const AliTimestamp& t); // Copy constructor
18 void Date(Int_t mode=3); // Print date/time info
19 Double_t GetJD(Int_t y,Int_t m,Int_t d,Int_t hh,Int_t mm,Int_t ss,Int_t ns) const; // Julian Date from input args.
20 Double_t GetMJD(Int_t y,Int_t m,Int_t d,Int_t hh,Int_t mm,Int_t ss,Int_t ns) const;// Modified JD from input args.
21 Double_t GetTJD(Int_t y,Int_t m,Int_t d,Int_t hh,Int_t mm,Int_t ss,Int_t ns) const;// Truncated JD from input args.
22 Double_t GetJE(Double_t date,TString mode="jd") const; // Julian Epoch corresponding to specified Julian Date
23 void Convert(Double_t date,Int_t& days,Int_t& secs,Int_t& ns) const;// Convert frac. day count into days, secs and ns
24 Double_t Convert(Int_t days,Int_t secs,Int_t ns) const; // Convert days, secs and ns into frac. day count
25 void GetMJD(Int_t& mjd,Int_t& sec,Int_t& ns); // Provide corresponding Modified Julian Date and time
26 Double_t GetMJD(); // Provide corresponding Modified Julian Date in fractional days
27 void GetTJD(Int_t& mjd,Int_t& sec,Int_t& ns); // Provide corresponding Truncated Julian Date and time
28 Double_t GetTJD(); // Provide corresponding Truncated Julian Date in fractional days
29 void GetJD(Int_t& jd,Int_t& sec,Int_t& ns); // Provide corresponding Julian Date and time
30 Double_t GetJD(); // Provide corresponding Julian Date in fractional days
31 Double_t GetJE(); // Provide corresponding Julian Epoch
a7dc0627 32 void SetMJD(Int_t mjd,Int_t sec,Int_t ns,Int_t ps=0); // Set Modified Julian Date and time
33 void SetMJD(Double_t mjd); // Set Modified Julian Date and time
34 void SetJD(Int_t jd,Int_t sec,Int_t ns,Int_t ps=0); // Set Julian Date and time
35 void SetJD(Double_t jd); // Set Julian Date and time
36 void SetTJD(Int_t tjd,Int_t sec,Int_t ns,Int_t ps=0); // Set Truncated Julian Date and time
37 void SetTJD(Double_t tjd); // Set Truncated Julian Date and time
38 Int_t GetPicoSec() const; // Provide remaining fractional number of ns in picoseconds
39 Int_t GetDifference(AliTimestamp& t,Int_t& days,Int_t& sec,Int_t& ns,Int_t& ps) const; // Provide time difference
3ea81e9c 40
41 protected:
42 Int_t fMJD; // Modified Julian Date
43 Int_t fJsec; // Number of seconds elapsed within the MJD
44 Int_t fJns; // Remaining fractional number of seconds (in nanoseconds) elapsed within the MJD
a7dc0627 45 Int_t fJps; // Remaining fractional number of nanoseconds (in picoseconds) elapsed within the MJD
3ea81e9c 46
47 private:
48 void FillJulian(); // Calculation and setting of the corresponding Julian parameters
49 Int_t fCalcs; // The TTimeStamp seconds counter value at Julian parameter calculation
50 Int_t fCalcns; // The TTimeStamp nanoseconds counter value at Julian parameter calculation
51
a7dc0627 52 ClassDef(AliTimestamp,2) // Handling of timestamps for (astro)particle physics research.
3ea81e9c 53};
54#endif