Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Scan-Operator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
YARR
Utilities
Scan-Operator
Commits
aaf1b24f
Commit
aaf1b24f
authored
3 years ago
by
Mario
Browse files
Options
Downloads
Patches
Plain Diff
Modified the structure of the data folder
parent
4ba08a5c
No related branches found
No related tags found
1 merge request
!23
Devel
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ScanOperator.sh
+14
-7
14 additions, 7 deletions
ScanOperator.sh
scanLauncher.sh
+4
-4
4 additions, 4 deletions
scanLauncher.sh
with
18 additions
and
11 deletions
ScanOperator.sh
+
14
−
7
View file @
aaf1b24f
...
...
@@ -156,12 +156,14 @@ echo "$(($(<$SOBASE/.counters/runNumber)+1))" > $SOBASE/.counters/runNumber
export
SO_RUNNUMBER
=
"
$(
<
$SOBASE
/.counters/today
)
_
$(
printf
"%03d"
$(
<
$SOBASE
/.counters/runNumber
))
"
# data folder
mkdir
-p
$SOBASE
/data/
$SO_RUNNUMBER
# data folders
mkdir
-p
$SOBASE
/data/by_runnumber/
$SO_RUNNUMBER
mkdir
-p
$SOBASE
/data/by_moduleid/
$module_id
/
ln
-s
$SOBASE
/data/by_runnumber/
$SO_RUNNUMBER
$SOBASE
/data/by_moduleid/
$module_id
/
# time data
touch
$SOBASE
/data/
$SO_RUNNUMBER
/time.dat
export
TIMEFILE
=
"
$SOBASE
/data/
$SO_RUNNUMBER
/time.dat"
touch
$SOBASE
/data/
by_runnumber/
$SO_RUNNUMBER
/time.dat
export
TIMEFILE
=
"
$SOBASE
/data/
by_runnumber/
$SO_RUNNUMBER
/time.dat"
echo
-ne
"# what Elapsed (s)
\n
"
>>
$TIMEFILE
# start measuring time
...
...
@@ -212,7 +214,7 @@ fi
if
[[
"
$syncOption
"
==
""
]]
&&
[[
"
$localdbOpt
"
!=
""
]]
then
syncScript
=
$SOBASE
/data/
$SO_RUNNUMBER
/moveDCStoLocalDB.sh
syncScript
=
$SOBASE
/data/
by_runnumber/
$SO_RUNNUMBER
/moveDCStoLocalDB.sh
touch
$syncScript
echo
"# Usage: "
>>
$syncScript
echo
"# bash moveDCStoLocalDB.sh idb_to_ldb.json"
>>
$syncScript
...
...
@@ -515,8 +517,13 @@ fi
echo
-e
"
\n
[ info ][so] Running the sequence of scans"
scan_list
=
$(
jq
-j
'.common_config.scan_list'
$SCANCFG
)
nScans
=
"
$(
jq
-j
--arg
b
$scan_list
'."\($b)" | length'
$SCANCFG
)
"
if
[
$nScans
==
0
]
;
then
echo
"[ error ][so] specified scan_list is empty! make sure that the spelling is correct"
echo
" in the cfg file
$SCANCFG
"
fi
nScans
=
"
$(
jq
-j
'.scan_list | length'
$SCANCFG
)
"
for
i
in
$(
seq
1
$nScans
)
;
do
if
[[
"
$dcsMonitor
"
==
"1"
]]
;
then
...
...
@@ -534,7 +541,7 @@ for i in $(seq 1 $nScans); do
fi
fi
obj
=
"
$(
jq
-j
--argjson
a
${
i
}
'.scan_list
[$a-1]'
$SCANCFG
)
"
obj
=
"
$(
jq
-j
--argjson
a
${
i
}
--arg
b
$scan_list
'."\($b)"
[$a-1]'
$SCANCFG
)
"
obj
=
"
$(
echo
-e
"
${
obj
}
"
|
tr
-d
'[:space:]'
)
"
comm
=
"
$SOBASE
/scanLauncher.sh -m
${
module_id
}
-s
$obj
${
dcsOpt
}
${
localdbOpt
}
${
qcOpt
}
${
syncOption
}
"
...
...
This diff is collapsed.
Click to expand it.
scanLauncher.sh
+
4
−
4
View file @
aaf1b24f
...
...
@@ -147,7 +147,7 @@ ctrlFile="$SOBASE/configs/rd53a/$module_id/controller.json"
cnctFile
=
"
$SOBASE
/configs/rd53a/
$module_id
/connectivity.json"
#ctrlFile="/home/mario/work/yr/configs/controller/emuCfg.json"
comm
=
"
$YARRBASE
/bin/scanConsole -r
$ctrlFile
-c
$cnctFile
-p -t
${
targetAmpOrCharge
}
${
targetToT
}
-s
${
scanPath
}
-m
$reset_masks
-o
$SOBASE
/data/
$SO_RUNNUMBER
$localdbOpt
$qcOpt
"
#> /dev/null 2>1
comm
=
"
$YARRBASE
/bin/scanConsole -r
$ctrlFile
-c
$cnctFile
-p -t
${
targetAmpOrCharge
}
${
targetToT
}
-s
${
scanPath
}
-m
$reset_masks
-o
$SOBASE
/data/
by_runnumber/
$SO_RUNNUMBER
$localdbOpt
$qcOpt
"
#> /dev/null 2>1
echo
"[ info ][sl] Calling Yarr's scanConsole"
echo
"[ info ][sl]
$comm
"
...
...
@@ -193,7 +193,7 @@ if [[ "$localdbOpt" != "" ]]; then
if
[
$dcsMonitor
==
1
]
&&
[
$syncDatabases
==
1
]
;
then
cmd
=
"
$YARRBASE
/bin/dbAccessor -F
$DBCOMCFG
-n
$module_id
-s
$SOBASE
/data/
$SO_RUNNUMBER
/
${
RunNumber
}
_
$scanName
/scanLog.json"
cmd
=
"
$YARRBASE
/bin/dbAccessor -F
$DBCOMCFG
-n
$module_id
-s
$SOBASE
/data/
by_runnumber/
$SO_RUNNUMBER
/
${
RunNumber
}
_
$scanName
/scanLog.json"
echo
"[ info ][sl] Pushing the DCS data to localDB"
echo
"[ info ][sl]
$cmd
"
$cmd
...
...
@@ -201,8 +201,8 @@ if [[ "$localdbOpt" != "" ]]; then
elif
!
[
$syncDatabases
==
1
]
;
then
cmd
=
"
$YARRBASE
/bin/dbAccessor -F
\$
1 -n
$module_id
-s
$SOBASE
/data/
$SO_RUNNUMBER
/
${
RunNumber
}
_
$scanName
/scanLog.json"
echo
"
$cmd
"
>>
$SOBASE
/data/
$SO_RUNNUMBER
/moveDCStoLocalDB.sh
cmd
=
"
$YARRBASE
/bin/dbAccessor -F
\$
1 -n
$module_id
-s
$SOBASE
/data/
by_runnumber/
$SO_RUNNUMBER
/
${
RunNumber
}
_
$scanName
/scanLog.json"
echo
"
$cmd
"
>>
$SOBASE
/data/
by_runnumber/
$SO_RUNNUMBER
/moveDCStoLocalDB.sh
fi
fi
...
...
This diff is collapsed.
Click to expand it.
Shusaku Arakuta
@sarakuta
mentioned in commit
cf0cbc83
·
2 years ago
mentioned in commit
cf0cbc83
mentioned in commit cf0cbc832e7490fbb6aa46d10231c1213325c9df
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment