Jpp 21.0.0-rc.3
the software that should make you happy
Loading...
Searching...
No Matches
JPDFSupportkit.cc File Reference

Program to print PDF support data. More...

#include <string>
#include <iostream>
#include <iomanip>
#include "JPhysics/Antares.hh"
#include "JPhysics/KM3NeT.hh"
#include "JPhysics/JPDFSupportkit.hh"
#include "Jeep/JProperties.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

Program to print PDF support data.

Author
mdejong

Definition in file software/JPhysics/JPDFSupportkit.cc.

Function Documentation

◆ main()

int main ( int argc,
char ** argv )

Definition at line 20 of file software/JPhysics/JPDFSupportkit.cc.

21{
22 using namespace std;
23 using namespace JPP;
24
25 PDF::configuration_type configuration;
26 string key;
27 int debug;
28
29
30 JProperties properties = configuration.getProperties();
31
32 try {
33
34 JParser<> zap("Program to print PDF support data.");
35
36 zap['@'] = make_field(properties, PDF::help() << configuration) = JPARSER::initialised();
37 zap['k'] = make_field(key) = get_keys(properties);
38 zap['d'] = make_field(debug) = 0;
39
40 zap['k'] = JPARSER::not_initialised();
41
42 zap(argc, argv);
43 }
44 catch(const exception &error) {
45 FATAL(error.what() << endl);
46 }
47
48 properties[key]->write(cout) << endl;
49}
#define FATAL(A)
Definition JMessage.hh:67
int debug
debug level
Definition JSirene.cc:74
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition JParser.hh:2107
Utility class to parse parameter values.
std::ostream & write(std::ostream &out) const
Write the current parameter values.
Utility class to parse command line options.
Definition JParser.hh:1664
array_type< JKey_t > get_keys(const std::map< JKey_t, JValue_t, JComparator_t, JAllocator_t > &data)
Method to create array of keys of map.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Definition JParser.hh:66
Empty structure for specification of parser element that is not initialised (i.e. does require input)...
Definition JParser.hh:72
Auxiliary data structure for complete configuration.
JProperties getProperties()
Get properties.
Manipulator for help output.