KaliVeda
1.14/2
Toolkit for HIC analysis
KVBatchSystemParametersGUI.cpp
1
//Created by KVClassFactory on Fri Feb 17 14:52:45 2017
2
//Author: John Frankland,,,
3
4
#include "KVBatchSystemParametersGUI.h"
5
6
ClassImp
(
KVBatchSystemParametersGUI
)
7
8
9
12
KVBatchSystemParametersGUI
::
KVBatchSystemParametersGUI
(const
TGWindow
*
main
,
KVNameValueList
* params,
KVDataAnalyser
* dan,
Bool_t
* cancel)
13
:
KVNameValueListGUI
(
main
, params, cancel), fAnalyser(dan)
14
{
15
// Default constructor
16
fJN = (
TGTextEntry
*)GetDataWidget(
"JobName"
);
17
fJNF = (
TGTextEntry
*)GetDataWidget(
"AutoJobNameFormat"
);
18
fJNF->SetToolTipText(dan->GetRecognisedAutoBatchNameKeywords());
19
fAJN = (
TGCheckButton
*)GetDataWidget(
"AutoJobName"
);
20
fAJN->Connect(
"Toggled(Bool_t)"
,
"KVBatchSystemParametersGUI"
,
this
,
"SetAutoBatchName(Bool_t)"
);
21
fJNF->Connect(
"TextChanged(const char*)"
,
"KVBatchSystemParametersGUI"
,
this
,
"UpdateAutoBatchName(const char*)"
);
22
SetAutoBatchName(fAJN->IsDown());
23
24
if
(GetList()->HasParameter(
"MultiJobsMode"
)) {
25
fMJ = (
TGCheckButton
*)GetDataWidget(
"MultiJobsMode"
);
26
fRPJ = (
TGNumberEntry
*)GetDataWidget(
"RunsPerJob"
);
27
fRPJ->SetLimits(
TGNumberFormat::kNELLimitMinMax
, 1, dan->GetNumberOfFilesToAnalyse());
28
if
(dan->GetNumberOfFilesToAnalyse() < 2) {
29
fRPJ->SetState(
kFALSE
);
30
fMJ->SetEnabled(
kFALSE
);
31
}
32
else
{
33
fMJ->SetEnabled(
kTRUE
);
34
fMJ->SetDown();
35
fRPJ->SetNumber(1);
36
fMJ->Connect(
"Toggled(Bool_t)"
,
"TGNumberEntry"
, fRPJ,
"SetState(Bool_t)"
);
37
fRPJ->SetState(fMJ->IsDown());
38
}
39
}
40
DisplayDialog();
41
}
42
43
44
45
48
49
KVBatchSystemParametersGUI::~KVBatchSystemParametersGUI
()
50
{
51
// Destructor
52
}
53
54
55
57
58
void
KVBatchSystemParametersGUI::UpdateAutoBatchName
(
const
char
* text)
59
{
60
fJN
->
SetText
(
fAnalyser
->
ExpandAutoBatchName
(
text
));
61
}
62
63
64
66
67
void
KVBatchSystemParametersGUI::SetAutoBatchName
(
Bool_t
on)
68
{
69
if
(
on
) {
70
fJN
->
SetEnabled
(
kFALSE
);
71
fJNF
->
SetEnabled
();
72
UpdateAutoBatchName
(
fJNF
->
GetText
());
73
}
74
else
{
75
fJN
->
SetEnabled
();
76
fJNF
->
SetEnabled
(
kFALSE
);
77
}
78
}
79
80
81
//____________________________________________________________________________//
82
83
Bool_t
bool Bool_t
kFALSE
constexpr Bool_t kFALSE
kTRUE
constexpr Bool_t kTRUE
on
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
text
Option_t Option_t TPoint TPoint const char text
KVBatchSystemParametersGUI
Utility GUI used for setting batch system parameters.
Definition:
KVBatchSystemParametersGUI.h:19
KVBatchSystemParametersGUI::~KVBatchSystemParametersGUI
virtual ~KVBatchSystemParametersGUI()
Destructor.
Definition:
KVBatchSystemParametersGUI.cpp:49
KVBatchSystemParametersGUI::fJNF
TGTextEntry * fJNF
job name format widget
Definition:
KVBatchSystemParametersGUI.h:23
KVBatchSystemParametersGUI::SetAutoBatchName
void SetAutoBatchName(Bool_t on)
Definition:
KVBatchSystemParametersGUI.cpp:67
KVBatchSystemParametersGUI::UpdateAutoBatchName
void UpdateAutoBatchName(const char *=0)
Definition:
KVBatchSystemParametersGUI.cpp:58
KVBatchSystemParametersGUI::fJN
TGTextEntry * fJN
job name widget
Definition:
KVBatchSystemParametersGUI.h:22
KVBatchSystemParametersGUI::fAnalyser
KVDataAnalyser * fAnalyser
Definition:
KVBatchSystemParametersGUI.h:20
KVDataAnalyser
Manager class which sets up and runs data analysis tasks.
Definition:
KVDataAnalyser.h:61
KVDataAnalyser::ExpandAutoBatchName
virtual TString ExpandAutoBatchName(const Char_t *format) const
Definition:
KVDataAnalyser.cpp:902
KVNameValueListGUI
GUI for setting KVNameValueList parameters.
Definition:
KVNameValueListGUI.h:55
KVNameValueList
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
Definition:
KVNameValueList.h:116
TGCheckButton
TGNumberEntry
TGNumberFormat::kNELLimitMinMax
kNELLimitMinMax
TGTextEntry
TGTextEntry::GetText
const char * GetText() const
TGTextEntry::SetEnabled
void SetEnabled(Bool_t flag=kTRUE)
TGTextEntry::SetText
virtual void SetText(const char *text, Bool_t emit=kTRUE)
TGWindow
main
int main(int argc, char **argv)
ClassImp
ClassImp(TPyArg)
kaliveda.doxygen
KVMultiDet
gui
KVBatchSystemParametersGUI.cpp
Generated on Fri Jan 17 2025 15:03:18 for KaliVeda by
1.9.1