25 int main(
int argc, 
char **argv)
 
   31   typedef JAbstractHistogram<Double_t> JHistogram_t;
 
   45     JParser<> zap(
"Program to create TH1D and fill according given formula.");
 
   53     zap[
'x'] = 
make_field(
X)               = JHistogram_t(100, -1.0, +1.0);
 
   59   catch(
const exception &error) {
 
   60     FATAL(error.what() << endl);
 
   64   if ((formula != 
"" && inputFile != 
"") ||
 
   65       (formula == 
"" && inputFile == 
"")) {
 
   66     FATAL(
"Specify input file or formula." << endl);
 
   72   TH1D h0(title.c_str(), NULL,
 
   73           X.getNumberOfBins(), 
X.getLowerLimit(), 
X.getUpperLimit());
 
   77     TF1 f1(
"f1", formula.c_str());
 
   83     if (numberOfEvents > 0) {
 
   86       h0.FillRandom(f1.GetName(), numberOfEvents);
 
   90       for (Int_t ix = 1; ix <= h0.GetXaxis()->GetNbins(); ++ix) {      
 
   91         h0.SetBinContent(ix, f1.Eval(h0.GetXaxis()->GetBinCenter(ix)));
 
   95   } 
else if (inputFile != 
"") {
 
  101     ifstream 
in(inputFile.c_str());
 
  103     for (
double x; 
in >> 
x; ) {
 
Utility class to parse command line options. 
 
double getValue(const JScale_t scale)
Get numerical value corresponding to scale. 
 
int main(int argc, char *argv[])
 
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)...
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
then break fi done getCenter read X Y Z let X
 
General purpose messaging. 
 
Utility class to parse command line options. 
 
Wrapper class around string. 
 
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in