Changeset 7460 for trunk/MagicSoft/Mars/datacenter/scripts/insertdatasets
- Timestamp:
- 01/10/06 22:12:58 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/insertdatasets
r7337 r7460 20 20 # Author(s): Daniela Dorner 08/2004 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 422 # Copyright: MAGIC Software Development, 2000-2006 23 23 # 24 24 # 25 25 # ======================================================================== 26 26 # 27 # This script launches the inserting of the datasets into the db. 28 # 29 # Extract information (dataset number, source name, comment, observation 30 # mode) from dataset file and insert it into the database in the table 31 # DataSets using the macro insertdataset.C 27 32 # 28 33 … … 55 60 esac 56 61 57 62 # get all datasetfiles 58 63 datasetfiles=(`ls $datasetpath/*/*`) 59 64 echo "datasetfiles: "${datasetfiles[@]} >> $scriptlog 2>&1 60 65 echo "" >> $scriptlog 2>&1 61 66 67 # extract information from dataset file and insert it into db with the macro insertdataset.C 62 68 for datasetfile in ${datasetfiles[@]} 63 69 do 70 # get datasetnumber from filename 64 71 no=`echo $datasetfile | cut -d/ -f5 | cut -c8-99 | cut -d. -f1` 72 # get datasetnumber from file and get it with 8 digits 65 73 no2=`grep 'AnalysisNumber:' $datasetfile | sed -e 's/AnalysisNumber://g' | sed -e 's/ //g'` 66 74 no3=`printf %08d $no2` 75 # compare the two datasetnumber 76 # continue only if number is the same 67 77 if [ "$no" = "$no3" ] 68 78 then … … 73 83 continue 74 84 fi 85 # get source name, comment and observation mode from dataset file 75 86 source=`grep 'SourceName:' $datasetfile | sed -e 's/SourceName://g' | sed -e 's/ //g' | sed -e 's/#//g'` >> $scriptlog 2>&1 76 87 comment=`grep 'Comment:' $datasetfile | sed -e 's/Comment://g'` >> $scriptlog 2>&1 … … 94 105 insertdatasetlog=$insertdatasetpath/insertdataset-$no3.log 95 106 107 # insert information into db 96 108 check0=`root -q -b $macrospath/insertdataset.C+\("\"$no2\""\,"\"$source\""\,"\"$wobble\""\,"\"$comment\""\,kFALSE\) | tee $insertdatasetlog | grep int | sed -e 's/(int)//'` 97 109 case $check0 in
Note:
See TracChangeset
for help on using the changeset viewer.