digits_hits/detector/src/G4VSensitiveDetector.cc

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id: G4VSensitiveDetector.cc,v 1.3 2006/06/29 18:06:11 gunter Exp $
00028 // GEANT4 tag $Name: geant4-09-01-patch-01 $
00029 //
00030 // G4VSensitiveDetector
00031 #include "G4VSensitiveDetector.hh"
00032 #include "G4SDManager.hh"
00033 
00034 G4VSensitiveDetector::G4VSensitiveDetector(G4String name)
00035 :verboseLevel(0),active(true),ROgeometry(0),filter(0)
00036 {
00037   size_t sLast = name.last('/');
00038   if(sLast==std::string::npos)
00039   { // detector name only
00040     SensitiveDetectorName = name;
00041     thePathName = "/";
00042   }
00043   else
00044   { // name conatin the directory path
00045     SensitiveDetectorName = name;
00046     SensitiveDetectorName.remove(0,sLast+1);
00047     thePathName = name;
00048     thePathName.remove(sLast+1,name.length()-sLast);
00049     if(thePathName(0)!='/') thePathName.prepend("/");
00050   }
00051   fullPathName = thePathName + SensitiveDetectorName;
00052 }
00053 
00054 G4VSensitiveDetector::G4VSensitiveDetector(const G4VSensitiveDetector &right)
00055 {
00056   SensitiveDetectorName = right.SensitiveDetectorName;
00057   thePathName = right.thePathName;
00058   fullPathName = right.fullPathName;
00059   verboseLevel = right.verboseLevel;
00060   active = right.active;
00061   ROgeometry = right.ROgeometry;
00062   filter = right.filter;
00063 }
00064 
00065 G4VSensitiveDetector::~G4VSensitiveDetector()
00066 {
00067 }
00068 
00069 const G4VSensitiveDetector & G4VSensitiveDetector::operator=(const G4VSensitiveDetector &right)
00070 {
00071   SensitiveDetectorName = right.SensitiveDetectorName;
00072   thePathName = right.thePathName;
00073   fullPathName = right.fullPathName;
00074   verboseLevel = right.verboseLevel;
00075   active = right.active;
00076   ROgeometry = right.ROgeometry;
00077   filter = right.filter;
00078   return *this;
00079 }
00080 
00081 G4int G4VSensitiveDetector::operator==(const G4VSensitiveDetector &right) const
00082 {
00083    return (this==&right);
00084 }
00085 
00086 G4int G4VSensitiveDetector::operator!=(const G4VSensitiveDetector &right) const
00087 {
00088    return (this!=&right);
00089 }
00090 
00091 G4int G4VSensitiveDetector::GetCollectionID(G4int i)
00092 {
00093    return G4SDManager::GetSDMpointer()->GetCollectionID(SensitiveDetectorName+"/"+collectionName[i]); 
00094 }
00095 
00096 //----- following methoods are abstract methods to be
00097 //----- implemented in the concrete classes
00098 
00099 void G4VSensitiveDetector::Initialize(G4HCofThisEvent*)
00100 {
00101 }
00102 
00103 void G4VSensitiveDetector::EndOfEvent(G4HCofThisEvent*)
00104 {
00105 }
00106 
00107 void G4VSensitiveDetector::clear()
00108 {
00109 }
00110 
00111 void G4VSensitiveDetector::DrawAll()
00112 {
00113 }
00114 
00115 void G4VSensitiveDetector::PrintAll()
00116 {
00117 }
00118 

Generated on Fri Apr 11 17:09:46 2008 for Geant4 by  doxygen 1.4.7