#include <string>
#include <iostream>
#include <vector>
#include <sstream>
#include <memory>
#include "dunecore/ArtSupport/DuneToolManager.h"
#include "dunecore/DuneInterface/Tool/RunDataTool.h"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 21 of file duneRunData.cxx.
22 const string myname =
"duneRunData: ";
24 unsigned int irun = 0;
28 for (
int iarg=1; iarg< argc; ++iarg ) {
29 string sarg =
argv[iarg];
34 if ( sarg ==
"-v" ) verbose =
true;
37 string sarg =
argv[argc-1];
38 istringstream ssarg(sarg);
41 cout << myname <<
"ERROR: Last field does not appear to be a number: \"" 42 << sarg <<
"\"" <<
endl;
50 cout <<
"Usage: duneRunData [-h] [-v] [-c FCLFILE] RUN" <<
endl;
51 cout <<
" Displays the run info for a run." <<
endl;
52 cout <<
" -h - Display this message." <<
endl;
53 cout <<
" -v - Verbose display including info about fcl file and run data tool." <<
endl;
56 string tname =
"protoduneRunDataTool";
57 if ( ! verbose ) cout.setstate(std::ios_base::failbit);
59 cout << myname <<
"Fetching tool manager." <<
endl;
62 cout << myname <<
"Fetching run data tool." <<
endl;
65 if ( ! verbose ) cout.clear();
66 if ( prdt ==
nullptr ) {
67 cout << myname <<
"ERROR: Unable to find RunDataTool " << tname <<
endl;
74 cout << myname <<
"Unable to find run " << irun <<
endl;
QTextStream & endl(QTextStream &s)