Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New jsons for including extensions in the same jsons as the original sample, and updated #449

Merged
merged 50 commits into from
Dec 20, 2024
Merged
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
92bd79b
Adding json and cfg files.
anehnis Sep 25, 2024
39c5645
Run3 processor and event selection
anehnis Sep 26, 2024
b075887
Topeft/modules update
anehnis Sep 27, 2024
14b505b
Temporary commit
anpicci Oct 2, 2024
cb75227
unit SFs for Run3
anpicci Oct 2, 2024
0ddb050
some tweaking
anpicci Oct 3, 2024
a393197
another temp commit
anpicci Oct 9, 2024
add9520
Fixed issues in analysis processor for plain Run3
anpicci Oct 9, 2024
d6f0a73
Fixed issues in analysis processor for plain Run3
anpicci Oct 9, 2024
f077cca
JME Run3
anpicci Oct 11, 2024
32559ce
Fixing dataset definition for data in analysis_processor
anpicci Oct 14, 2024
a451b06
First pkl file version
anpicci Oct 16, 2024
676f1ea
Adapting SFs to Run3
anpicci Oct 18, 2024
42e7c0d
Fixing dataset definition for data in analysis_processor
anpicci Oct 21, 2024
836e78c
Fixing uncommented line
anpicci Oct 21, 2024
c22c293
Stable Run2 + Run3 flow with systematics (when available)
anpicci Oct 22, 2024
e7cc891
Fixing uncommented line
anpicci Oct 22, 2024
df53944
Fixing uncommented line
anpicci Oct 22, 2024
b8e6273
Adapting corrections to the new JECStack
anpicci Oct 23, 2024
25266bc
Merge branch 'master' into clib_run3
anpicci Oct 24, 2024
440b310
Merging with master
anpicci Oct 24, 2024
1f73882
Minor fixes
anpicci Oct 24, 2024
5f2309c
Minor fixes for pylint
anpicci Oct 24, 2024
a5b1aad
Minor fixes for pylint
anpicci Oct 24, 2024
4488531
Minor fixes for pylint
anpicci Oct 24, 2024
1f442a0
Optimizing JME corrections
anpicci Oct 25, 2024
c5206e0
Merging with the implementations going into coffea
anpicci Oct 28, 2024
df048d0
fixing pylint errors
anpicci Oct 28, 2024
6d9af6f
Addressing Brent's comments
anpicci Nov 5, 2024
769ebaa
Fixing pyling comments
anpicci Nov 5, 2024
028a682
Fixing pyling comments
anpicci Nov 5, 2024
1b0cfae
Fixing pyling comments
anpicci Nov 5, 2024
4aadf62
Implementing Brent's comments
anpicci Nov 6, 2024
98899d5
fixing pylint errors
anpicci Nov 6, 2024
37838b7
Fixing AttachElectronSF
anpicci Nov 8, 2024
3ab30db
Updates for plotting with make_cr_and_sr_plots.py
anehnis Nov 25, 2024
224646f
Updated jsons, summed over ext files
anehnis Nov 26, 2024
01039eb
Working make_cr_and_sr_plots.py update
anehnis Dec 2, 2024
0c7e807
Realigning plotter script to Brent's version
anpicci Dec 3, 2024
5b5294f
Realigning plotter script to Brent's version
anpicci Dec 3, 2024
9e40de3
Realigning to master
anpicci Dec 4, 2024
312ccf3
Updating redirector
anpicci Dec 4, 2024
fad5d79
Merge remote-tracking branch 'origin' into clib_run3
anpicci Dec 4, 2024
bf428a3
fixing ttbar 2QLNu sample
anpicci Dec 4, 2024
bdfb3b3
fixing Run3 cfgs
anpicci Dec 11, 2024
10f1ef2
Script to check that all the files listed in the jsons are reachable
anpicci Dec 12, 2024
86792f7
modified files, according to what is present
anpicci Dec 16, 2024
d3e5184
modified files, according to what is present
anpicci Dec 16, 2024
abf0e97
Merge remote-tracking branch 'origin' into clib_run3
anpicci Dec 16, 2024
dd65989
Merge remote-tracking branch 'origin' into clib_run3
anpicci Dec 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import os
import json

# Base path to check the existence of files
BASE_PATH = "/cms/cephfs/data/"

# Function to check file existence
def check_files_in_json(directory, base_path):
results = {}
for file_name in os.listdir(directory):
if file_name.endswith(".json"):
json_path = os.path.join(directory, file_name)
with open(json_path, 'r') as json_file:
data = json.load(json_file)
if "files" in data:
missing_files = []
for rel_path in data["files"]:
full_path = os.path.join(base_path, rel_path.lstrip('/'))
if not os.path.exists(full_path):
missing_files.append(full_path)
results[file_name] = {
"total_files": len(data["files"]),
"missing_files": missing_files,
"missing_count": len(missing_files),
}
return results

# Main execution
if __name__ == "__main__":
current_directory = os.getcwd()
results = check_files_in_json(current_directory, BASE_PATH)

for json_file, result in results.items():
print(f"JSON File: {json_file}")
print(f" Total Files: {result['total_files']}")
print(f" Missing Files: {result['missing_count']}")
if result['missing_files']:
print(f" Missing Files Sample: {result['missing_files'][:5]}")
print()
bryates marked this conversation as resolved.
Show resolved Hide resolved
Loading