Functions
test_DetectorProperties.cxx File Reference
#include "lardata/DetectorInfoServices/DetectorPropertiesService.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_DetectorPropertiesService (string gname)
 
int main ()
 

Function Documentation

int main ( void  )

Definition at line 48 of file test_DetectorProperties.cxx.

48  {
49  string gname = "dune35t4apa_v6";
51  return 0;
52 }
int test_DetectorPropertiesService(string gname)
int test_DetectorPropertiesService ( string  gname)

Definition at line 22 of file test_DetectorProperties.cxx.

22  {
23  const string myname = "test_DetectorPropertiesService: ";
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 
32 
33  cout << myname << line << endl;
34  cout << myname << "Get DetectorPropertiesService service." << endl;
35  auto const clockData = art::ServiceHandle<detinfo::DetectorClocksService const>()->DataForJob();
36  auto const detProp = art::ServiceHandle<detinfo::DetectorPropertiesService const>()->DataForJob(clockData);
37 
38  cout << myname << line << endl;
39  cout << myname << "Use DetectorProperties service." << endl;
40  cout << myname << " SamplingRate: " << sampling_rate(clockData) << endl;
41  cout << myname << " ElectronsToADC: " << detProp.ElectronsToADC() << endl;
42 
43  cout << myname << line << endl;
44  cout << "Done." << endl;
45  return 0;
46 }
static constexpr FileOnPath_t FileOnPath
static void load_services(std::string const &config)
void line(double t, double *p, double &x, double &y, double &z)
double sampling_rate(DetectorClocksData const &data)
Returns the period of the TPC readout electronics clock.
QTextStream & endl(QTextStream &s)