Example program to test JSUPPORT::JMeta class.
More...
#include <string>
#include <iostream>
#include <iomanip>
#include <vector>
#include "TFile.h"
#include "JSupport/JMeta.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
Example program to test JSUPPORT::JMeta class.
- Author
- mdejong
Definition in file JMeta.cc.
◆ main()
int main |
( |
int | argc, |
|
|
char ** | argv ) |
Definition at line 20 of file JMeta.cc.
21{
24
28
29 try {
30
31 JParser<> zap(
"Example program to test meta.");
32
36
37 zap(argc, argv);
38 }
39 catch(const exception &error) {
40 FATAL(error.what() << endl);
41 }
42
43 argv[0] = (char*) "test";
44
45 const JMeta meta(argc, argv);
46
48 DEBUG(meta.toString() << endl);
49
50 ASSERT(JMeta::valueOf(meta.toString()) == meta);
51
52 {
53 TFile* file = TFile::Open(
outputFile.c_str(),
"recreate");
54
56
57 file->Write();
58 file->Close();
59 }
60
61 {
62 TFile* file = TFile::Open(
outputFile.c_str(),
"exists");
63
65
67
68 const int cycle = 1;
69
71
73
75
77
78 file->Close();
79 }
80
81 return 0;
82}
#define DEBUG(A)
Message macros.
#define ASSERT(A,...)
Assert macro.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
#define MAKE_CSTRING(A)
Make C-string.
Utility class to parse command line options.
TObject * getObject(const JRootObjectID &id)
Get first TObject with given identifier.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
bool putObject(TDirectory &dir, const TObject &object)
Write object to ROOT directory.