Jpp  16.0.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
getAAnetFiles.cc File Reference

Auxiliary program to select Monte Carlo files according generator. More...

#include <string>
#include <iostream>
#include <iomanip>
#include <map>
#include "km3net-dataformat/offline/Head.hh"
#include "km3net-dataformat/definitions/applications.hh"
#include "JLang/JVectorize.hh"
#include "JAAnet/JHead.hh"
#include "JAAnet/JHeadToolkit.hh"
#include "JSupport/JMultipleFileScanner.hh"
#include "JSupport/JMonteCarloFileSupportkit.hh"
#include "JSupport/JSupport.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 select Monte Carlo files according generator.

Author
mdejong

Definition in file getAAnetFiles.cc.

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 30 of file getAAnetFiles.cc.

31 {
32  using namespace std;
33  using namespace JPP;
34 
35  JMultipleFileScanner_t inputFile;
36  string application;
37  int debug;
38 
39  try {
40 
41  JParser<> zap("Auxiliary program to select Monte Carlo files according generator.");
42 
43  zap['f'] = make_field(inputFile);
44  zap['H'] = make_field(application) = get_keys(get_is_head);
45  zap['d'] = make_field(debug) = 1;
46 
47  zap['H'] = JPARSER::not_initialised();
48 
49  zap(argc, argv);
50  }
51  catch(const exception &error) {
52  FATAL(error.what() << endl);
53  }
54 
55  cout << getAAnetFiles(inputFile, get_is_head(application));
56 }
Utility class to parse command line options.
Definition: JParser.hh:1500
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1961
int debug
debug level
Definition: JSirene.cc:63
#define FATAL(A)
Definition: JMessage.hh:67
Empty structure for specification of parser element that is not initialised (i.e. does require input)...
Definition: JParser.hh:72
Auxiliary base class for list of file names.
static JHeadHelper get_is_head
Function object to get check method for given application.
JMultipleFileScanner_t getAAnetFiles(const JMultipleFileScanner_t &input, JFunction_t test)
Get list of files compatible with geven header.
const 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.
Definition: JVectorize.hh:139