1 |
agilbert |
1.1 |
#ifndef HbbAnalysis_MiscFunctions_hh
|
2 |
|
|
#define HbbAnalysis_MiscFunctions_hh
|
3 |
|
|
#include <stdarg.h>
|
4 |
|
|
#include <vector>
|
5 |
|
|
#include <string>
|
6 |
|
|
|
7 |
|
|
namespace HbbAnalysis {
|
8 |
|
|
|
9 |
|
|
std::vector<std::string> StringVecify(unsigned numArgs, ... ) {
|
10 |
|
|
std::vector<std::string> vec;
|
11 |
|
|
vec.resize(numArgs);
|
12 |
|
|
va_list listPointer;
|
13 |
|
|
va_start(listPointer, numArgs);
|
14 |
|
|
for (unsigned i = 0; i < numArgs; ++i){
|
15 |
|
|
vec[i] = (std::string(va_arg(listPointer,char*)));
|
16 |
|
|
}
|
17 |
|
|
return vec;
|
18 |
|
|
}
|
19 |
|
|
}
|
20 |
|
|
|
21 |
|
|
#endif
|
22 |
|
|
|