Jpp
 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 "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/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 54 of file getAAnetFiles.cc.

55 {
56  using namespace std;
57  using namespace JPP;
58 
59  JWeight_t weight;
60 
61  JMultipleFileScanner_t inputFile;
62  string header;
63  bool option;
64  int debug;
65 
66  try {
67 
68  JParser<> zap("Auxiliary program to select Monte Carlo files according generator.");
69 
70  zap['f'] = make_field(inputFile);
71  zap['H'] = make_field(header) = get_keys(weight);
72  zap['O'] = make_field(option);
73  zap['d'] = make_field(debug) = 1;
74 
75  zap['H'] = JPARSER::not_initialised();
76 
77  zap(argc, argv);
78  }
79  catch(const exception &error) {
80  FATAL(error.what() << endl);
81  }
82 
83  DEBUG(weight[header]);
84 
85  cout << getAAnetFiles(inputFile, weight[header], option);
86 }
Utility class to parse command line options.
Definition: JParser.hh:1493
JMultipleFileScanner_t getAAnetFiles(const JMultipleFileScanner_t &input, const JHead &header, const bool option=false)
Get list of files compatible with geven header.
const std::vector< 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:141
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1954
int debug
debug level
Definition: JSirene.cc:61
#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:69
Auxiliary base class for list of file names.
std::vector< double > weight
Definition: JAlgorithm.hh:428
#define DEBUG(A)
Message macros.
Definition: JMessage.hh:62