31 int main(
int argc,
char **argv)
43 JParser<> zap(
"Example program to plot acoustic fit results.");
45 zap[
'f'] =
make_field(inputFile,
"input file (output of JKatoomba)");
46 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
52 catch(
const exception &error) {
53 FATAL(error.what() << endl);
57 if (inputFile.size() < 1
u || inputFile.size() > 2
u) {
58 FATAL(
"Invalid number of input files; 1 file for histograms and 2 files for comparison." << endl);
62 TH1D
h1(
"chi2/NDF", NULL, 500, 0.0, 10.0);
70 if (inputFile.size() == 2) {
75 while (inA.hasNext() && inB.hasNext()) {
77 STATUS(
"event: " << setw(10) << inA.getCounter() <<
'\r');
DEBUG(endl);
79 JEvt* pA = inA.next();
80 JEvt* pB = inB.next();
90 for (JEvt::const_iterator iA = pA->begin(); iA != pA->end(); ++iA) {
91 for (JEvt::const_iterator iB = pB->begin(); iB != pB->end(); ++iB) {
93 if (iA->id == iB->id) {
94 H2 ->Fill((iA->tx - iB->tx)*1.0e3, (iA->ty - iB->ty)*1.0e3);
95 H2[iA->id]->Fill((iA->tx - iB->tx)*1.0e3, (iA->ty - iB->ty)*1.0e3);
103 if (inputFile.size() == 1) {
105 while (inputFile.hasNext()) {
107 STATUS(
"event: " << setw(10) << inputFile.getCounter() <<
'\r');
DEBUG(endl);
109 const JEvt* evt = inputFile.next();
116 for (JEvt::const_iterator i = evt->begin(); i != evt->end(); ++i) {
117 H2 ->Fill(i->tx*1.0e3, i->ty*1.0e3);
118 H2[i->id]->Fill(i->tx*1.0e3, i->ty*1.0e3);
130 if (inputFile.size() == 1) {
Utility class to parse command line options.
Data structure for graph data.
ROOT TTree parameter settings.
then for HISTOGRAM in h0 h1
int ndf
number of degrees of freedom
Dynamic ROOT object management.
Auxiliary data structure to build TGraph.
Template definition for direct access of elements in ROOT TChain.
double UNIXTimeStop
stop time
Auxiliary class for defining the range of iterations of objects.
Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys...
I/O formatting auxiliaries.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
General purpose messaging.
Scanning of objects from multiple files according a format that follows from the extension of each fi...
double UNIXTimeStart
start time
General purpose class for object reading from a list of file names.
Utility class to parse command line options.
const JLimit & getLimit() const
Get limit.
#define DEBUG(A)
Message macros.
Double_t g1(const Double_t x)
Function.
int main(int argc, char *argv[])