Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:11:46

0001 #!/bin/bash
0002 
0003     export dqmFileName=$1
0004     export Run_numb=$2
0005 
0006     export PREDQMDATASET=${dqmFileName#*__}
0007     export DQMDATASET=`echo ${PREDQMDATASET%%.*} | sed 's/__/\//g' | sed 's/^/\//'` 
0008     export RECODATASET=`echo ${PREDQMDATASET%%.*} | sed 's/__/\//g' | sed 's/^/\//' | sed 's/DQM/RECO/'`
0009     export FEVTDATASET=`echo ${PREDQMDATASET%%.*} | sed 's/__/\//g' | sed 's/^/\//' | sed 's/DQM/FEVT/'`
0010 #    echo $DQMDATASET
0011 #    echo $RECODATASET
0012 #    echo $FEVTDATASET
0013 #    export EDMDQMFILES=`dbs lsf --path="$DQMDATASET" --run=$Run_numb --site="T2_CH_CERN" | grep "/store"`
0014 #    export EDMRECOFILES=`dbs lsf --path="$RECODATASET" --run=$Run_numb --site="T2_CH_CERN" | grep "/store"`
0015 #    export EDMFEVTFILES=`dbs lsf --path="$FEVTDATASET" --run=$Run_numb --site="T2_CH_CERN" | grep "/store"`
0016     export EDMDQMFILES=`dbs --search --query="find file where dataset=$DQMDATASET and run=$Run_numb" | grep "/store"`
0017     FIRSTEDMDQMFILE=`expr "$EDMDQMFILES" : '\(/store[A-Za-z0-9_/.\-]*root\)'`
0018     export EDMDQMFILE=`dbs --search --query="find file where file=${FIRSTEDMDQMFILE} and site=T2_CH_CERN" | grep "/store"`
0019     if [ "$EDMDQMFILE" == "" ];  then
0020       export EDMRECOFILES=`dbs --search --query="find file where dataset=$RECODATASET and run=$Run_numb" | grep "/store"`
0021       FIRSTEDMRECOFILE=`expr "$EDMRECOFILES" : '\(/store[A-Za-z0-9_/.\-]*root\)'`
0022       export EDMRECOFILE=`dbs --search --query="find file where file=${FIRSTEDMRECOFILE} and site=T2_CH_CERN" | grep "/store"`
0023       if [ "$EDMRECOFILE" == "" ];  then
0024         export EDMFEVTFILES=`dbs --search --query="find file where dataset=$FEVTDATASET and run=$Run_numb" | grep "/store"`
0025         FIRSTEDMFEVTFILE=`expr "$EDMFEVTFILES" : '\(/store[A-Za-z0-9_/.\-]*root\)'`
0026         export EDMFEVTFILE=`dbs --search --query="find file where file=${FIRSTEDMFEVTFILE}  and site=T2_CH_CERN" | grep "/store"`
0027       fi
0028     fi
0029 #    echo $EDMFEVTFILE
0030 #    echo $EDMRECOFILE
0031 #    echo $EDMDQMFILE
0032     for EDMFILETMP in $EDMFEVTFILE $EDMRECOFILE $EDMDQMFILE 
0033       do 
0034       export EDMFILE=$EDMFILETMP
0035     done
0036 
0037     export COMPLETEEDMFILE=$EDMFILE
0038 #    echo $COMPLETEEDMFILE
0039     export GTNAMES=`edmProvDump $COMPLETEEDMFILE | grep -o --regexp "[A-Z0-9_]*::All"` 
0040     for GTNAME in $GTNAMES
0041       do 
0042       export FINALGTNAME=$GTNAME
0043     done
0044     echo $FINALGTNAME