Back to home page

Project CMSSW displayed by LXR

 
 

    


Warning, /CondCore/PopCon/test/runMergeExample_new is written in an unsupported language. File is not indexed.

0001 #run popcon example1
0002 #  put your firstsince value after xxx 
0003 mkdir testPopCon
0004 pushd testPopCon
0005 
0006 cp $LOCALRT/src/CondCore/PopCon/test/PopConExample1_template.py PopCon.py
0007 
0008 echo "populate pop_test.db with xxx, xxx+10, xxx+20" | sed 's/xxx/3/g' 
0009 cmsRun PopCon.py sinceTime=3 numberObj=3
0010 
0011 
0012 echo "populate pop_test1.db with 24: shall work"  
0013 cmsRun PopCon.py sinceTime=24 numberObj=1  connect='sqlite_file:pop_test1.db'  
0014 
0015 echo "populate pop_test1.db with 26: shall work"  
0016 cmsRun PopCon.py sinceTime=26 numberObj=1  connect='sqlite_file:pop_test1.db'  
0017 
0018 echo "error in populate pop_test1.db with 25"  
0019 cmsRun PopCon.py sinceTime=25 numberObj=1  connect='sqlite_file:pop_test1.db'  
0020 
0021 echo "success in populate pop_test1.db with 25"  
0022 cmsRun PopCon.py outOfOrder=1 sinceTime=25 numberObj=1  connect='sqlite_file:pop_test1.db'  
0023 
0024 echo "populate pop_test.db with 1,20,21,22,25,26 in closeIOV mode"  
0025 cmsRun PopCon.py closeIOV=1 sinceTime=1 numberObj=1 connect='sqlite_file:pop_test.db'  tag='CloseIOV'
0026 cmsRun PopCon.py closeIOV=1 sinceTime=20 numberObj=1 connect='sqlite_file:pop_test.db'  tag='CloseIOV'
0027 cmsRun PopCon.py closeIOV=1 sinceTime=21 numberObj=1 connect='sqlite_file:pop_test.db'  tag='CloseIOV'
0028 cmsRun PopCon.py closeIOV=1 sinceTime=22 numberObj=1 connect='sqlite_file:pop_test.db'  tag='CloseIOV'
0029 cmsRun PopCon.py closeIOV=1 sinceTime=25 numberObj=1 connect='sqlite_file:pop_test.db'  tag='CloseIOV'
0030 cmsRun PopCon.py closeIOV=1 sinceTime=26 numberObj=1 connect='sqlite_file:pop_test.db'  tag='CloseIOV'
0031 
0032 
0033 
0034 echo "populate pop_test2.db with 42"
0035 cmsRun PopCon.py sinceTime=42 numberObj=1 connect='sqlite_file:pop_test2.db'
0036 
0037 echo "populate pop_test3.db with 7 + other 10"
0038 cmsRun PopCon.py sinceTime=7 numberObj=10 connect='sqlite_file:pop_test3.db'  tag='Example_tag2'
0039 
0040 
0041 echo "inspect db"
0042 cmscond_list_iov -c sqlite_file:pop_test.db -a
0043 cmscond_list_iov -c sqlite_file:pop_test1.db -a
0044 cmscond_list_iov -c sqlite_file:pop_test2.db -a
0045 cmscond_list_iov -c sqlite_file:pop_test3.db -a
0046 
0047 echo "get iov details"
0048 cmscond_list_iov -c sqlite_file:pop_test.db -t Example_tag -s -v
0049 cmscond_list_iov -c sqlite_file:pop_test.db -t  CloseIOV -s -v
0050 cmscond_list_iov -c sqlite_file:pop_test1.db -t Example_tag -s -v
0051 cmscond_list_iov -c sqlite_file:pop_test2.db -t Example_tag -s -v
0052 cmscond_list_iov -c sqlite_file:pop_test3.db -t Example_tag2 -s -v
0053 
0054 #FIXME! Change export...
0055 echo "import"
0056 
0057 echo "shall fail"
0058 cmscond_export_iov -s sqlite_file:pop_test1.db -t Example_tag -d sqlite_file:pop_test.db  -l sqlite_file:log.db
0059 
0060 echo "shall work"
0061 cmscond_export_iov -s sqlite_file:pop_test1.db -t Example_tag -d sqlite_file:pop_test.db  -l sqlite_file:log.db -o
0062 
0063 echo "shall fail"
0064 cmscond_export_iov -s sqlite_file:pop_test1.db -t Example_tag -d sqlite_file:pop_test.db  -l sqlite_file:log.db -o
0065 
0066 echo "shall work"
0067 cmscond_export_iov -s sqlite_file:pop_test2.db -t Example_tag -d sqlite_file:pop_test.db  -l sqlite_file:log.db
0068 
0069 cmscond_list_iov -c sqlite_file:pop_test.db -t Example_tag -s -v
0070 
0071 echo "import starting from 64"
0072 cmscond_export_iov -s sqlite_file:pop_test3.db -i Example_tag2 -b 64 -e 89 -t Example_tag -d sqlite_file:pop_test.db -l sqlite_file:log.db
0073 
0074 cmscond_list_iov -c sqlite_file:pop_test.db -t Example_tag -s -v
0075 
0076 echo "duplicate"
0077 cmscond_duplicate_iov -c sqlite_file:pop_test.db -t Example_tag -f 65 -s 92  -l sqlite_file:log.db
0078 cmscond_duplicate_iov -c sqlite_file:pop_test.db -t Example_tag -f 45 -s 95  -l sqlite_file:log.db
0079 echo "duplicate errors"
0080 cmscond_duplicate_iov -c sqlite_file:pop_test.db -t Example_tag -f 45 -s 98  -l sqlite_file:log.db
0081 cmscond_duplicate_iov -c sqlite_file:pop_test.db -t Example_tag -f 45 -s 11  -l sqlite_file:log.db
0082 cmscond_list_iov -c sqlite_file:pop_test.db -t Example_tag -s -v
0083 echo "shallow copy of one"
0084 cmscond_duplicate_iov -c sqlite_file:pop_test.db -t Example_tag  -d  copyOfExample_tag -f 4 -s 2  -l sqlite_file:log.db
0085 cmscond_list_iov -c sqlite_file:pop_test.db -t copyOfExample_tag -s -v
0086 
0087 
0088 echo "rename"
0089 cmscond_list_iov -c sqlite_file:pop_test.db -t Example_tag -o
0090 sed -i 's/Example_tag/Example_tag_renamed/' Example_tag.dump
0091 cmscond_load_iov -c sqlite_file:pop_test.db Example_tag.dump 
0092 cmscond_list_iov -c sqlite_file:pop_test.db -t Example_tag_renamed -s -v
0093 
0094 
0095 #note: tag-name, log-name and db-name must be the same as in the cfg file  
0096 
0097 echo "dump log"
0098 cmscond_logdb_dump -c sqlite_file:log.db  > test_log1.log
0099 
0100 
0101 # removing the EXECTIME information from the log
0102 cat test_log1.log | sed 's/EXECTIME (string) : 2008-[0-9]-[0-9][0-9]-[0-9][0-9]:[0-9][0-9]:[0-9][0-9]//g' | sed 's/EXECTIME (string) : 2008-[0-9]-[0-9][0-9]-[0-9][0-9]:[0-9][0-9]:[0-9]//g'| sed 's/EXECTIME (string) : 2008-[0-9]-[0-9][0-9]-[0-9][0-9]:[0-9]:[0-9][0-9]//g' > test_log2.log
0103 
0104 mv test_log2.log test_log1.log
0105 cat test_log1.log
0106 
0107 
0108 popd
0109