KaliVeda  1.12/06
Heavy-Ion Analysis Toolkit
KVBatchSystemParametersGUI.cpp
Go to the documentation of this file.
1 //Created by KVClassFactory on Fri Feb 17 14:52:45 2017
2 //Author: John Frankland,,,
3 
5 
7 
8 
9 
13  : KVNameValueListGUI(main, params, cancel, kFALSE), fAnalyser(dan)
14 {
15  // Default constructor
16  fJN = (TGTextEntry*)GetDataWidget(GetList()->GetNameIndex("JobName"));
17  fJNF = (TGTextEntry*)GetDataWidget(GetList()->GetNameIndex("AutoJobNameFormat"));
18  fJNF->SetToolTipText(dan->GetRecognisedAutoBatchNameKeywords());
19  fAJN = (TGCheckButton*)GetDataWidget(GetList()->GetNameIndex("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(GetList()->GetNameIndex("MultiJobsMode"));
26  fRPJ = (TGNumberEntry*)GetDataWidget(GetList()->GetNameIndex("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  gClient->WaitFor(GetMain());
41 }
42 
43 
44 
45 
48 
50 {
51  // Destructor
52 }
53 
54 
55 
57 
59 {
61 }
62 
63 
64 
66 
68 {
69  if (on) {
71  fJNF->SetEnabled();
73  }
74  else {
75  fJN->SetEnabled();
77  }
78 }
79 
80 
81 //____________________________________________________________________________//
82 
83 
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
const Bool_t kFALSE
bool Bool_t
const Bool_t kTRUE
#define gClient
Utility GUI used for setting batch system parameters.
virtual ~KVBatchSystemParametersGUI()
Destructor.
TGTextEntry * fJNF
job name format widget
TGTextEntry * fJN
job name widget
Manager class which sets up and runs data analysis tasks.
virtual TString ExpandAutoBatchName(const Char_t *format) const
GUI for setting KVNameValueList parameters.
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
const char * GetText() const
void SetEnabled(Bool_t flag=kTRUE)
virtual void SetText(const char *text, Bool_t emit=kTRUE)
TText * text
int main(int argc, char **argv)