Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:26:51

0001 #!/usr/bin/env bash
0002 export LC_ALL=C
0003 eval `scram runtime -sh`
0004 cd ${LOCALRT}/tmp
0005 
0006 if [ ! -f ./function-calls-db.txt ]
0007         then
0008         echo "run ${CMSSW_BASE}/src/Utilities/StaticAnalyzers/scripts/run_class_checker.sh first"
0009         exit 1
0010 fi
0011 
0012 
0013 if [ ! -f ./classes.txt.dumperft ]
0014         then
0015         echo "run ${CMSSW_BASE}/src/Utilities/StaticAnalyzers/scripts/run_class_dumper.sh first"
0016         exit 2
0017 fi
0018 
0019 
0020 if [ ! -f ./data-class-funcs.py ]
0021         then 
0022         cp -pv ${CMSSW_BASE}/src/Utilities/StaticAnalyzers/scripts/data-class-funcs.py .
0023 fi
0024  
0025 ./data-class-funcs.py 2>&1 > data-class-funcs-report.txt
0026 grep -v -e "^In call stack " data-class-funcs-report.txt | grep -v -e"Flagged event setup data class"  >override-flagged-classes.txt
0027 grep -e "^Flagged event setup data class" data-class-funcs-report.txt | sort -u | awk '{print $0"\n\n"}' >esd2tlf.txt
0028 grep -e "^In call stack" data-class-funcs-report.txt | sort -u | awk '{print $0"\n\n"}' >tlf2esd.txt
0029 
0030 if [ ! -f ./statics.py ]
0031         then
0032         cp -pv ${CMSSW_BASE}/src/Utilities/StaticAnalyzers/scripts/statics.py .
0033 fi 
0034 ./statics.py 2>&1 > statics-report.txt.unsorted
0035 sort -u < statics-report.txt.unsorted > statics-report.txt
0036 grep -e "^In call stack " statics-report.txt | awk '{print $0"\n"}' > modules2statics.txt
0037 grep -e "^Non-const static variable " statics-report.txt | awk '{print $0"\n"}' > statics2modules.txt
0038 grep -e "^Known thread unsafe function " statics-report.txt | awk '{print $0"\n"}' >> statics2modules.txt
0039 
0040 if [ ! -f ./edm-global-class.py ]
0041         then
0042         cp -pv ${CMSSW_BASE}/src/Utilities/StaticAnalyzers/scripts/edm-global-class.py .
0043 fi 
0044 
0045 edm-global-class.py >edm-global-classes.txt.unsorted
0046 sort -u edm-global-classes.txt.unsorted | grep -e"^EDM global class " | sort -u >edm-global-classes.txt
0047 sort -u edm-global-classes.txt.unsorted | grep -v -e"^EDM global class " >edm-global-classes.txt.extra
0048