G4ProcessAttribute.hh

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$
00028 //
00029 // 
00030 // ------------------------------------------------------------
00031 //      GEANT 4 class header file 
00032 //
00033 //      History: first implementation, based on object model of
00034 //      2nd December 1997, H.Kurashige
00035 //   ----------------  G4ProcessAttribute -----------------
00036 // Class Description
00037 //  This class is used by G4ProcessManager ONLY for booking !!!
00038 //
00039 // History:
00040 //   adds copy constructor            27 June 1998 H.Kurashige
00041 // ------------------------------------------------------------
00042 
00043 #ifndef G4ProcessAttribute_h
00044 #define G4ProcessAttribute_h 1
00045 
00046 #include "globals.hh"
00047 #include "G4ios.hh"
00048 
00049 #include "G4ProcessManager.hh"
00050 
00051 class G4VProcess;
00052 
00053 class G4ProcessAttribute
00054 {
00055   // this class is used by G4ProcessManager ONLY for booking !!!
00056   friend class G4ProcessManager;
00057   public:
00058     G4ProcessAttribute();
00059     G4ProcessAttribute(const G4VProcess* aProcess);
00060     G4ProcessAttribute(const G4ProcessAttribute &right);
00061     //  Constructors
00062 
00063     ~G4ProcessAttribute();
00064     //  Destructor
00065 
00066     G4ProcessAttribute & operator=(const G4ProcessAttribute &right);
00067     // Assignment operator
00068 
00069     G4int operator==(const G4ProcessAttribute &right) const;
00070     G4int operator!=(const G4ProcessAttribute &right) const;
00071     // equal / unequal operator
00072 
00073   
00074   protected:
00075     G4VProcess*           pProcess;
00076     // pointer to G4VProcess
00077 
00078     G4bool                isActive;
00079     // flag for activation/inactivation
00080 
00081     G4int                 idxProcessList;
00082     // index to a ProcessVector for theProcessList and 
00083 
00084     G4int                 idxProcVector[G4ProcessManager::SizeOfProcVectorArray];
00085     // index to ProcessVectors for "Doit"s and "GetPhysicalInteractionLength"s
00086     //   -1 : not applicable
00087 
00088     G4int                 ordProcVector[G4ProcessManager::SizeOfProcVectorArray];
00089     // ordering parameter 
00090 };
00091 
00092 inline 
00093  G4ProcessAttribute::G4ProcessAttribute(const G4VProcess* aProcess):
00094          pProcess((G4VProcess*)aProcess),
00095          isActive(true),
00096          idxProcessList(-1)
00097 {
00098   for(size_t ii=0; ii<G4ProcessManager::SizeOfProcVectorArray; ii++){
00099     idxProcVector[ii]=-1;
00100     ordProcVector[ii]=0; 
00101   }
00102 }
00103 
00104 inline 
00105  G4int  G4ProcessAttribute::operator==(const G4ProcessAttribute &right) const
00106 {
00107     return this->pProcess == right.pProcess;
00108 }
00109 
00110 inline 
00111  G4int  G4ProcessAttribute::operator!=(const G4ProcessAttribute &right) const
00112 {
00113     return this->pProcess != right.pProcess;
00114 }
00115 
00116 #endif
00117 
00118 
00119 
00120 
00121 

Generated on Mon May 27 17:49:25 2013 for Geant4 by  doxygen 1.4.7