LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
pyG4VSensitiveDetector.cc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // ====================================================================
27 // pyG4VSensitiveDetector.cc
28 //
29 // 2005 Q
30 // ====================================================================
31 #include <boost/python.hpp>
32 #include "G4VSensitiveDetector.hh"
33 
34 using namespace boost::python;
35 
36 // ====================================================================
37 // thin wrappers
38 // ====================================================================
40 
42  public G4VSensitiveDetector,
43  public wrapper<G4VSensitiveDetector> {
44 
45 public:
46  CB_G4VSensitiveDetector() : G4VSensitiveDetector("") { }
48  : G4VSensitiveDetector(name) { }
50 
51  G4bool ProcessHits(G4Step* aStep, G4TouchableHistory* ROhist) {
52  return get_override("ProcessHits")(&aStep, &ROhist);
53  }
54 };
55 
56 }
57 
58 using namespace pyG4VSensitiveDetector;
59 
60 // ====================================================================
61 // module definition
62 // ====================================================================
64 {
65  class_<CB_G4VSensitiveDetector, boost::noncopyable>
66  ("G4VSensitiveDetector", "base class of senstive detector")
67  // ---
68  .def(init<const G4String&>())
69  // ---
70  .def("Initialize", &G4VSensitiveDetector::Initialize)
71  .def("EndOfEvent", &G4VSensitiveDetector::EndOfEvent)
72  .def("clear", &G4VSensitiveDetector::clear)
73  .def("DrawAll", &G4VSensitiveDetector::DrawAll)
74  .def("PrintAll", &G4VSensitiveDetector::PrintAll)
75  .def("Hit", &G4VSensitiveDetector::Hit)
76  .def("ProcessHits", pure_virtual(&CB_G4VSensitiveDetector::ProcessHits))
77  // ---
78  .def("SetROgeometry", &G4VSensitiveDetector::SetROgeometry)
79  .def("GetNumberOfCollections",
80  &G4VSensitiveDetector::GetNumberOfCollections)
81  .def("GetCollectionName", &G4VSensitiveDetector::GetCollectionName)
82  .def("SetVerboseLevel", &G4VSensitiveDetector::SetVerboseLevel)
83  .def("Activate", &G4VSensitiveDetector::Activate)
84  .def("isActive", &G4VSensitiveDetector::isActive)
85  .def("GetName", &G4VSensitiveDetector::GetName)
86  .def("GetPathName", &G4VSensitiveDetector::GetPathName)
87  .def("GetFullPathName", &G4VSensitiveDetector::GetFullPathName)
88  .def("GetROgeometry", &G4VSensitiveDetector::GetROgeometry,
89  return_internal_reference<>())
90  ;
91 }
void PrintAll(detinfo::DetectorPropertiesData const &detProp, std::string someText)
Definition: Utils.cxx:5367
void Initialize()
Definition: errprop.cc:100
void export_G4VSensitiveDetector()
G4bool ProcessHits(G4Step *aStep, G4TouchableHistory *ROhist)
vec_iX clear()