# DIM_CONTROL: resume data taking after it had to be aborted during first run of four
.! echo `date -u` "----------------------------------------------------------------" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log
.! echo `date -u`  "resume taking the 4 data runs after DataTaking was aborted..." >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log
.! echo `date -u` "----------------------------------------------------------------" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log
.! echo `date -u` "Operator: make sure bias is switched on and feedback is running!!!" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log

# check if bias is ramped up and if feedback is running
.s BIAS_CONTROL 9
.s FEEDBACK 12
.s BIAS_CONTROL 9
.! echo `date -u`  "bias is on, and feedback-program is working, but we wait 45sec for the current readings..." >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log
.w 45000
.! echo `date -u`  "... done" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log

#Data Taking with Full Trigger Area (4x5min)
.x ScriptsForDimCtrl/IsReadyForDataTaking
.! echo `date -u`  "taking Data:FullTriggerArea 5min Run 1 ..." >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log
MCP/START 300 -1 data
.s FAD_CONTROL 8
.s FAD_CONTROL 4
.! echo `date -u`  "... done" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log

.x ScriptsForDimCtrl/IsReadyForDataTaking
.! echo `date -u`  "taking Data:FullTriggerArea 5min Run 2 ..." >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log
MCP/START 300 -1 data
.s FAD_CONTROL 8
.s FAD_CONTROL 4
.! echo `date -u`  "... done" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log

.x ScriptsForDimCtrl/IsReadyForDataTaking
.! echo `date -u`  "taking Data:FullTriggerArea 5min Run 3 ..." >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log
MCP/START 300 -1 data
.s FAD_CONTROL 8
.s FAD_CONTROL 4
.! echo `date -u`  "... done" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log

.x ScriptsForDimCtrl/IsReadyForDataTaking
.! echo `date -u`  "taking Data:FullTriggerArea 5min Run 4 ..." >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log
MCP/START 300 -1 data
.s FAD_CONTROL 8
.s FAD_CONTROL 4
.! echo `date -u`  "... done" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log

.! echo `date -u` "----------------------------------------------------" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log
.! echo `date -u` "This is the end of data taking" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log
.! echo `date -u` "----------------------------------------------------" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log

