87{
90
92
94 JParameters_t parameters;
95 struct {
96 Color_t color = kBlack;
97 Style_t style = 0;
98 } fill;
99 struct {
100 Color_t color = kBlack;
101 Style_t style = kSolid;
102 Width_t width = 1;
103 } line;
105
106 try {
107
109
115
116 JParser<> zap(
"Auxiliary program to create TEllipse");
117
119 zap[
'p'] =
make_field(parameters,
"x y r1 [r2 [phimin phimax]]");
122
123 zap(argc, argv);
124 }
125 catch(const exception &error) {
126 FATAL(error.what() << endl);
127 }
128
129
131
132 for (size_t i = 0; i != parameters.size(); ++i) {
133
134 TEllipse* p = new TEllipse(parameters[i].x1, parameters[i].y1, parameters[i].r1, parameters[i].r2, parameters[i].phimin, parameters[i].phimax);
135
136 p->SetFillColor(fill.color);
137 p->SetFillStyle(fill.style);
138 p->SetLineColor(line.color);
139 p->SetLineStyle(line.style);
140 p->SetLineWidth(line.width);
141
142 out.WriteTObject(p);
143 }
144
145 out.Write();
146 out.Close();
147}
#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)...