#include "dunecore/ArtSupport/ArtServiceHelper.h"
#include <string>
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <cassert>
#include "art/Framework/Services/Registry/ServiceHandle.h"
#include "art/Framework/Services/Optional/RandomNumberGenerator.h"
#include "art_root_io/TFileService.h"
#include "art/Framework/Services/System/TriggerNamesService.h"
#include "TFile.h"
#include "TROOT.h"
Go to the source code of this file.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 68 of file test_ArtServiceHelper.cxx.
69 const string myname =
"main: ";
73 istringstream ssopt(
argv[1]);
76 cout <<
"Usage: test_ArtServiceHelper [OPT]" <<
endl;
77 cout <<
" OPT = 0 to skip test." <<
endl;
78 cout <<
" 1 to load from string." <<
endl;
79 cout <<
" 2 to load all services from a file." <<
endl;
83 if ( opt == 0 )
return 0;
int test_ArtServiceHelper(int opt)
QTextStream & endl(QTextStream &s)
int test_ArtServiceHelper |
( |
int |
opt | ) |
|
Definition at line 30 of file test_ArtServiceHelper.cxx.
31 const string myname =
"test_ArtServiceHelper: ";
32 cout << myname <<
"Starting test" <<
endl;
34 cout << myname <<
"NDEBUG must be off." <<
endl;
37 string line =
"-----------------------------";
39 string fclfile =
"test_ArtServiceHelper.fcl";
40 string datafile =
"mytest.root";
43 ofstream
fout(fclfile);
45 fout <<
" RandomNumberGenerator: {}" <<
endl;
46 fout <<
" TFileService: {fileName: \"" << datafile <<
"\"}" <<
endl;
51 cout << myname << line <<
endl;
52 cout << myname <<
"Check RandomNumberGenerator is available." <<
endl;
54 cout << myname <<
" " << &*hrng <<
endl;
56 cout << myname << line <<
endl;
57 cout << myname <<
"Check TFileService is available." <<
endl;
59 cout << myname <<
" " << &*hrng <<
endl;
60 cout << myname <<
" TFile name: " << htf->file().GetName() <<
endl;
63 cout << myname << line <<
endl;
64 cout << myname <<
"Done." <<
endl;
static void load(std::string const &filename)
void line(double t, double *p, double &x, double &y, double &z)
QTextStream & endl(QTextStream &s)