forked from fsetti/privateMC_gen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
remove_corrupted_files.py
executable file
·64 lines (54 loc) · 4.42 KB
/
remove_corrupted_files.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import os
import sys
import ROOT as r
from glob import glob
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII/*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII/VBF_CV_1_C2V_0_C3_1_HHggtautau_*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII/VBF_CV_1_C2V_1_C3_1_HHggtautau_*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII/VBF_CV_1_C2V_2_C3_1_HHggtautau_*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII/ggF_cHHH0_HHggtautau_*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII/VBF_CV_1_C2V_1_C3_0_HHggtautau_*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII/VBF_CV_0_5_C2V_1_C3_1_HHggtautau_*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII/VBF_CV_1_C2V_1_C3_2_HHggtautau_*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII/VBF_CV_1_5_C2V_1_C3_1_HHggtautau_*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII/ggF_cHHH1_HHggtautau_*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII/ggF_cHHH2p45_HHggtautau_*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII/ggF_cHHH5_HHggtautau_*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII/res_Graviton_M300*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII/res_Graviton_M400*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII/res_Graviton_M500*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII/res_Graviton_M800*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII/res_Graviton_M1000*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII_UL/NMSSM_XYH_Y_tautau_H_gg_MX_*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII_UL/NMSSM_XYH_Y_gg_H_tautau_MX_*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII_20UL/GluGluToHHTo2G2Tau_node_cHHH0*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII_20UL/GluGluToHHTo2G2Tau_node_cHHH1*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII_20UL/GluGluToHHTo2G2Tau_node_cHHH2p45*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII_20UL/GluGluToHHTo2G2Tau_node_cHHH5*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII_20UL/GluGluToHHTo2G2W_*dileptonic*cHHH0*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII_20UL/GluGluToHHTo2G2W_*dileptonic*SM*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII_20UL/GluGluToHHTo2G2W_*dileptonic*cHHH2p45*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII_20UL/GluGluToHHTo2G2W_*dileptonic*cHHH5*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII_20UL/GluGluToHHTo2G2W_*semileptonic*cHHH0*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII_20UL/GluGluToHHTo2G2W_*semileptonic*SM*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII_20UL/GluGluToHHTo2G2W_*semileptonic*cHHH2p45*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII_20UL/GluGluToHHTo2G2W_*semileptonic*cHHH5*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII_20UL/DiPhoton*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII_20UL/GJets_DoubleEMEnriched_PtG_20MGG_40To80*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII_20UL/GJets_DoubleEMEnriched_PtG_20MGG-80*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII_20UL/GluGluToBulkGravitonToHHTo2G2Tau_M1*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII_20UL/GluGluToBulkGravitonToHHTo2G2Tau_M2*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII_20UL/GluGluToBulkGravitonToHHTo2G2Tau_M3*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII_20UL/GluGluToBulkGravitonToHHTo2G2Tau_M4*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII_20UL/GluGluToBulkGravitonToHHTo2G2Tau_M5*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII_20UL/GluGluToBulkGravitonToHHTo2G2Tau_M6*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII_20UL/GluGluToBulkGravitonToHHTo2G2Tau_M7*/*.root'
#check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII_20UL/GluGluToBulkGravitonToHHTo2G2Tau_M8*/*.root'
check_dir = '/hadoop/cms/store/user/fsetti/nanoAOD_runII_20UL/GluGluToBulkGravitonToHHTo2G2Tau_M9*/*.root'
for ifile in glob(check_dir):
try:
rfile = r.TFile(ifile)
nEvents = rfile.Get("Events").GetEntries()
rfile.Close()
except:
os.system("rm {}".format(ifile))