Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JDate.cc
Go to the documentation of this file.
1 #include <string>
2 #include <iostream>
3 #include <iomanip>
4 
5 #include "JSystem/JDate.hh"
6 #include "Jeep/JParser.hh"
7 #include "Jeep/JMessage.hh"
8 
9 
10 /**
11  * \file
12  *
13  * Example program to show system time.
14  * \author mdejong
15  */
16 int main(int argc, char* argv[])
17 {
18  using namespace std;
19 
20  string host_name;
21 
22  try {
23 
24  JParser<> zap("Example program to show system time.");
25 
26  zap(argc, argv);
27  }
28  catch(const exception &error) {
29  FATAL(error.what() << endl);
30  }
31 
32 
33  using namespace JPP;
34 
35  cout << getDate() << endl;
36  cout << getTime() << endl;
37  cout << getDateAndTime() << endl;
38 }
Utility class to parse command line options.
Definition: JParser.hh:1410
Date and time functions.
static const JDateAndTime getDateAndTime
Function object to get ASCII formatted date and time.
Definition: JDate.hh:115
double getTime(const Hit &hit)
Get true time of hit.
General purpose messaging.
#define FATAL(A)
Definition: JMessage.hh:65
const char * getDate()
Get ASCII formatted date.
Definition: JDate.hh:22
Utility class to parse command line options.
int main(int argc, char *argv[])
Definition: Main.cpp:15