61{
64
66
68 JParameters_t parameters;
69 struct {
70 Color_t color = kBlack;
71 Style_t style = 0;
72 } fill;
73 struct {
74 Color_t color = kBlack;
75 Style_t style = kSolid;
76 Width_t width = 1;
77 } line;
79
80 try {
81
83
89
90 JParser<> zap(
"Auxiliary program to create TBox");
91
93 zap[
'p'] =
make_field(parameters,
"x1 y1 x2 y2");
96
97 zap(argc, argv);
98 }
99 catch(const exception &error) {
100 FATAL(error.what() << endl);
101 }
102
103
105
106 for (size_t i = 0; i != parameters.size(); ++i) {
107
108 TBox* p = new TBox(parameters[i].x1, parameters[i].y1, parameters[i].x2, parameters[i].y2);
109
110 p->SetFillColor(fill.color);
111 p->SetFillStyle(fill.style);
112 p->SetLineColor(line.color);
113 p->SetLineStyle(line.style);
114 p->SetLineWidth(line.width);
115
116 out.WriteTObject(p);
117 }
118
119 out.Write();
120 out.Close();
121}
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
#define zmake_property(A)
Utility class to parse parameter values.
Simple data structure to support I/O of equations (see class JLANG::JEquation).
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary wrapper for I/O of container with optional comment (see JComment).
Empty structure for specification of parser element that is initialised (i.e. does not require input)...