HPS-MC
 
Loading...
Searching...
No Matches
MergeStatsCollector Class Reference

Public Member Functions

 __init__ (self, search_dir, pattern="**/*_stats.json")
 
 find_stats_files (self)
 
 collect (self)
 
 write_summary (self, output_file)
 
 print_report (self, quiet=False)
 

Public Attributes

 search_dir
 
 pattern
 
 stats_files
 
 job_stats
 
 summary
 

Detailed Description

Collects and aggregates MergeROOT statistics from JSON files.

Definition at line 19 of file collect_merge_stats.py.

Constructor & Destructor Documentation

◆ __init__()

__init__ (   self,
  search_dir,
  pattern = "**/*_stats.json" 
)
Initialize the collector.

Parameters
----------
search_dir : str
    Directory to search for stats files
pattern : str
    Glob pattern for finding stats files (default: **/*_stats.json)

Definition at line 24 of file collect_merge_stats.py.

Member Function Documentation

◆ collect()

collect (   self)
Collect and aggregate statistics from all found files.

Returns
-------
dict
    Aggregated statistics dictionary

Definition at line 54 of file collect_merge_stats.py.

◆ find_stats_files()

find_stats_files (   self)
Find all stats JSON files matching the pattern.

Returns
-------
list
    List of paths to stats files found

Definition at line 41 of file collect_merge_stats.py.

◆ print_report()

print_report (   self,
  quiet = False 
)
Print a human-readable summary report.

Parameters
----------
quiet : bool
    If True, only print summary line

Definition at line 141 of file collect_merge_stats.py.

◆ write_summary()

write_summary (   self,
  output_file 
)
Write the summary to a JSON file.

Parameters
----------
output_file : str
    Path to output JSON file

Definition at line 126 of file collect_merge_stats.py.

Member Data Documentation

◆ job_stats

job_stats

Definition at line 38 of file collect_merge_stats.py.

◆ pattern

pattern

Definition at line 36 of file collect_merge_stats.py.

◆ search_dir

search_dir

Definition at line 35 of file collect_merge_stats.py.

◆ stats_files

stats_files

Definition at line 37 of file collect_merge_stats.py.

◆ summary

summary

Definition at line 39 of file collect_merge_stats.py.


The documentation for this class was generated from the following file: