Hi,
I am using TSelector, derived from the MakeSelector.
It looks something like this:
void run_example()
{
TChain* fChain=new TChain("ExampleTree");
fChain->Add("/cms/data4/ttbar/ntuple/ttbar_ntuple_100.root");
fChain->Process("root_script/example.C++");
}
where the example.C is the file that contains the selection criteriea.
I have a lot of files in the same directory that contain the same tree.
Can anybody suggest a short code to process all the files in the directory without putting them in the code individually, like this …
fChain->Add("/cms/data4/ttbar/ntuple/ttbar_ntuple_100.root");
fChain->Add("/cms/data4/ttbar/ntuple/ttbar_ntuple_101.root");
fChain->Add("/cms/data4/ttbar/ntuple/ttbar_ntuple_102.root");
....
70 lines
Also,
when I processing files from the different directory, i.e.
I want to use the same processing code, but different weight. Is there a way, I can tell to the process function which weight to use when the files from the certain directory are being processed?
thank you very much in advance,
Dmitry.