I am currently running a fairly simple C++ program to merge various Root files using TChain. I am merging around 1,000 files at a time, but each has only 2 or 3 events. The only error I get is
“Error in <TBranch::In the branch %s, no basket contains the entry %d >: CC05E391ModuleModID”
but I do get an output file with events in it. However, I am expecting the file to have 1,000-2,000 events but the file has only around 100 events. This is the code I am using:
#include <iostream>
#include <sstream>
#include "TChain.h"
using namespace std;
int main(int argc, char** argv)
{
TChain join(argv[3]);
int i;
for(i = 9000; i < 11000; i++)
{
stringstream FileName;
FileName << argv[1] << i << ".root";
string FileNameS = FileName.str();
join.Add(FileNameS.c_str());
cout << FileNameS << "\n";
}
join.Merge(argv[2]);
cout << "\n\n Join Done\n";
return 0;
}
These files contain events generated through a Monte Carlo simulation. I doubt that there are any “repeat events” with the exact same values in all branches, but I am wondering if the merging discards repeat events so then the problem I am seeing is due to my Monte Carlo rather than with Root itself. Thank you in advance for your suggestions.
ROOT Version: 5.34/38
Platform: Not Provided
Compiler: Not Provided