-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathcommandutil.cc
More file actions
24 lines (20 loc) · 821 Bytes
/
commandutil.cc
File metadata and controls
24 lines (20 loc) · 821 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "commandutil.h"
std::tuple<TString, TString, int> RooUtil::CommandUtil::parseArgs(int argc, char** argv)
{
// Argument checking
if (argc < 3)
{
std::cout << "Usage:" << std::endl;
std::cout << " $ ./<executable name> INPUTFILES OUTPUTFILE [NEVENTS]" << std::endl;
std::cout << std::endl;
std::cout << " INPUTFILES comma separated file list" << std::endl;
std::cout << " OUTPUTFILE output file name" << std::endl;
std::cout << " [NEVENTS=-1] # of events to run over" << std::endl;
std::cout << std::endl;
exit(255);
}
TString inputFileList = argv[1];
TString outputFileName = argv[2];
int nEvents = argc > 3 ? atoi(argv[3]) : -1;
return std::make_tuple(inputFileList, outputFileName, nEvents);
}