Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:33:39

0001 #!/bin/bash
0002 
0003 echo $1 $2 $3
0004 
0005 if [ "$1" == "?" ] 
0006 then
0007         echo "methode : ./relval_gedGsfE [a(nalyze),f(inalize),s(tore),p(ublish)] [i(nteractif),j(ob)] [r(eco),f(ast),p(ileup)]"
0008         echo "defaut = a j r"
0009         exit
0010 fi
0011 
0012 if [ "$1" != "a" ]
0013 then
0014         if [ "$1" != "f" ] 
0015         then
0016                 if [ "$1" != "s" ] 
0017                 then
0018                         if [ "$1" != "p" ]
0019             then
0020                 echo "pas de choix etape" 
0021                 echo "defaut = analyze"
0022                 CHOIX_ETAPE='analyze'
0023                 CHOIX_JOB='8nh'
0024             else
0025                 echo "publish"
0026                 CHOIX_ETAPE='publish'
0027                 CHOIX_JOB='1nh'
0028             fi
0029         else
0030             echo "store"
0031             CHOIX_ETAPE='force'
0032 #            CHOIX_ETAPE='store'
0033             CHOIX_JOB='1nh'
0034                 fi
0035         else
0036                 echo "finalize"
0037                 CHOIX_ETAPE='finalize'
0038         CHOIX_JOB='8nh'
0039         fi
0040 else
0041         echo "analyze"
0042         CHOIX_ETAPE='analyze'
0043     CHOIX_JOB='8nh'
0044 fi
0045 
0046 echo "*** CHOIX_ETAPE : " $1 $CHOIX_ETAPE
0047 
0048 if [ "$2" != "i" ] 
0049 then
0050         echo "pas d'interaction"
0051         echo "defaut = batch"
0052         CHOIX_INTERACTION="./electronBsub ${CHOIX_JOB} /afs/cern.ch/cms/utils/oval run ${CHOIX_ETAPE}.Val"
0053 else
0054         echo "interaction"
0055         CHOIX_INTERACTION="/afs/cern.ch/cms/utils/oval run ${CHOIX_ETAPE}.Val"
0056 fi
0057 
0058 echo "*** CHOIX_INTERACTION : " $2 $CHOIX_INTERACTION
0059 
0060 if [ "$3" != "r" ] 
0061 then
0062         if [ "$3" != "f" ] 
0063         then
0064                 if [ "$3" != "p" ] 
0065                 then
0066                         echo "pas de choix calcul" 
0067                         echo "defaut = FULL"
0068                         CHOIX_CALCUL='Full'
0069                 else
0070                         echo "PILES PileUp"
0071                         list="TTbarStartup ZEEStartup"
0072 #                       list="ZEEStartup"
0073 #                       list="TTbarStartup"
0074                         for element in $list    
0075                         do   
0076                         echo "element =" $element   
0077                         done
0078     if [ ! -d "PU25" ];then
0079         echo "Creation of PU25 folder";
0080         mkdir PU25
0081     else
0082         echo "PU25 folder already created";
0083     fi
0084     if [ ! -d "PU50" ];then
0085         echo "Creation of PU50 folder";
0086         mkdir PU50
0087     else
0088         echo "PU50 folder already created";
0089     fi
0090                         CHOIX_CALCUL='PileUp'
0091                 fi
0092         else
0093                 echo "FAST"
0094         list="TTbarStartup ZEEStartup"
0095 #           list="ZEEStartup "
0096 #            list="TTbarStartup"
0097         for element in $list    
0098         do   
0099             echo "element =" $element   
0100         done
0101     if [ ! -d "FAST" ];then
0102         echo "Creation of FAST folder";
0103         mkdir FAST
0104     else
0105         echo "FAST folder already created";
0106     fi
0107                 CHOIX_CALCUL='Fast'
0108         fi
0109 else
0110     echo "FULL"
0111 #    list="Pt10Startup_UP15 Pt1000Startup_UP15 Pt35Startup_UP15 TTbarStartup_13 ZEEStartup_13 QcdPt80Pt120Startup_13"
0112 #    list="Pt10Startup_UP15 Pt1000Startup_UP15 Pt35Startup_UP15 "
0113 #    list="Pt10Startup Pt1000Startup Pt35Startup TTbarStartup_13 ZEEStartup_13 QcdPt80Pt120Startup_13"
0114 #       list="TTbarStartup_13 ZEEStartup_13 QcdPt80Pt120Startup_13"
0115         list="TTbarStartup_13 ZEEStartup_13 Pt10Startup"
0116 #       list="Pt1000Startup_UP15 "
0117 #       list="TTbarStartup_13 "
0118     for element in $list    
0119     do   
0120         echo "element =" $element   
0121     done
0122     if [ ! -d "GED" ];then
0123         echo "Creation of GED folder";
0124         mkdir GED
0125     else
0126         echo "GED folder already created";
0127     fi
0128     if [ "$1" != "p" ]
0129     then
0130         CHOIX_CALCUL='Full'
0131     else
0132         CHOIX_CALCUL='gedvsgedFull'
0133     fi
0134 fi
0135 
0136 echo "*** CHOIX_CALCUL : " $3 $CHOIX_CALCUL
0137 
0138 echo "initialization done ... running"
0139 echo "--"
0140 if [ "$CHOIX_ETAPE" == "store" -o "$CHOIX_ETAPE" == "force" ]
0141     then
0142     echo "== store =="
0143     for var in `ls DQM*.root`
0144         do
0145             echo $var
0146             i=${var:38}
0147             #echo $i
0148             #echo ${i:0:$((${#i}-12))}
0149             j=${i:0:$((${#i}-12))}
0150             echo electronHistos.$j.root
0151                         var_final=electronHistos.$j.root
0152                         cp $var $var_final
0153         done
0154 fi
0155 
0156 if [ "$CHOIX_ETAPE" == "publish" ]
0157 then
0158     echo "publish"
0159     if [ "$CHOIX_CALCUL" == "Fast" ]
0160     then
0161         echo "FAST"
0162             for j in VsFull VsFast
0163         do
0164                     echo "---------- $j"
0165             for i in $list
0166                     do 
0167                             echo " == ${CHOIX_INTERACTION}${CHOIX_CALCUL}${j}${i}_gedGsfE"
0168                                 ${CHOIX_INTERACTION}${CHOIX_CALCUL}${j}${i}_gedGsfE
0169                     done
0170         done
0171     else # no FAST
0172         echo "noFAST"
0173         for i in $list
0174             do 
0175                     echo " == ${CHOIX_INTERACTION}${CHOIX_CALCUL}${i}_gedGsfE"
0176                         ${CHOIX_INTERACTION}${CHOIX_CALCUL}${i}_gedGsfE
0177                 done
0178     fi
0179     rm dd*.olog dqm*.root
0180 else # no publish
0181     echo "no publish"
0182     for i in $list
0183                 do 
0184                         echo " == ${CHOIX_INTERACTION}${CHOIX_CALCUL}${i}_gedGsfE"
0185                         ${CHOIX_INTERACTION}${CHOIX_CALCUL}${i}_gedGsfE
0186                 done
0187 fi
0188