Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:13:13

0001 #! /bin/bash
0002 
0003 if [ ! "$CMSSW_VERSION" ]; then
0004   echo "the CMSSW environment is not set, please run"
0005   echo
0006   echo "    cmsenv"
0007   echo
0008   echo "and try again."
0009   exit 1
0010 fi
0011 
0012 if [ ! "$1" ]; then
0013   echo "usage: $0 CONFIG"
0014   echo 
0015   echo "Check if the modules used by the CONFIG python file are 'legacy', 'global', 'stream' or 'one' modules, and if they implement the 'fillDescriptions()' method."
0016   exit 1
0017 fi
0018 
0019 # use colors only if the output is sent to a terminal
0020 if [ -t 1 ] ; then
0021   SETCOLOR_SUCCESS='\e[0;32m'
0022   SETCOLOR_WARNING='\e[1;33m'
0023   SETCOLOR_FAILURE='\e[0;31m'
0024   SETCOLOR_NORMAL_='\e[0m'
0025 else
0026   SETCOLOR_SUCCESS=''
0027   SETCOLOR_WARNING=''
0028   SETCOLOR_FAILURE=''
0029   SETCOLOR_NORMAL_=''
0030 fi
0031 
0032 edmConfigDump "$1" | grep 'cms\.EDAnalyzer\|cms\.EDFilter\|cms\.EDProducer\|cms\.OutputModule' | cut -d'"' -f2 | sort -u | while read MODULE
0033 do
0034   edmPluginHelp -p $MODULE | {
0035     read N CLASS TYPE P
0036     read
0037     if [ ! "$CLASS" ]; then
0038       FILL="--"
0039       TYPE="--"
0040       MT="--"
0041       ED="--"
0042     else
0043       if grep -q "not implemented the function"; then
0044         FILL="no"
0045         SETCOLOR_FILL="$SETCOLOR_WARNING"
0046       else
0047         FILL="yes"
0048         SETCOLOR_FILL="$SETCOLOR_SUCCESS"
0049       fi
0050       TYPE=`echo $TYPE | sed -e's/[()]//g'`
0051       MT=`echo $TYPE | cut -s -d: -f1`
0052       ED=`echo $TYPE | cut -s -d: -f3`
0053       if ! [ "$MT" ]; then
0054         MT="legacy"
0055         ED="$TYPE"
0056         SETCOLOR_MT="$SETCOLOR_FAILURE"
0057       elif [ "$MT" == "one" ]; then
0058         SETCOLOR_MT="$SETCOLOR_WARNING"
0059       else
0060         SETCOLOR_MT="$SETCOLOR_SUCCESS"
0061       fi
0062     fi
0063     printf "%-64s%-16s%b%-16s%b%s$SETCOLOR_NORMAL_\n" "$MODULE" "$ED" "$SETCOLOR_MT" "$MT" "$SETCOLOR_FILL" "$FILL"
0064   }
0065 done