Go to the documentation of this file.
   16 int main(
int argc, 
char **argv)
 
   27     JParser<> zap(
"Example program to test file name handling.");
 
   29     zap[
'f'] = 
make_field(file_name, 
"input file name") = 
"";
 
   32     args = zap(argc, argv);
 
   34   catch(
const exception &error) {
 
   35     FATAL(error.what() << endl);
 
   38   cout << 
"file name   " << 
getFilename(argv[0]) << endl;
 
   39   cout << 
"path        " << 
getPath(argv[0])     << endl;
 
   42   if (file_name != 
"") {
 
   44     cout << 
"file name   " << file_name                       << endl;
 
   45     cout << 
"path        " << 
getPath(file_name)              << endl;
 
   47     cout << 
"protocol    " << 
getProtocol(file_name)          << endl;
 
   51     cout << 
"Pending arguments" << endl;
 
  
Data structure to store command line arguments.
 
std::string getPath(const std::string &file_name)
Get path, i.e.
 
Utility class to parse command line options.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
std::string getFilenameExtension(const std::string &file_name)
Get file name extension, i.e.
 
int main(int argc, char **argv)
 
std::string getFilename(const std::string &file_name)
Get file name part, i.e.
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
 
std::string getProtocol(const std::string &file_name)
Get protocol, i.e.