Jpp test-rotations-new
the software that should make you happy
Loading...
Searching...
No Matches
getGITTags.cc File Reference

Auxiliary program to print GIT tags. More...

#include <string>
#include <iostream>
#include <iomanip>
#include "Jeep/JGITTags.hh"
#include "Jeep/JPrint.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Detailed Description

Auxiliary program to print GIT tags.

Author
mdejong

Definition in file getGITTags.cc.

Function Documentation

◆ main()

int main ( int argc,
char ** argv )

Definition at line 19 of file getGITTags.cc.

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}
#define FATAL(A)
Definition JMessage.hh:67
int debug
debug level
Definition JSirene.cc:72
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition JParser.hh:2142
Utility class to parse command line options.
Definition JParser.hh:1698
std::vector< std::string > getGITTags(const TRegexp &regexp, const JGITTags_t::key_type &date)
Get selection of GIT tags.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).