/home/cern/BDSIM_new/include/BDSNeutronTrackInfo.hh

00001 /* BDSIM code.    Version 1.0
00002    Author: Grahame A. Blair, Royal Holloway, Univ. of London.
00003    Last modified 24.7.2002
00004    Copyright (c) 2002 by G.A.Blair.  ALL RIGHTS RESERVED. 
00005 */
00006 
00007 //
00008 // ********************************************************************
00009 // * DISCLAIMER                                                       *
00010 // *                                                                  *
00011 // * The following disclaimer summarizes all the specific disclaimers *
00012 // * of contributors to this software. The specific disclaimers,which *
00013 // * govern, are listed with their locations in:                      *
00014 // *   http://cern.ch/geant4/license                                  *
00015 // *                                                                  *
00016 // * Neither the authors of this software system, nor their employing *
00017 // * institutes,nor the agencies providing financial support for this *
00018 // * work  make  any representation or  warranty, express or implied, *
00019 // * regarding  this  software system or assume any liability for its *
00020 // * use.                                                             *
00021 // *                                                                  *
00022 // * This  code  implementation is the  intellectual property  of the *
00023 // * GEANT4 collaboration.                                            *
00024 // * By copying,  distributing  or modifying the Program (or any work *
00025 // * based  on  the Program)  you indicate  your  acceptance of  this *
00026 // * statement, and all its terms.                                    *
00027 // ********************************************************************
00028 //
00029 //
00030 // $Id: BDSNeutronTrackInfo.hh,v 1.1 2005/01/22 17:05:31 agapov Exp $
00031 // GEANT4 tag $Name:  $
00032 //
00033 //
00034 //---------------------------------------------------------------
00035 //
00036 // G4VUserTrackInformation
00037 //
00038 // Class Description:
00039 //
00040 //  Abstract class which the user can derive his/her own concrete
00041 // class for toring user's information associating with a G4Track
00042 // class object.
00043 //
00044 //  It is user's responsibility that
00045 //   1) Concrete class derived from this class MUST use G4Allocator
00046 //     for memory management
00047 //   2) Construct a concrete class object and set the pointer to
00048 //     proper G4Track object
00049 //
00050 //  To set a pointer of a concrete class object to G4Track in
00051 // G4UserTrackingAction concrete implementation, given the G4Track
00052 // object is available only by "pointer to const", SetUserTrackInformation()
00053 // method of G4TrackingManager is available.
00054 //
00055 //  The concrete class object is deleted by Geant4 kernel when
00056 // associated G4Track object is deleted.
00057 
00058 
00059 #ifndef BDSNeutronTrackInfo_H
00060 #define BDSNeutronTrackInfo_H 1
00061 
00062 #include "globals.hh" 
00063 #include "G4VUserTrackInformation.hh"
00064 #include "G4Allocator.hh"
00065 
00066 
00067 class BDSNeutronTrackInfo:public G4VUserTrackInformation
00068 {
00069 public:
00070   //  BDSNeutronTrackInfo():G4VUserTrackInformation(){;};
00071   BDSNeutronTrackInfo(){;};
00072   ~BDSNeutronTrackInfo(){;};
00073 
00074   inline void *operator new(size_t);
00075   inline void operator delete(void* anInfo);
00076 
00077 
00078   inline G4bool GetIsLogged();
00079   inline void SetIsLogged(G4bool logger);
00080 
00081 
00082 public:
00083   void Print() const;
00084 
00085 private:
00086   G4bool IsLogged;
00087 };
00088 
00089 inline G4bool BDSNeutronTrackInfo::GetIsLogged()
00090 {return IsLogged;}
00091 
00092 inline void BDSNeutronTrackInfo::SetIsLogged(G4bool logger)
00093 {IsLogged=logger;}
00094 
00095 inline void BDSNeutronTrackInfo::Print() const
00096 {G4cout<<" BDSNeutronTrackInfo: IsLogged="<<IsLogged<<G4endl;}
00097 
00098 
00099 extern G4Allocator<BDSNeutronTrackInfo> theBDSNeutronTrackInfoAllocator;
00100 
00101 inline void* BDSNeutronTrackInfo::operator new(size_t)
00102 {
00103   void* anInfo;
00104   anInfo = (void*)theBDSNeutronTrackInfoAllocator.MallocSingle();
00105   return anInfo;
00106 }
00107 
00108 inline void BDSNeutronTrackInfo::operator delete(void* anInfo)
00109 {
00110   theBDSNeutronTrackInfoAllocator.FreeSingle((BDSNeutronTrackInfo*)anInfo);
00111 }
00112 
00113 
00114 #endif
00115 

Generated on Wed Mar 5 17:25:22 2008 for BDSIM by  doxygen 1.5.3