Functions
test_Geometry.cxx File Reference
#include "larcore/Geometry/Geometry.h"
#include <string>
#include <iostream>
#include <fstream>
#include "dunecore/ArtSupport/ArtServiceHelper.h"
#include "art/Framework/Services/Registry/ServiceHandle.h"

Go to the source code of this file.

Functions

int test_Geometry (string gname)
 
int main (int argc, const char *argv[])
 

Function Documentation

int main ( int  argc,
const char *  argv[] 
)

Definition at line 54 of file test_Geometry.cxx.

54  {
55  string gname = "dune35t_geo";
56  if ( argc > 1 ) {
57  string sarg = argv[1];
58  if ( sarg == "-h" ) {
59  cout << argv[0] << ": GEOFCLNAME [dune35t_geo]";
60  return 0;
61  }
62  gname = sarg;
63  }
64  test_Geometry(gname);
65  return 0;
66 }
int test_Geometry(string gname)
int test_Geometry ( string  gname)

Definition at line 29 of file test_Geometry.cxx.

29  {
30  const string myname = "test_Geometry: ";
31  cout << myname << "Starting test" << endl;
32 #ifdef NDEBUG
33  cout << myname << "NDEBUG must be off." << endl;
34  abort();
35 #endif
36  string line = "-----------------------------";
37 
38  std::ostringstream oss;
39  oss << "#include \"geometry_dune.fcl\"" << endl;
40  oss << "services.Geometry: @local::" << gname << endl;
41  oss << "services.ExptGeoHelperInterface: @local::dune_geometry_helper" << endl;
43 
44  cout << myname << line << endl;
45  cout << myname << "Get Geometry service." << endl;
47  cout << myname << line << endl;
48  cout << myname << "Geometry name: " << pgeo->DetectorName() << endl;
49 
50  cout << myname << line << endl;
51  return 0;
52 }
static void load_services(std::string const &config)
std::string DetectorName() const
Returns a string with the name of the detector, as configured.
void line(double t, double *p, double &x, double &y, double &z)
QTextStream & endl(QTextStream &s)