ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/HbbAnalysis/interface/MiscFunctions.hh
Revision: 1.1
Committed: Mon Oct 31 09:22:52 2011 UTC (13 years, 6 months ago) by agilbert
Content type: text/plain
Branch: MAIN
CVS Tags: v01-00-00, HEAD
Log Message:
Forgot to add MiscFunctions.hh to repo

File Contents

# Content
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