{ "cells": [ { "cell_type": "markdown", "id": "d5b7b84e", "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 Monday, December 15, 2025 at 04:27 AM." ] }, { "cell_type": "code", "execution_count": 1, "id": "485c50be", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2025-12-15T03:27:30.587583Z", "iopub.status.busy": "2025-12-15T03:27:30.587358Z", "iopub.status.idle": "2025-12-15T03:27:31.114797Z", "shell.execute_reply": "2025-12-15T03:27:31.092736Z" } }, "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": "6295f4e4", "metadata": {}, "source": [ " Definition of a helper function: " ] }, { "cell_type": "code", "execution_count": 2, "id": "e8ea0541", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2025-12-15T03:27:31.126188Z", "iopub.status.busy": "2025-12-15T03:27:31.125986Z", "iopub.status.idle": "2025-12-15T03:27:31.150381Z", "shell.execute_reply": "2025-12-15T03:27:31.149874Z" } }, "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": "3dc62b25", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2025-12-15T03:27:31.153343Z", "iopub.status.busy": "2025-12-15T03:27:31.153202Z", "iopub.status.idle": "2025-12-15T03:27:31.489122Z", "shell.execute_reply": "2025-12-15T03:27:31.488585Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "