{
"cells": [
{
"cell_type": "markdown",
"id": "59a26f17",
"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, March 19, 2024 at 07:21 PM."
]
},
{
"cell_type": "markdown",
"id": "0bb9beaa",
"metadata": {},
"source": [
" Arguments are defined. "
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "90de0adb",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2024-03-19T19:21:50.282560Z",
"iopub.status.busy": "2024-03-19T19:21:50.282184Z",
"iopub.status.idle": "2024-03-19T19:21:51.399069Z",
"shell.execute_reply": "2024-03-19T19:21:51.398068Z"
}
},
"outputs": [],
"source": [
"int type = 0;\n",
"const char * h1dir = 0;"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "31cebceb",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2024-03-19T19:21:51.416847Z",
"iopub.status.busy": "2024-03-19T19:21:51.416480Z",
"iopub.status.idle": "2024-03-19T19:21:51.644149Z",
"shell.execute_reply": "2024-03-19T19:21:51.641759Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Run h1 analysis \n"
]
}
],
"source": [
"std::cout << \"Run h1 analysis \" << std::endl;"
]
},
{
"cell_type": "markdown",
"id": "55842493",
"metadata": {},
"source": [
"create first the chain with all the files"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "ef0dba63",
"metadata": {
"collapsed": false,
"execution": {
"iopub.execute_input": "2024-03-19T19:21:51.651893Z",
"iopub.status.busy": "2024-03-19T19:21:51.651478Z",
"iopub.status.idle": "2024-03-19T19:21:52.273044Z",
"shell.execute_reply": "2024-03-19T19:21:52.271626Z"
}
},
"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 .:/home/sftnight/build/workspace/root-makedoc-master/rootspi/rdoc/src/master.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\",\"http://root.cern/files/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
}