Run_H 1Analysis

Macro driving the analysis can specify file name and type

.- type == 0 : normal

  • type = 1 : use AClic to compile selector
  • type = 2 : use a fill list and then process the fill list///

Author:
This notebook tutorial was automatically generated with ROOTBOOK-izer from the macro found in the ROOT repository on Monday, May 25, 2020 at 04:45 AM.


Arguments are defined.

In [1]:
int type = 0;
const char * h1dir = 0;
In [2]:
std::cout << "Run h1 analysis " << std::endl;
Run h1 analysis 

Create first the chain with all the files

In [3]:
TChain chain("h42");

if (h1dir) {
   gSystem->Setenv("H1",h1dir);
}
else
   gSystem->Setenv("H1","http://root.cern.ch/files/h1/");


std::cout << "Creating the chain" << std::endl;

chain.SetCacheSize(20*1024*1024);
chain.Add("$H1/dstarmb.root");
chain.Add("$H1/dstarp1a.root");
chain.Add("$H1/dstarp1b.root");
chain.Add("$H1/dstarp2.root");

TString selectionMacro = gSystem->GetDirName(__FILE__) + "/h1analysis.C";

if (type == 0)
   chain.Process(selectionMacro);
else if (type == 1)   {
   // use AClic ( add a + at the end
   selectionMacro += "+";
   chain.Process(selectionMacro);
}
else if (type == 2) {
   chain.Process(selectionMacro,"fillList");
   chain.Process(selectionMacro,"useList");
}
Creating the chain
Error in <TApplication::ProcessLine>: macro ./h1analysis.C not found in path .:/mnt/build/workspace/root-makedoc-master/rootspi/rdoc/src/master.build/macros
Error in <TSelector::GetSelector>: The file ./h1analysis.C does not define a class named h1analysis.