Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64

#in 180 with CondCore/Utilities V04-04-00
cd /build/vin/Align18X
foreach tag (TIFpass4 TIFpass4APE TibTidModuleSurvey_v4 TibTidModuleSurveyAPE_v4 TibTidTecAllSurvey_v4 TibTidTecAllSurveyAPE_v4)
set pname=`cmscond_list_iov -c frontier://cmsfrontier.cern.ch:8000/Frontier/CMS_COND_18X_ALIGNMENT -t $tag | grep "Payload"  | sed 's/.*PayloadContainerName //g' | sed 's/Rcd//'`
cmscond_export_iov -s frontier://cmsfrontier.cern.ch:8000/Frontier/CMS_COND_18X_ALIGNMENT -d sqlite_file:$tag.db -D CondFormatsAlignment -t $tag -n $pname
cmscond_list_iov -c  sqlite_file:$tag.db -t $tag
end

set dir200=/build/vin/Align20X
set dir180=/build/vin/Align18X
cd $dir200
foreach x ($dir180/*.db)
echo $x
foreach tag (`cmscond_list_iov -c sqlite_file:$x`)
cmscond_list_iov -c sqlite_file:$x -t $tag > `basename $x`_dump.${tag}
end
end

#in 200
set dict=CondFormatsAlignment 
set dir200=/build/vin/Align20X
set dir180=/build/vin/Align18X
cd dir200
cp $dir180/*.db $dir200/.

touch drop
echo "drop table METADATA;" >> drop
foreach x ($dir200/*.db)
echo $x
pool_upgrade_pool_schema -c sqlite_file:$x -d $dict
pool_drop_container -n "cond::IOV" --full -c sqlite_file:$x
echo ".exit" | sqlite3 -batch -init drop $x
end
rm drop

foreach x (*_dump*)
set file = `echo $x | sed 's/_dump.*$//'`
echo $file
cmscond_load_iov -c sqlite_file:$dir200/$file $x
end


foreach x ($dir200/*.db)
echo $x
pool_query_database -c sqlite_file:$x -d $dict CondCoreIOVService
foreach tag (`cmscond_list_iov -c sqlite_file:$x`)
echo $tag
cmscond_list_iov -c sqlite_file:$x -t $tag
end
end

cd /build/vin/Align20X
set dir200=/build/vin/Align20X
foreach x ($dir200/*.db)
echo $x
foreach tag (`cmscond_list_iov -c sqlite_file:$x`)
echo $tag
set pname=`cmscond_list_iov -c  sqlite_file:$x -t $tag | grep "Payload"  | sed 's/.*PayloadContainerName //g' | sed 's/Rcd//'`
cmscond_export_iov -s sqlite_file:$x -d oracle://cms_orcoff_int2r/CMS_COND_ALIGNMENT  -p /afs/cern.ch/cms/DB/conddb  -D CondFormatsAlignment -t $tag -n $pname
cmscond_list_iov -c oracle://cms_orcoff_int2r/CMS_COND_ALIGNMENT -P /afs/cern.ch/cms/DB/conddb  -t $tag
end
end