Jpp test-rotations-new
the software that should make you happy
Loading...
Searching...
No Matches
getGITTags.cc
Go to the documentation of this file.
1
2#include <string>
3#include <iostream>
4#include <iomanip>
5
6#include "Jeep/JGITTags.hh"
7
8#include "Jeep/JPrint.hh"
9#include "Jeep/JParser.hh"
10#include "Jeep/JMessage.hh"
11
12
13/**
14 * \file
15 *
16 * Auxiliary program to print GIT tags.
17 * \author mdejong
18 */
19int main(int argc, char **argv)
20{
21 using namespace std;
22 using namespace JPP;
23
24 JGITTags_t::key_type date;
25 int debug;
26
27 try {
28
29 JParser<> zap("Auxiliary program to print GIT tags.");
30
31 zap['D'] = make_field(date, "start date \"YYYY-MM-DD\"") = JGITTags_t::key_type::min();
32 zap['d'] = make_field(debug) = 1;
33
34 zap(argc, argv);
35 }
36 catch(const exception &error) {
37 FATAL(error.what() << endl);
38 }
39
40 const JGITTags_t buffer = getGITTags();
41
42 for (JGITTags_t::const_iterator i = buffer.lower_bound(date); i != buffer.end(); ++i) {
43 cout << i->first << ' ' << i->second << endl;
44 }
45}
General purpose messaging.
#define FATAL(A)
Definition JMessage.hh:67
int debug
debug level
Definition JSirene.cc:72
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition JParser.hh:2142
I/O formatting auxiliaries.
Dates GIT tags.
Utility class to parse command line options.
Definition JParser.hh:1698
int main(int argc, char **argv)
Definition getGITTags.cc:19
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).