{ "cells": [ { "cell_type": "markdown", "id": "a590a9b2", "metadata": {}, "source": [ "# pstable\n", "\n", "\n", "\n", "\n", "**Author:** Olivier Couet \n", "This notebook tutorial was automatically generated with ROOTBOOK-izer from the macro found in the ROOT repository on Tuesday, May 19, 2026 at 08:37 PM." ] }, { "cell_type": "code", "execution_count": 1, "id": "2b896447", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:37:26.601222Z", "iopub.status.busy": "2026-05-19T20:37:26.601088Z", "iopub.status.idle": "2026-05-19T20:37:26.931588Z", "shell.execute_reply": "2026-05-19T20:37:26.931067Z" } }, "outputs": [], "source": [ "void table(Float_t x1, Float_t x2, Float_t yrange, TText &t, const char **symbol, Bool_t octal);" ] }, { "cell_type": "markdown", "id": "3f18b009", "metadata": {}, "source": [ " Definition of a helper function: " ] }, { "cell_type": "code", "execution_count": 2, "id": "06cc09d3", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:37:26.949343Z", "iopub.status.busy": "2026-05-19T20:37:26.949181Z", "iopub.status.idle": "2026-05-19T20:37:26.980024Z", "shell.execute_reply": "2026-05-19T20:37:26.970812Z" } }, "outputs": [], "source": [ "%%cpp -d\n", "void table(Float_t x1, Float_t x2, Float_t yrange, TText &t, const char **symbol, Bool_t octal)\n", "{\n", " Int_t i;\n", " Int_t n = 0;\n", " for (i = 0; i < 1000; i++) {\n", " if (!strcmp(symbol[i], \"END\"))\n", " break;\n", " n++;\n", " }\n", " Float_t y1 = 2.5;\n", " Float_t y2 = yrange - 0.5;\n", " Float_t dx = (x2 - x1) / 5;\n", " Float_t dy = (y2 - 1 - y1) / (n + 1);\n", " Float_t y = y2 - 1 - 0.7 * dy;\n", " Float_t xc0 = x1 + 0.5 * dx;\n", " Float_t xc1 = xc0 + dx;\n", " Float_t xc2 = xc1 + dx;\n", " Float_t xc3 = xc2 + dx;\n", " Float_t xc4 = xc3 + dx;\n", " TLine line;\n", " line.DrawLine(x1, y1, x1, y2);\n", " line.DrawLine(x1, y1, x2, y1);\n", " line.DrawLine(x1, y2, x2, y2);\n", " line.DrawLine(x2, y1, x2, y2);\n", " line.DrawLine(x1, y2 - 1, x2, y2 - 1);\n", " line.DrawLine(x1 + dx, y1, x1 + dx, y2);\n", " line.DrawLine(x1 + 2 * dx, y1, x1 + 2 * dx, y2);\n", " line.DrawLine(x1 + 3 * dx, y1, x1 + 3 * dx, y2);\n", " line.DrawLine(x1 + 4 * dx, y1, x1 + 4 * dx, y2);\n", " TText tit(0, 0, \"a\");\n", " tit.SetTextSize(0.015);\n", " tit.SetTextFont(72);\n", " tit.SetTextAlign(22);\n", " tit.DrawText(xc0, y2 - 0.6, \"Input\");\n", " tit.DrawText(xc1, y2 - 0.6, \"Roman\");\n", " tit.DrawText(xc2, y2 - 0.6, \"Greek\");\n", " tit.DrawText(xc3, y2 - 0.6, \"Special\");\n", " tit.DrawText(xc4, y2 - 0.6, \"Zapf\");\n", " char text[12];\n", " for (i = 0; i < n; i++) {\n", " if (octal) {\n", " unsigned char value = *symbol[i];\n", " snprintf(text, 12, \"@\\\\ %3o\", value);\n", " } else {\n", " strcpy(text, symbol[i]);\n", " }\n", " t.DrawText(xc0, y, text);\n", " snprintf(text, 12, \"%s\", symbol[i]);\n", " t.DrawText(xc1, y, text);\n", " snprintf(text, 12, \"`%s\", symbol[i]);\n", " t.DrawText(xc2, y, text);\n", " snprintf(text, 12, \"'%s\", symbol[i]);\n", " t.DrawText(xc3, y, text);\n", " snprintf(text, 12, \"~%s\", symbol[i]);\n", " t.DrawText(xc4, y, text);\n", " y -= dy;\n", " }\n", "}" ] }, { "cell_type": "code", "execution_count": 3, "id": "9b46dcdc", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:37:27.002332Z", "iopub.status.busy": "2026-05-19T20:37:27.002189Z", "iopub.status.idle": "2026-05-19T20:37:27.215168Z", "shell.execute_reply": "2026-05-19T20:37:27.214704Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "