// runs[runi]->plotSeedThresholdCalibrated();
// runs[runi]->plotSeedThreshold();
- runs[runi]->plotSeed();
+// runs[runi]->plotSeed();
// runs[runi]->plotSum();
// runs[runi]->plotVeto();
// runs[runi]->plotNoise();
if (!isBatch)
gROOT->SetBatch(kFALSE);
- runs[runi]->plotAllHistograms();
-// runs[runi]->plotAllHistogramsThresholdCluster();
+// runs[runi]->plotAllHistograms();
+ runs[runi]->plotAllHistogramsThresholdCluster();
runs[runi]->plotAllHistogramsThresholdClusterCalibrated();
- runs[runi]->plotAllHistogramsCalibrated();
- runs[runi]->writeAllHistogramsToFile();
+// runs[runi]->plotAllHistogramsCalibrated();
+// runs[runi]->writeAllHistogramsToFile();
}
}
}
/**
* @file MAPS.h
- * @brief Use brief, otherwise the index won't have a brief explanation.
+ * @brief Class to process the RAW data
*
- * Detailed explanation.
- *
+ * Fills the TTrees into a ROOT file *
*
*/
class MAPS {
* fPedestals[pixeli] = ( (Frames-1)*fPedestals[pixeli] + fCdsmatrix[pixeli] )/Frames;
* fNoise[pixeli]= ( (Frames-1)*fNoise[pixeli] + TMath::Power(1.*fCdsmatrix[pixeli]-fPedestals[pixeli],2) )/Frames;
* }
- *
* @endcode
* @param Frames inverse of the weight the current frame has on the overall pedestrial and noise value
* @see fNoise
* loops over all pixel, compares
*
* @code if( (float)(1.*fCdsmatrix[i]-fPedestals[i]) > (5.*fNoise[i]) )
+ * @endcode
*
* if true, saves pixel as seed pixel candidate, creates 5x5 cluster
* around it. If cluster has biggest value in the middle, then count it as a valid
Int_t* GetF1Frame() { return fF1matrix; }
Float_t* GetNoise() { return fNoise; }
- /// Output Directory, set and passed initMapsRun() to in the constructor
- TString fOutDir;///< Some documentation for first.
+ // Output Directory, set and passed initMapsRun() to in the constructor
+
+ /// Some documentation for first.
+ TString fOutDir;
Run* run;
/// Size of cluster. Don't change without code modification
/**
* @brief find the border between the noise and the signal in Sr90 runs
*
- * writes the found threshold into the private variable #posNoiseThreshold
+ * writes the found threshold into the private variable @c Run::posNoiseThreshold
*
* @param histogrampointer pointer to the histogram structure, threshold will be searched in seed spectra
* @return true if succesfull
void setPlotStyle(Int_t);
- /** @brief Plot all histograms from #histogram into one canvas */
+ /** @brief Plot all histograms from @c Run::histogram into one canvas */
Bool_t plotAllHistograms();
- /** @brief Plot all histograms from #histogram into one canvas */
+ /** @brief Plot all histograms from @c Run::histogram into one canvas */
Bool_t plotAllHistogramsCalibrated();
- /** @brief Plot all histograms from #histogramthreshold into one canvas */
+ /** @brief Plot all histograms from @c Run::histogramthreshold into one canvas */
Bool_t plotAllHistogramsThresholdCluster();
- /** @brief Plot all histograms from #histogramthreshold into one canvas */
+ /** @brief Plot all histograms from @c Run::histogramthreshold into one canvas */
Bool_t plotAllHistogramsThresholdClusterCalibrated();
/** @brief Writes a given histogram into a file */
Bool_t writeHistogramToFile(TH1F* onehistogram);
- /** @brief Writes all histogram of #histogramsctruct into a file */
+ /** @brief Writes all histogram of @c Run::histogramsctruct into a file */
Bool_t writeAllHistogramsToFile();
- /** @brief Makes a gnuplot file to plot the histogram data created in @c writeAllHistogramsToFile() */
+ /** @brief Makes a gnuplot file to plot the histogram data created in @c Run::writeAllHistogramsToFile() */
void MakeGnuplotFile();
/// is set to true if an error occured
TH1F* Seed;
/// Sum spectrum, the charge of whole cluster is summed up in binned into this TH1F histogram
TH1F* Sum;
- /// Veto spectrum, used to find better calibration peak, only entries where Sum over not seed pixels is below #vetothreshold are binned into this histogram
+ /// Veto spectrum, used to find better calibration peak, only entries where Sum over not seed pixels is below @c Run::vetothreshold are binned into this histogram
TH1F* Veto;
/// Noise histogram
TH1F* Noise;
+++ /dev/null
-#ifndef __RUN_ANALYZER__H
-#define __RUN_ANALYZER__H
-
-#include "Run.h"
-#include "MAPS.h"
-
-Int_t numberRuns=0;
-
-
-/**
- * @file Run_analyzer.h
- * @brief Analyze and plot MABS runs
- *
- * Detailed explanation.
- *
- *
- */
-// class Run_analyzer {
-
-// private:
-//
-// public:
-//
-// };
-
-#endif
\ No newline at end of file
# If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used.
-OUTPUT_DIRECTORY =
+OUTPUT_DIRECTORY = "/home/blinnik/mabs_web2/documentation/"
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
# 4096 sub-directories (in 2 levels) under the output directory of each output
Local $answer = MsgBox(4, "Run script?", "Preparing to do all runs with " & @CRLF & _
"Radioactive source: " & $radSource & @CRLF & _
"Chip: " & $chipversion & " (#" & $chipinstalled & ")" & @CRLF & _
- "Radiated: " & $radiated & @CRLF & _
"If you run this script, daq.exe will be closed and the current run aborted, proceed?")
;~ "of file " & $FileName & " with " & @CRLF & _
Return $currenttemp / 100.0
EndFunc
+Func GetTemperature($whichone)
+ $currenttemp = 100000;
+ If StringInStr(@ScriptDir, "\Functions") Then
+ $currenttemp = RunWait(@AutoItExe & ' /AutoIt3ExecuteScript "' & @ScriptDir & '\TemperatureControl.au3" "' & $whichone & '"', @ScriptDir)
+ Else
+ $currenttemp = RunWait(@AutoItExe & ' /AutoIt3ExecuteScript "' & @ScriptDir & '\Functions\TemperatureControl.au3" "' & $whichone & '"', @ScriptDir)
+ EndIf
+ Return $currenttemp / 100.0
+EndFunc
+
Func RefreshGUISendNtfct( $msg )
Run(@AutoItExe & ' /AutoIt3ExecuteScript "' & @ScriptDir & '\Functions\SendNtfctn.au3" "' & $system & '" "' & $msg & '"', @ScriptDir)
$completelog &= _NowCalc() & " " & $msg & @CRLF
#include "mysql_functions.au3"
$objErr = ObjEvent("AutoIt.Error","MyErrFunc")
-$programversion = "1.0"
+$programversion = "1.1"
$excelLineBegin = "1100" ; Change this to the range of cells you want to be processed
$excelLineEnd = "4000"
Global $completelog = ""
$chipversion = IniRead($configfile, "experimental setup", "ChipVersion", "Mi34") ; current chip generation in the system
$chipinstalled = IniRead($configfile, "experimental setup", "ChipInstalled", "5") ; chip number currently mounted into the system
$radSource = IniRead($configfile, "experimental setup", "RadSource", "none") ; current radioactive source of the system
-$radiated = IniRead($configfile, "experimental setup", "Radiated", "") ; radiated chip
Func MyErrFunc()
$error = 1
If $CmdLine[0] > 1 Then
- If $CmdLine[1] == "USB" Then
- SendNtfctn($CmdLine[2], "USB")
- $error = 0
- ElseIf $CmdLine[1] == "PXI" Then
- SendNtfctn($CmdLine[2], "PXI")
- $error = 0
- EndIf
+ SendNtfctn($CmdLine[2], $CmdLine[1])
+;~ If $CmdLine[1] == "USB" Then
+;~ SendNtfctn($CmdLine[2], "USB")
+;~ $error = 0
+;~ ElseIf $CmdLine[1] == "PXI" Then
+;~ SendNtfctn($CmdLine[2], "PXI")
+;~ $error = 0
+;~ ElseIf $CmdLine[1] == "Pegasus" Then
+;~ SendNtfctn($CmdLine[2], "Pegasus")
+;~ $error = 0
+;~ EndIf
EndIf
ConsoleWrite($error)
;.Open("GET", "http://cerberus.x-matter.uni-frankfurt.de:8700/tools/cooling/cooling.pl?/dev/USBCooling")
.Open("GET", "http://cerberus.x-matter.uni-frankfurt.de:8700/tools/cooling/cooling.pl?/dev/PXICooling")
Case "PXI"
- .Open("GET", "http://cerberus.x-matter.uni-frankfurt.de:8700/tools/cooling/cooling.pl?/dev/PXICooling")
+ .Open("GET", "http://cerberus.x-matter.uni-frankfurt.de:8700/tools/cooling/cooling.pl?/dev/PXICooling") ; PXI cooling means big HUMBER cooling system
+ Case "Pegasus"
+ .Open("GET", "http://cerberus.x-matter.uni-frankfurt.de:8700/tools/cooling/cooling.pl?/dev/USBCooling") ; USB cooling means small HUMBER cooling system
EndSwitch
.Send()
$HTMLSource = .Responsetext
$curtemperaturmatch = StringRegExp ( $HTMLSource, "Sensor USB-System => (-)?[0-9]+\.[0-9]+", 2)
Case "PXI"
$curtemperaturmatch = StringRegExp ( $HTMLSource, "Sensor PXI-System => (-)?[0-9]+\.[0-9]+", 2)
+ Case "Pegasus"
+ $curtemperaturmatch = StringRegExp ( $HTMLSource, "Sensor PXI-System => (-)?[0-9]+\.[0-9]+", 2)
EndSwitch
If IsArray($curtemperaturmatch) Then
If $curtemperaturmatch[0] <> "" Then
.Open("GET", "http://cerberus.x-matter.uni-frankfurt.de:8700/tools/cooling/cooling.pl?/dev/PXICooling&" & $command)
Case "PXI"
.Open("GET", "http://cerberus.x-matter.uni-frankfurt.de:8700/tools/cooling/cooling.pl?/dev/PXICooling&" & $command)
+ Case "Pegasus"
+ .Open("GET", "http://cerberus.x-matter.uni-frankfurt.de:8700/tools/cooling/cooling.pl?/dev/USBCooling&" & $command)
EndSwitch
.Send()
$HTMLSource = .Responsetext
$tempcorrent = True
Else
;If $tempwaiti > 5 Then ; after 30 minutes give up waiting
- If $tempwaiti > 1 Then ; Dennis changed to 5 Minutes to accelerate noise-T-scan
+ If $tempwaiti > 0 Then ; Dennis changed to 5 Minutes to accelerate noise-T-scan
$currenttempchip = GetTemperatureForSure("Chip" & $system)
RefreshGUISendNtfct("Cooling could not reach needed temperature of " & $TempCooling & " °C within 30 minutes. Current cooling temperature is " & $currenttemp & ", chip temperature is " & $currenttempchip & ". Will proceed anyway.")
$tempcorrent = True
Run(@AutoItExe & ' /AutoIt3ExecuteScript "' & @ScriptDir & '\Functions\RefreshGUI.au3" "' & $percentoverall & '" "' & $percentCurrent & '"')
Run(@AutoItExe & ' /AutoIt3ExecuteScript "' & @ScriptDir & '\Functions\RefreshGUI.au3" "' & $completelog & '"')
If Not Mod($i, 30) Then
+ $currenttempchip = GetTemperature("Chip" & $system)
Run(@AutoItExe & ' /AutoIt3ExecuteScript "' & @ScriptDir & '\Functions\WriteTemperatureLog.au3" "' & $savedir & '\' & $runnumber & '\temperature.log" "' & $system & '"', @ScriptDir)
- Run(@AutoItExe & ' /AutoIt3ExecuteScript "' & @ScriptDir & '\Functions\SendNtfctn.au3" "' & $system & '" "Percent done: ' & $percentoverall & ' (' & $totalrealruns & '/' & $totalruns & ')"', @ScriptDir)
+ Run(@AutoItExe & ' /AutoIt3ExecuteScript "' & @ScriptDir & '\Functions\SendNtfctn.au3" "' & $system & '" "Percent done: ' & $percentoverall & ' (' & $totalrealruns & '/' & $totalruns & ') TempChip: ' & $currenttempchip & '"', @ScriptDir)
EndIf
Sleep(10000)
- If ($oldcounter == GetCounter()) Then
+ If ($oldcounter + 100 > GetCounter()) Then
Sleep(10000)
- If ($oldcounter == GetCounter()) Then
+ If ($oldcounter + 100 > GetCounter()) Then
StopRun()
Run(@AutoItExe & ' /AutoIt3ExecuteScript "' & @ScriptDir & '\Functions\SendNtfctn.au3" "' & $system & '" "Skipped run ' & $runnumber & ', event counter froze."', @ScriptDir)
Run(@AutoItExe & ' /AutoIt3ExecuteLine "MsgBox(48, ''Warning'', ''Skipped run ' & $runnumber & ', event counter froze.'')"')
#ce ----------------------------------------------------------------------------
#include "mysql_header.au3"
;~ $objErr = ObjEvent("AutoIt.Error","MyErrFunc2")
-
-Global $sql= GetSQLConnection()
+; Local $skippedruns[1]
+;~ Global $sql= GetSQLConnection()
;~ MsgBox(0,"",$sql)
+;~ $objTest=ObjCreate("ADODB.Connection")
+;~ MsgBox(0,"",$objTest)
-;$num = ReturnNumSuitRuns("34", 6, 0, "Fe55", "PXI")
+;~ $num = ReturnNumSuitRuns("Pegasus", 8, "none", "Pegasus")
; ReturnSuitRun("34", 6, 0, "Fe55", "PXI")
;~ MsgBox(0,"",$num)
;~ $var= ReturnSuitRun("34", 3, 3, "Fe55", "USB")
"MABS_comment='" & $comment & "' " & _
"WHERE id=" & $id
+
ConsoleWrite($sqlstring)
_Query($sql, $sqlstring)
_MySQLEnd($sql)
EndFunc
-Func ReturnNumSuitRuns($ChipGen, $ChipNum, $ChipRadiation, $RadiationSource, $System, $Clock=0)
+Func ReturnNumSuitRuns($ChipGen, $ChipNum, $RadiationSource, $System, $Clock=0)
$sql = GetSQLConnection()
- $ChipGen = StringReplace($ChipGen, "Mi", "", 1, 0)
$sqlstring = "ChipGen='" & $ChipGen & "' AND " & _
"ChipNum='" & $ChipNum & "' AND " & _
"RadiationSource='" & $RadiationSource & "' AND " & _
"System='" & $System & "' AND " & _
- "MABS_comment IS NULL AND " & _
"(datetime='1970-01-01 00:00:00' OR datetime IS NULL OR datetime='0000-00-00 00:00:00')"
If $clock <> 0 Then $sqlstring = $sqlstring & " AND Clock=" & $Clock
$number = _CountDifferentRecords($sql, "labbook", "id", $sqlstring)
_MySQLEnd($sql)
+ ConsoleWrite($sqlstring & @CRLF)
ConsoleWrite("ReturnNumSuitRuns: " & $number & @CRLF)
Return $number
; "'ChipRadiation Ion'=" & $ChipRadiation & " AND " & _
EndFunc
+Func ReturnSuitRuns($ChipGen, $ChipNum, $RadiationSource, $System, $Clock=0)
+ $sql = GetSQLConnection()
+ $runnumberLoop=0
+ Local $runnumberArray[2]
+ Do
+ $sqlstring = "SELECT id, runnumber FROM labbook WHERE "
+ $sqlstring = $sqlstring & "ChipGen='" & $ChipGen & "' AND "
+ $sqlstring = $sqlstring & "ChipNum='" & $ChipNum & "' AND "
+ $sqlstring = $sqlstring & "RadiationSource='" & $RadiationSource & "' AND "
+ ;$sqlstring = $sqlstring & "'ChipRadiation Ion'=" & $ChipRadiation & " AND "
+ $sqlstring = $sqlstring & "System='" & $System & "' AND "
+ $sqlstring = $sqlstring & "MABS_comment IS NULL AND "
+ $sqlstring = $sqlstring & "(datetime='1970-01-01 00:00:00' OR datetime IS NULL OR datetime='0000-00-00 00:00:00')"
+ ;ConsoleWrite($sqlstring & @CRLF)
+ ;ConsoleWrite("ReturnNumSuitRuns: " & $number & @CRLF)
+ $runcandidates = _Query($sql, $sqlstring)
+
+ Local $runparam
+ If NOT $runcandidates.EOF Then
+ With $runcandidates
+ $runparam = .Fields("runnumber").value
+
+ EndWith
+ EndIf
+ Local $answer2 = MsgBox(4, "Total runnumberss", "Suitable runs found at the momentsss: " & $runparam)
+ $runnumberLoop=$runnumberLoop+1
+ Until $runnumberLoop=$totalruns
+
+
+ _MySQLEnd($sql)
+ Return
+; "'ChipRadiation Ion'=" & $ChipRadiation & " AND " & _
+EndFunc
-Func ReturnSuitRun($ChipGen, $ChipNum, $ChipRadiation, $RadiationSource, $System, $Clock=0)
+Func ReturnSuitRun($ChipGen, $ChipNum, $RadiationSource, $System, $Clock=0)
$sql = GetSQLConnection()
- $ChipGen = StringReplace($ChipGen, "Mi", "", 1, 0)
$sqlstring = "SELECT id, TempCooling, TempWaitFor, Clock, runnumber, CAST(Matrix AS CHAR), Events FROM labbook WHERE "
$sqlstring = $sqlstring & "ChipGen='" & $ChipGen & "' AND "
$sqlstring = $sqlstring & "ChipNum='" & $ChipNum & "' AND "
#include <ButtonConstants.au3>
+#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include "../Functions/BinaryIntegerConvert.au3"
-Global $programversion = "1.0"
+Global $programversion = "1.1"
Global $computernameUSB = "JSPC12"
Global $computernamePXI = "PXI"
+Global $computernamePegasus = "SBGAT111"
#include "About.au3"
-#Region ### START Koda GUI section ### Form=f:\eigene dateien\downloads\dropbox\new\gui\mab.kxf
-$Form1_1 = GUICreate("MABS (Mimosa Automation Bot System)", 477, 448, 275, 173)
+#Region ### START Koda GUI section ### Form=c:\users\nantero\desktop\bot\gui\mab.kxf
+$Form1_1 = GUICreate("MABS (Mimosa Automation Bot System)", 478, 400, 407, 127)
$ProgressPercent1 = GUICtrlCreateLabel("0", -40, -40, 21, 17)
$ProgressPercent2 = GUICtrlCreateLabel("0", -40, -40, 21, 17)
-$LogEdit = GUICtrlCreateEdit("", 155, 74, 316, 343, BitOR($GUI_SS_DEFAULT_EDIT,$ES_READONLY))
-$lblTmpCooling = GUICtrlCreateLabel("-", 12, 202, 38, 17, $SS_RIGHT)
-$lblTmpChip = GUICtrlCreateLabel("-", 84, 202, 38, 17, $SS_RIGHT)
+$LogEdit = GUICtrlCreateEdit("", 155, 26, 316, 343, BitOR($GUI_SS_DEFAULT_EDIT,$ES_READONLY))
+GUICtrlSetData(-1, "")
+$lblTmpCooling = GUICtrlCreateLabel("-", 12, 154, 38, 17, $SS_RIGHT)
+$lblTmpChip = GUICtrlCreateLabel("-", 84, 154, 38, 17, $SS_RIGHT)
$MenuItem1 = GUICtrlCreateMenu("&File")
$MenuItem2 = GUICtrlCreateMenuItem("&Save"&@TAB&"Ctrl+S", $MenuItem1)
$MenuItem3 = GUICtrlCreateMenuItem("&Load"&@TAB&"Ctrl+L", $MenuItem1)
$MenuItem4 = GUICtrlCreateMenuItem("E&xit", $MenuItem1)
$MenuItem5 = GUICtrlCreateMenu("&Help")
$MenuItem6 = GUICtrlCreateMenuItem("About", $MenuItem5)
-GUISetIcon("Rokey-The-Last-Order-Plus-Chip.ico", -1)
-$Label1 = GUICtrlCreateLabel("Mimosa Chip", 11, 55, 64, 17)
-$ChipCombo = GUICtrlCreateCombo("", 11, 74, 89, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
-GUICtrlSetData(-1, "Mi32|Mi32Ter|Mi34", "Mi34")
-$ChipNumInput = GUICtrlCreateInput("1", 107, 74, 41, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
-$Label2 = GUICtrlCreateLabel("Number", 107, 55, 41, 17)
-$Label3 = GUICtrlCreateLabel("Temperature", 11, 164, 64, 17)
-$Label11 = GUICtrlCreateLabel("Cooling", 16, 184, 39, 17)
-$Label4 = GUICtrlCreateLabel("° C", 56, 202, 18, 17)
-$Label12 = GUICtrlCreateLabel("Chip", 96, 184, 25, 17)
-$Label14 = GUICtrlCreateLabel("° C", 128, 202, 18, 17)
-$Label5 = GUICtrlCreateLabel("Rad source", 95, 110, 59, 17)
-$RadInput = GUICtrlCreateInput("none", 97, 129, 51, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_RIGHT))
-$Label10 = GUICtrlCreateLabel("Chip Radiation", 11, 110, 74, 17)
-$RadiatedInput = GUICtrlCreateInput("", 11, 129, 76, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_RIGHT))
-$Start = GUICtrlCreateButton("Start", 10, 350, 135, 30)
-$NotifyCustom = GUICtrlCreateInput("(Optional)", 11, 315, 136, 21)
-GUICtrlSetColor(-1, 0xC0C0C0)
-$Label6 = GUICtrlCreateLabel("E-Mail or mobile phone:", 11, 294, 114, 17)
-$Progress1 = GUICtrlCreateProgress(10, 387, 135, 16, $PBS_SMOOTH)
+$Label1 = GUICtrlCreateLabel("Mimosa Chip", 11, 7, 64, 17)
+$ChipCombo = GUICtrlCreateCombo("", 11, 26, 89, 25)
+GUICtrlSetData(-1, "Mi32|Mi32Ter|Mi34|Pegasus")
+$ChipNumInput = GUICtrlCreateInput("1", 107, 26, 41, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
+$Label2 = GUICtrlCreateLabel("Number", 107, 7, 41, 17)
+$Label3 = GUICtrlCreateLabel("Temperature", 11, 116, 64, 17)
+$Label11 = GUICtrlCreateLabel("Cooling", 16, 136, 39, 17)
+$Label4 = GUICtrlCreateLabel("° C", 56, 154, 18, 17)
+$Label12 = GUICtrlCreateLabel("Chip", 96, 136, 25, 17)
+$Label14 = GUICtrlCreateLabel("° C", 128, 154, 18, 17)
+$Label5 = GUICtrlCreateLabel("Rad source", 15, 62, 59, 17)
+$RadInput = GUICtrlCreateInput("none", 17, 81, 51, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_RIGHT))
+$Start = GUICtrlCreateButton("Start", 10, 302, 135, 30)
+$NotifyCustom = GUICtrlCreateInput("(Optional)", 11, 267, 136, 21)
+GUICtrlSetColor(-1, 0x000000)
+$Label6 = GUICtrlCreateLabel("E-Mail or mobile phone:", 11, 246, 114, 17)
+$Progress1 = GUICtrlCreateProgress(10, 339, 135, 16, $PBS_SMOOTH)
GUICtrlSetColor(-1, 0x000080)
-$Progress2 = GUICtrlCreateProgress(10, 406, 135, 10, $PBS_SMOOTH)
+$Progress2 = GUICtrlCreateProgress(10, 358, 135, 10, $PBS_SMOOTH)
GUICtrlSetColor(-1, 0x000080)
-$Label7 = GUICtrlCreateLabel("Log", 160, 54, 22, 17)
-$CheckboxBenny = GUICtrlCreateCheckbox("Benny", 11, 253, 52, 17)
+$Label7 = GUICtrlCreateLabel("Log", 160, 6, 22, 17)
+$CheckboxBenny = GUICtrlCreateCheckbox("Benny", 11, 205, 52, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
-$Label8 = GUICtrlCreateLabel("Notify:", 11, 236, 34, 17)
-$CheckboxDennis = GUICtrlCreateCheckbox("Dennis", 81, 253, 52, 17)
-$CheckboxStefan = GUICtrlCreateCheckbox("Stefan", 11, 273, 52, 17)
-$ExcelPath = GUICtrlCreateInput("", 11, 27, 311, 21)
-$Label9 = GUICtrlCreateLabel("Lab book as an Excel file", 11, 9, 123, 17)
-$LoadExcel = GUICtrlCreateButton("Load file", 325, 25, 65, 25)
-$ExcelOpen = GUICtrlCreateButton("Open in Excel", 395, 25, 75, 25)
-Dim $Form1_1_AccelTable[2][2] = [["^s", $MenuItem2],["^l", $MenuItem3]]
-GUISetAccelerators($Form1_1_AccelTable)
+$Label8 = GUICtrlCreateLabel("Notify:", 11, 188, 34, 17)
+$CheckboxDennis = GUICtrlCreateCheckbox("Dennis", 81, 205, 52, 17)
+$CheckboxStefan = GUICtrlCreateCheckbox("Your name here", 11, 225, 124, 17)
+GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$hNotifyCustom = ControlGetHandle ($Form1_1, "", $NotifyCustom)
-
-$hExcelPath = ControlGetHandle ($Form1_1, "", $ExcelPath)
Global $Checkboxes[3] = [ $CheckboxStefan, $CheckboxDennis, $CheckboxBenny]
AutoItSetOption("TrayIconHide", 1)
GUISetState(@SW_SHOW)
If @ComputerName == $computernamePXI Then
$system = "PXI"
+ElseIf @ComputerName == $computernamePegasus Then
+ $system = "Pegasus"
Else
$system = "USB"
EndIf
Case $MenuItem3
Local $file = FileOpenDialog ( "Select a configuration to load", "../", "Configurations (*.ini)" , "" , "config_" & $system & ".ini")
If ($file) Then Loadini($file)
- Case $LoadExcel
- Local $file = FileOpenDialog ( "Select a loab book to work on", "../", "Excel file (*.xls;*.xlsx)")
- ControlSetText($Form1_1, "", $hExcelPath, $file)
- Case $ExcelOpen
- $file = GUICtrlRead($ExcelPath)
- If ($file) Then
- ShellExecute ( $file )
- EndIf
EndSwitch
if ( ControlGetHandle ($Form1_1,"",ControlGetFocus($Form1_1)) == $hNotifyCustom) Then
If ( ControlGetText ($Form1_1, "", $hNotifyCustom) == "(Optional)") Then
FileDelete($file)
Local $config = "ChipVersion = " & GUICtrlRead ($ChipCombo) & @LF & _
"ChipInstalled = " & GUICtrlRead ($ChipNumInput) & @LF & _
- "ExcelPath = " & GUICtrlRead ($ExcelPath) & @LF & _
- "RadSource = " & GUICtrlRead($RadInput) & @LF & _
- "Radiated = " & GUICtrlRead($RadiatedInput) & @LF
+ "RadSource = " & GUICtrlRead($RadInput) & @LF
If ( NOT IniWriteSection ( $file, "experimental setup", $config )) Then
MsgBox(16, "Saving configuration", "Could not save to file " & @CRLF & $file)
Return 1
;~ ControlSetText($Form1_1, "", $TempInput, $ReadinArray[4][1])
;~ ControlSetText($Form1_1, "", $RadInput, $ReadinArray[5][1])
;~ EndIf
- ControlSetText($Form1_1, "", $ExcelPath, IniRead ( $file, "experimental setup", "ExcelPath", "H:\dennis doering\Arbeitsprogramme\Mimosa34\LaborbuchMi34 - Neu.xls")); current chip generation in the system$PathExcel
ControlSetText($Form1_1, "", $ChipCombo, IniRead ( $file, "experimental setup", "ChipVersion", "Mi34")); current chip generation in the system
ControlSetText($Form1_1, "", $ChipNumInput, IniRead($file, "experimental setup", "ChipInstalled", "5")); chip number currently mounted into the system
; ControlSetText($Form1_1, "", $TempInput, IniRead($file, "experimental setup", "SystemTemperature", "20")) ; current temperatur of the system
ControlSetText($Form1_1, "", $RadInput, IniRead($file, "experimental setup", "RadSource", "none")) ; current radioactive source of the system
- ControlSetText($Form1_1, "", $RadiatedInput, IniRead($file, "experimental setup", "Radiated", "")) ; current radioactive source of the system
ControlSetText($Form1_1, "", $notifycustom, IniRead ( $file, "various", "NotifyCustom", "(Optional)")); current chip generation in the system$PathExcel
$notify = IniRead ( $file, "various", "Notify", "1")
$notify = _StringReverse(Integer2Binary(BitXOR($notify, 7))*4 + Integer2Binary ($notify)) ; 100 must be represented as 144 because of autoit convention. 4 means off for the checkboxes.
If (Not @error) Then ; Check again if everything went well
- $totalruns = ReturnNumSuitRuns($chipversion, $chipinstalled, $radiated, $radSource, "PXI", "100")
+ $totalruns = ReturnNumSuitRuns($chipversion, $chipinstalled, $radSource, "PXI", "100")
If $totalruns > 0 Then ; Check if we retrieved any data
Local $answer = MsgBox(4, "Total runs", "Number of suitable runs found at the moment: " & $totalruns)
If $answer = 7 Then
$estimate = 0
$totalrealruns = 0
$starttimetotal = _NowCalc()
- $suitrun = ReturnSuitRun($chipversion, $chipinstalled, $radiated, $radSource, "PXI", "100")
+ $suitrun = ReturnSuitRun($chipversion, $chipinstalled, $radSource, "PXI", "100")
While Not $suitrun[0] = "" ; Do runs, until no new run found
#include "Functions\ReadAndSaveSQLParameters.au3"
#include "Functions\WaitForTemperature.au3"
$totalrealruns = $totalrealruns + 1
$completelog &= _NowCalc() & " Completed run " & $runnumber & ", " & $percentoverall & "% (" & $totalrealruns & "/" & $totalruns & ")" & @CRLF
Run(@AutoItExe & ' /AutoIt3ExecuteScript "' & @ScriptDir & '\Functions\RefreshGUI.au3" "' & $completelog & '"')
- $suitrun = ReturnSuitRun($chipversion, $chipinstalled, $radiated, $radSource, "PXI", "100")
+ $suitrun = ReturnSuitRun($chipversion, $chipinstalled, $radSource, "PXI", "100")
WEnd
#include "Functions\PrintSucessMessage.au3"
Else
If (Not @error) Then ; Check again if everything went well
- $totalruns = ReturnNumSuitRuns($chipversion, $chipinstalled, $radiated, $radSource, "USB")
+ $totalruns = ReturnNumSuitRuns($chipversion, $chipinstalled, $radSource, "USB")
If $totalruns > 0 Then ; Check if we retrieved any data
Local $answer = MsgBox(4, "Total runs", "Number of suitable runs found at the moment: " & $totalruns)
If $answer = 7 Then
$hTab = ControlGetHandle($hWnd, "", "TPageControl1")
$hCounter = ControlGetHandle($hWnd, "", "TEdit25")
$starttimetotal = _NowCalc()
- $suitrun = ReturnSuitRun($chipversion, $chipinstalled, $radiated, $radSource, "USB")
+ $suitrun = ReturnSuitRun($chipversion, $chipinstalled, $radSource, "USB")
While Not $suitrun[0] = "" ; Do runs, until no new run found
#include "Functions\ReadAndSaveSQLParameters.au3"
#include "Functions\WaitForTemperature.au3"
$totalrealruns = $totalrealruns + 1
$completelog &= _NowCalc() & " Completed run " & $runnumber & ", " & $percentoverall & "% (" & $totalrealruns & "/" & $totalruns & ")" & @CRLF
Run(@AutoItExe & ' /AutoIt3ExecuteScript "' & @ScriptDir & '\Functions\RefreshGUI.au3" "' & $completelog & '"')
- $suitrun = ReturnSuitRun($chipversion, $chipinstalled, $radiated, $radSource, "USB")
+ $suitrun = ReturnSuitRun($chipversion, $chipinstalled, $radSource, "USB")
ConsoleWrite($suitrun[0])
WEnd
ControlCommand("I2C control Software for Mimosa32", "", "[TEXT:Intern]", "Check")