Functions
test_LArSeedService.cxx File Reference
#include "nurandom/RandomUtils/NuRandomService.h"
#include <string>
#include <iostream>
#include "dunecore/ArtSupport/ArtServiceHelper.h"
#include "art/Framework/Services/Registry/ServiceHandle.h"
#include "art/Framework/Core/detail/EngineCreator.h"
#include "CLHEP/Random/RandomEngine.h"

Go to the source code of this file.

Functions

int test_LArSeedService (string gname)
 
int main ()
 

Function Documentation

int main ( void  )

Definition at line 52 of file test_LArSeedService.cxx.

52  {
53  string gname = "dune35t4apa_v6";
54  test_LArSeedService(gname);
55  return 0;
56 }
int test_LArSeedService(string gname)
int test_LArSeedService ( string  gname)

Definition at line 22 of file test_LArSeedService.cxx.

22  {
23  const string myname = "test_LArSeedService: ";
24  cout << myname << "Starting test" << endl;
25 #ifdef NDEBUG
26  cout << myname << "NDEBUG must be off." << endl;
27  abort();
28 #endif
29  string line = "-----------------------------";
30 
31  std::string const config{"NuRandomService: { endOfJobSummary: true policy: random}"};
33 
34  cout << myname << line << endl;
35  cout << myname << "Get NuRandomService service." << endl;
37 
38  cout << myname << line << endl;
39  cout << myname << "Use NuRandomService service." << endl;
40  try {
41  cout << " Seed: " << psrv->getSeed() << endl;
42  } catch(...) {
43  cout << " Service use raised an exception." << endl;
44  cout << " Allow this for now." << endl;
45  }
46 
47  cout << myname << line << endl;
48  cout << "Done." << endl;
49  return 0;
50 }
std::string string
Definition: nybbler.cc:12
static void load_services(std::string const &config)
static Config * config
Definition: config.cpp:1054
void line(double t, double *p, double &x, double &y, double &z)
QTextStream & endl(QTextStream &s)