File indexing completed on 2024-04-06 12:02:51
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 O2ODIR=/home/egeland/O2O
0014 CMSSW_VER=CMSSW_0_5_0
0015 SCRAM_PATH=/afs/cern.ch/cms/utils
0016 SCRAM_ARCH=slc3_ia32_gcc323
0017 CMSSW_DIR=${O2ODIR}/${CMSSW_VER}
0018 LOG=$O2ODIR/o2o-log.txt
0019
0020
0021 MAPPING_PATH=${CMSSW_DIR}/src/CondTools/Ecal/src
0022 MAPPING_FILE=${MAPPING_PATH}/EcalPedestals-mapping-custom_1.0.xml
0023 OBJECT_LIBRARY=CondFormatsEcalObjects
0024 OBJECT_NAME=EcalPedestals
0025 OBJECT_TABLE=ECALPEDESTALS
0026 TAG=from_online
0027
0028
0029 ONLINE_DB=ecalh4db
0030 ONLINE_DB_USER=cond01
0031 ONLINE_DB_PASSWORD=******
0032
0033
0034 OFFLINE_DB=devdb10
0035 OFFLINE_DB_USER=cms_ecal
0036 OFFLINE_DB_PASSWORD=******
0037 OFFLINE_CONNECT=oracle://${OFFLINE_DB}/${OFFLINE_DB_USER}
0038
0039
0040
0041 MY_CATALOG=relationalcatalog_oracle://${OFFLINE_DB}/${OFFLINE_DB_USER}
0042
0043
0044 echo -n [`date "+%Y-%m-%d %H:%M:%S"`] >> $LOG;
0045 T_START=`date +%s`
0046
0047
0048
0049 echo -n " Setting env..." >> $LOG;
0050 PATH=$PATH:$SCRAM_PATH
0051 cd $CMSSW_DIR;
0052 eval `scramv1 runtime -sh`;
0053 cd $O20DIR;
0054
0055 COND_UTIL_PATH=${LOCALRT}/src/CondTools/Utilities/bin
0056 PATH=$PATH:$COND_UTIL_PATH
0057
0058 export POOL_CATALOG=${MY_CATALOG}
0059 echo $POOL_CATALOG
0060 export CORAL_AUTH_USER=$OFFLINE_DB_USER
0061 export CORAL_AUTH_PASSWORD=$OFFLINE_DB_PASSWORD
0062
0063
0064
0065
0066
0067
0068
0069 echo -n "Transfering payload data..." >> $LOG;
0070 echo "call payload_o2o();" | sqlplus -S ${ONLINE_DB_USER}/${ONLINE_DB_PASSWORD}@${ONLINE_DB} 2>> $LOG
0071
0072
0073 echo -n "Registering to POOL..." >> $LOG;
0074 setup_pool_database $OBJECT_NAME \
0075 $OBJECT_LIBRARY \
0076 $OFFLINE_CONNECT \
0077 $MAPPING_FILE -o $O2ODIR 2>>$LOG
0078
0079
0080 echo -n "Assigning IOV..." >> $LOG;
0081 cmscond_build_iov -c $OFFLINE_CONNECT \
0082 -d $OBJECT_LIBRARY \
0083 -t $OBJECT_TABLE \
0084 -o $OBJECT_NAME \
0085 -a $TAG 2>>$LOG
0086
0087
0088 T_FINISH=`date +%s`;
0089 T_JOB=$(($T_FINISH-$T_START))
0090 echo "Done ($T_JOB s)." >> $LOG;