Unable to add root files using hadd

Hello I am facing a peculiar problem with merging of root files which I have never faced before. I am trying to add multiple root files having same structure. There are histograms inside a container and a tree inside another containers. The merged file is adding the histograms properly but the trees are not merged. There are much less number of events in the trees than it should be. Please help me in this regard.
I am adding the root files here. When I merge it using hadd, no error is coming.
AnalysisResults_244918_1.root (653.3 KB)

Thanka and regards,
Swati

Dear @swati ,

Your file has a weird structure, I would need your help understanding it.

 rootls -lt AnalysisResults_244918_1.root 
TDirectoryFile  Jul 13 23:08 2023 MultSelection;1 "MultSelection" 
TDirectoryFile  Jul 13 22:56 2023 ResultsData;1   "ResultsData" 

The top-level is composed of 2 directories.

 rootls -lt AnalysisResults_244918_1.root:MultSelection
TList  Jul 13 23:08 2023 cListMultSelection;1 "Doubly linked list" 

Here there is only one TList

rootls -lt AnalysisResults_244918_1.root:ResultsData
TList  Jul 13 23:08 2023 AnalysisMain_tree_TPCchi2_2p3;1               "Doubly linked list" 
TList  Jul 13 23:08 2023 AnalysisMain_tree_TPCnCrossedRows_80;1        "Doubly linked list" 
TList  Jul 13 23:08 2023 AnalysisMain_tree_Vz8cm;1                     "Doubly linked list" 
TList  Jul 13 23:08 2023 Histogram_TrackVariables_TPCchi2_2p3;1        "Doubly linked list" 
TList  Jul 13 23:08 2023 Histogram_TrackVariables_TPCnCrossedRows_80;1 "Doubly linked list" 
TList  Jul 13 23:08 2023 Histogram_TrackVariables_Vz8cm;1              "Doubly linked list" 
TList  Jul 13 23:08 2023 QAPileupPlots_TPCchi2_2p3;1                   "Doubly linked list" 
TList  Jul 13 23:08 2023 QAPileupPlots_TPCnCrossedRows_80;1            "Doubly linked list" 
TList  Jul 13 23:08 2023 QAPileupPlots_Vz8cm;1                         "Doubly linked list" 

Here there are multiple TLists. There are no TTrees or TH1* objects. Could you help me understanding what you are trying to do?

Cheers,
Vincenzo

Dear @vpadulan ,
The TLists named as AnalysisMain_tree_Vz8cm has trees named fTreeEvent in it. Whereas the lists named as Histogram_TrackVariables_Vz8cm have histograms in it.
When I am adding such root files having the exact same structure and name, the tress are not getting merged properly.

Plaese let me know if you need more information.

Thanks,
Swati

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.