test_LArProperties.cxx
Go to the documentation of this file.
1 // test_LArProperties.cxx
2 
3 // David Adams
4 // September 2015
5 //
6 // This test demonstrates how to configure and use the LArSoft LArProperties
7 // service outside the art framework.
8 
10 
11 #include <string>
12 #include <iostream>
16 #include "CLHEP/Random/RandomEngine.h"
17 
18 using std::string;
19 using std::cout;
20 using std::endl;
23 
24 int test_LArPropertiesStandard(string gname) {
25  const string myname = "test_LArPropertiesStandardServiceStandard: ";
26  cout << myname << "Starting test" << endl;
27 #ifdef NDEBUG
28  cout << myname << "NDEBUG must be off." << endl;
29  abort();
30 #endif
31  string line = "-----------------------------";
32 
34 
35  cout << myname << line << endl;
36  cout << myname << "Get LArPropertiesServiceStandard service." << endl;
38 
39  cout << myname << line << endl;
40  cout << myname << "Use LArPropertiesStandard." << endl;
41  cout << myname << " Atomic number: " << plarsrv->AtomicNumber() << endl;
42  cout << myname << " Radiation length: " << plarsrv->RadiationLength() << endl;
43 
44  cout << myname << line << endl;
45  cout << "Done." << endl;
46  return 0;
47 }
48 
49 int main() {
50  string gname = "dune35t4apa_v6";
52  return 0;
53 }
int main()
std::string string
Definition: nybbler.cc:12
static constexpr FileOnPath_t FileOnPath
virtual const provider_type * provider() const override
static void load_services(std::string const &config)
int test_LArPropertiesStandard(string gname)
virtual double AtomicNumber() const =0
Atomic number of the liquid.
void line(double t, double *p, double &x, double &y, double &z)
virtual double RadiationLength() const =0
QTextStream & endl(QTextStream &s)