at the end output_tree->GetEntries() is correct, but ther’s no branches in it! I get this warnings in the logs:
17:29:51 16997 Wrk-0.0 | Warning in <TTree::CopyAddresses>: Could not find branch named 'Run' in tree named 'output_tree'
17:29:51 16997 Wrk-0.0 | Warning in <TTree::CopyAddresses>: Could not find branch named 'Event' in tree named 'output_tree'
17:29:51 16997 Wrk-0.0 | Warning in <TTree::CopyAddresses>: Could not find branch named 'LumiBlock' in tree named 'output_tree'
I don’t know because my code inside if(first) must be executer only one time. In your link I read: “Init() will be called many times when running with PROOF.”