{
"cells": [
{
"cell_type": "markdown",
"id": "8cf0fde8",
"metadata": {},
"source": [
"# run_h1analysis\n",
"Macro driving the analysis can specify file name and type\n",
"\n",
".- type == 0 : normal\n",
" - type = 1 : use AClic to compile selector\n",
" - type = 2 : use a fill list and then process the fill list///\n",
"\n",
"\n",
"\n",
"\n",
"**Author:** \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:11 PM."
]
},
{
"cell_type": "markdown",
"id": "87a2bf10",
"metadata": {},
"source": [
" Arguments are defined. "
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "657e2a0b",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:11:17.961075Z",
"iopub.status.busy": "2026-05-19T20:11:17.960957Z",
"iopub.status.idle": "2026-05-19T20:11:18.280579Z",
"shell.execute_reply": "2026-05-19T20:11:18.279906Z"
}
},
"outputs": [],
"source": [
"int type = 0;\n",
"const char * h1dir = 0;"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "ef7354e0",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:11:18.295390Z",
"iopub.status.busy": "2026-05-19T20:11:18.295255Z",
"iopub.status.idle": "2026-05-19T20:11:18.499269Z",
"shell.execute_reply": "2026-05-19T20:11:18.498732Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Run h1 analysis \n"
]
}
],
"source": [
"std::cout << \"Run h1 analysis \" << std::endl;"
]
},
{
"cell_type": "markdown",
"id": "bfeebd28",
"metadata": {},
"source": [
"create first the chain with all the files"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "238020a2",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2026-05-19T20:11:18.500794Z",
"iopub.status.busy": "2026-05-19T20:11:18.500676Z",
"iopub.status.idle": "2026-05-19T20:11:18.858696Z",
"shell.execute_reply": "2026-05-19T20:11:18.849429Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Creating the chain\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Error in : macro ./h1analysis.C not found in path .:/github/home/ROOT-CI/build/macros\n",
"Error in : The file ./h1analysis.C does not define a class named h1analysis.\n"
]
}
],
"source": [
"TChain chain(\"h42\");\n",
"\n",
"if (h1dir) {\n",
" gSystem->Setenv(\"H1\",h1dir);\n",
"}\n",
"else\n",
" gSystem->Setenv(\"H1\",\"root://eospublic.cern.ch//eos/root-eos/h1/\");\n",
"\n",
"\n",
"std::cout << \"Creating the chain\" << std::endl;\n",
"\n",
"chain.SetCacheSize(20*1024*1024);\n",
"chain.Add(\"$H1/dstarmb.root\");\n",
"chain.Add(\"$H1/dstarp1a.root\");\n",
"chain.Add(\"$H1/dstarp1b.root\");\n",
"chain.Add(\"$H1/dstarp2.root\");\n",
"\n",
"TString selectionMacro = gSystem->GetDirName(__FILE__) + \"/h1analysis.C\";\n",
"\n",
"if (type == 0)\n",
" chain.Process(selectionMacro);\n",
"else if (type == 1) {\n",
" // use AClic ( add a + at the end\n",
" selectionMacro += \"+\";\n",
" chain.Process(selectionMacro);\n",
"}\n",
"else if (type == 2) {\n",
" chain.Process(selectionMacro,\"fillList\");\n",
" chain.Process(selectionMacro,\"useList\");\n",
"}"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "ROOT C++",
"language": "c++",
"name": "root"
},
"language_info": {
"codemirror_mode": "text/x-c++src",
"file_extension": ".C",
"mimetype": " text/x-c++src",
"name": "c++"
}
},
"nbformat": 4,
"nbformat_minor": 5
}