KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVPROOFLiteBatch.cpp
1//Created by KVClassFactory on Thu Dec 15 14:55:48 2016
2//Author: John Frankland,,,
3
4#include "KVPROOFLiteBatch.h"
5
6#include <TProof.h>
7
9
10
11
12
14 : KVBatchSystem(name), max_num_cpus(WITH_MULTICORE_CPU)
15{
16}
17
18
19
20
23
25{
26 // Destructor
27}
28
29
30
34
36{
37 // Run analysis on PROOFLite facility
38
39 // Open PROOFLite session with required number of workers and initialise KaliVeda package
40 if (!gProof) {
41 TProof* p = TProof::Open(Form("workers=%d", max_num_cpus));
42 p->ClearCache();//to avoid problems with compilation of KVParticleCondition
43 // enable KaliVeda on PROOF cluster
44 if (p->EnablePackage("KaliVeda") != 0) {
45 // first time, need to 'upload' package
46 TString fullpath = KVBase::GetETCDIRFilePath("KaliVeda.par");
47 p->UploadPackage(fullpath);
48 p->EnablePackage("KaliVeda");
49 }
50 }
51#ifdef WITH_CPP11
53#else
55#endif
56 SetAnalyser(da);
57 da->SubmitTask();
58}
59
60
61
66
68{
69 // Add to batch parameters the number of CPUs to use
70 //
71 // By default, it is the number of CPUs on the machine
72
74 nl.SetValue("MaxNumCPUs", max_num_cpus);
75}
76
77
78
83
85{
86 // Add to batch parameters the number of CPUs to use
87 //
88 // By default, it is the number of CPUs on the machine
89
91 max_num_cpus = nl.GetIntValue("MaxNumCPUs");
92}
93
94
95
96
char Char_t
winID h TVirtualViewer3D TVirtualGLPainter p
R__EXTERN TProof * gProof
char * Form(const char *fmt,...)
static const Char_t * GetETCDIRFilePath(const Char_t *namefile="")
Definition KVBase.cpp:65
Base class for interface to a batch job management system.
virtual void SetAnalyser(KVDataAnalyser *da)
virtual void SetBatchSystemParameters(const KVNameValueList &)
Use the parameters in the list to set all relevant parameters for batch system.
virtual void GetBatchSystemParameterList(KVNameValueList &)
Manager class which sets up and runs data analysis tasks.
void SetProofMode(EProofMode e)
virtual void SubmitTask()
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
Int_t GetIntValue(const Char_t *name) const
void SetValue(const Char_t *name, value_type value)
Batch system interface to PROOFLite.
int max_num_cpus
max number of CPUs to use: by default, all available
virtual ~KVPROOFLiteBatch()
Destructor.
void SubmitTask(KVDataAnalyser *da)
void GetBatchSystemParameterList(KVNameValueList &)
void SetBatchSystemParameters(const KVNameValueList &)
ClassImp(TPyArg)