Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
// $Id: JobConfig.h,v 1.7 2012/01/31 15:08:34 jeremy Exp $
#ifndef JOBCONFIG_H
#define JOBCONFIG_H 1
// stl
#include <string>
#include <vector>
// slicPandora
#include "LcioInputCollectionSettings.h"
/**
* JobConfig contains the parameters for running Pandora jobs using the JobManager.
*/
class JobConfig
{
public:
// List of input files.
typedef std::vector<std::string> FileList;
// List of calorimeter types.
typedef std::vector<std::string> CalorimeterTypes;
JobConfig()
: nrun(-1),
nskip(0),
m_useDefaultCaloTypes(true),
m_deleteExistingCollections(false)
{;}
virtual ~JobConfig()
{;}
/**
* Set the Pandora settings XML file path.
*/
void setPandoraSettingsXmlFle(const char* pandoraSettingsXmlFile)
{
this->pandoraSettingsXmlFile = std::string(pandoraSettingsXmlFile);
}
/**
* Set the Pandora settings XML file path.
*/
void setPandoraSettingsXmlFile(std::string pandoraSettingsXmlFile)
{
this->pandoraSettingsXmlFile = pandoraSettingsXmlFile;
}
/**
* Get the Pandora settings XML file path.
*/
const std::string& getPandoraSettingsXmlFile() const
{
return pandoraSettingsXmlFile;
}
/**
* Set the path to the input Pandora geometry file generated by GeomConverter.
*/
void setGeometryFile(const char* geometryFile)
{
this->geometryFile = std::string(geometryFile);
}
/**
* Set the path to the input Pandora geometry file generated by GeomConverter.
*/
void setGeometryFile(std::string geometryFile)
{
this-> geometryFile = geometryFile;
}
/**
* Get the path to the geometry file.
*/
const std::string& getGeometryFile() const
{
return geometryFile;
}
/**
* Add an input LCIO file.
*/
void addInputFile(const char* filename)
{
inputLcioFiles.push_back(std::string(filename));
}
/**
* Add an input LCIO file.
*/
void addInputFile(std::string filename)
{
inputLcioFiles.push_back(filename);
}
/**
* Get the list of input files.
*/
const FileList& getInputFiles() const
{
return inputLcioFiles;
}
/**
* Set the LCIO output file path.
*/
void setOutputFile(const char* outputFile)
{
this->outputFile = std::string(outputFile);
}
/**
* Set the LCIO output file path.
*/
void setOutputFile(std::string outputFile)
{
this->outputFile = outputFile;
}
/**
* Get the LCIO output file path.
*/
const std::string& getOutputFile() const
{
return outputFile;
}
/**
* Set the maximum number of events to process.
*/
void setNumberOfEvents(int nrun)
{
this->nrun = nrun;
}
/**
* Get the maximum number of events to process.
*/
const int getNumberOfEvents() const
{
return nrun;
}
/**
* Set the number of events to skip.
*/
void setSkipEvents(int nskip)
{
this->nskip = nskip;
}
/**
* Get the number of events to skip.
*/
const int getSkipEvents() const
{
return nskip;
}
/**
* Get a list of calorimeter types.
*/
const CalorimeterTypes& getCalorimeterTypes() const
{
return calTypes;
}
/**
* Add a CalorimeterType.
*/
void addCalorimeterType(const char* calType)
{
calTypes.push_back(std::string(calType));
}
/**
* Add a CalorimeterType.
*/
void addCalorimeterType(std::string calType)
{
calTypes.push_back(calType);
}
/**
* Setup to use the default CalorimeterTypes list.
*/
void setupDefaultCalorimeterTypes();
/**
* Set the XML file used for LCIO collection config.
*/
void setLcioConfigFile(const char* lcioConfigFile)
{
this->lcioConfigFile = lcioConfigFile;
m_useDefaultCaloTypes = false;
}
/**
* Get the XML file used for LCIO collection config.
*/
const std::string& getLcioConfigFile() const
{
return lcioConfigFile;
}
const bool useDefaultCaloTypes() const
{
return m_useDefaultCaloTypes;
}
const void setDeleteExistingCollections(bool d)
{
m_deleteExistingCollections = d;
}
const bool deleteExistingCollections() const
{
return m_deleteExistingCollections;
}
private:
std::string pandoraSettingsXmlFile;
std::string geometryFile;
std::string outputFile;
std::string lcioConfigFile;
CalorimeterTypes calTypes;
FileList inputLcioFiles;
int nrun;
int nskip;
bool m_useDefaultCaloTypes;
bool m_deleteExistingCollections;
};
#endif