30 typedef JToken<';'> JToken_t;
46 JParser<> zap(
"Program to create TH2D and fill according given formula.");
61 catch(
const exception &error) {
62 FATAL(error.what() << endl);
66 if ((formula !=
"" && inputFile !=
"") ||
67 (formula ==
"" && inputFile ==
"")) {
68 FATAL(
"Specify input file or formula." << endl);
74 const string::size_type pos = title.rfind(
'/');
76 if (pos != string::npos) {
78 const string dir = title.substr(0, pos);
80 out.mkdir(dir.c_str());
83 title = title.substr(pos + 1);
86 TH2D h0(title.c_str(), NULL,
87 X.getNumberOfBins(),
X.getLowerLimit(),
X.getUpperLimit(),
88 Y.getNumberOfBins(),
Y.getLowerLimit(),
Y.getUpperLimit());
92 TF2 f2(
"f2", formula.c_str());
98 if (numberOfEvents > 0) {
101 h0.FillRandom(f2.GetName(), numberOfEvents);
105 for (Int_t ix = 1; ix <= h0.GetXaxis()->GetNbins(); ++ix) {
106 for (Int_t iy = 1; iy <= h0.GetYaxis()->GetNbins(); ++iy) {
107 h0.SetBinContent(ix, iy, f2.Eval(h0.GetXaxis()->GetBinCenter(ix),
108 h0.GetYaxis()->GetBinCenter(iy)));
112 }
else if (inputFile !=
"") {
118 ifstream
in(inputFile.c_str());
120 for (
double x,
y;
in >> x >>
y; ) {
Utility class to parse command line options.
double getValue(const JScale_t scale)
Get numerical value corresponding to scale.
int getParameter(const std::string &text)
Get parameter number from text string.
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
then fatal Wrong number of arguments fi set_variable STRING $argv[1] set_variable DETECTORXY_TXT $WORKDIR $DETECTORXY_TXT tail read X Y CHI2 RMS printf optimum n $X $Y $CHI2 $RMS awk v Y
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
then fatal The output file must have the wildcard in the e g root fi eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
no fit printf nominal n $STRING awk v X
JAbstractHistogram< double > JHistogram_t
Type definition for scan along axis.