Ignore:
Timestamp:
Feb 16, 2009, 10:14:30 AM (15 years ago)
Author:
garnier
Message:

en test de gl2ps. Problemes de libraries

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/global/management/src/G4LPhysicsFreeVector.cc

    r850 r921  
    2525//
    2626//
    27 // $Id: G4LPhysicsFreeVector.cc,v 1.17 2008/09/06 19:52:16 vnivanch Exp $
    28 // GEANT4 tag $Name: HEAD $
     27// $Id: G4LPhysicsFreeVector.cc,v 1.22 2008/09/22 08:26:33 gcosmo Exp $
     28// GEANT4 tag $Name: geant4-09-02-cand-01 $
    2929//
    3030//
     
    3636// F.W. Jones, TRIUMF, 04-JUN-96
    3737//
    38 // 27-MAR-97 FWJ: first version for Alpha release
    39 // 05-SEP-2008, V.Ivanchenko : added protections for zero-length vector
    4038// --------------------------------------------------------------------
    4139
     
    4947   : G4PhysicsVector(), verboseLevel(0)
    5048{
    51   type = T_G4LPhysicsFreeVector;
     49   type = T_G4LPhysicsFreeVector;
    5250}
    5351
     
    5957  : G4PhysicsVector(), verboseLevel(0)
    6058{
    61   type = T_G4LPhysicsFreeVector;
     59   type = T_G4LPhysicsFreeVector;
    6260   
    63   numberOfBin = nbin;
    64   if(nbin > 0) {
    65     binVector.resize(nbin+1);
    66     dataVector.resize(nbin+1);
    67     edgeMin = binmin;
    68     edgeMax = binmax;
    69     for (size_t i=0; i<=numberOfBin; i++) {
    70       binVector[i] = binmin;
    71       dataVector[i]= 0.0;
    72     }
    73   }
     61   edgeMin = binmin;
     62   edgeMax = binmax;
     63   numberOfBin = nbin;
     64   binVector.reserve(nbin+1);
     65   dataVector.reserve(nbin+1);
     66   for (size_t i=0; i<=numberOfBin; i++)
     67   {
     68     binVector.push_back(0.0);
     69     dataVector.push_back(0.0);
     70   }
    7471
    7572
     
    7875G4LPhysicsFreeVector::~G4LPhysicsFreeVector()
    7976{
     77}
     78
     79// --------------------------------------------------------------------
     80
     81G4LPhysicsFreeVector::G4LPhysicsFreeVector(const G4LPhysicsFreeVector& right)
     82  : G4PhysicsVector(right)
     83{
     84  verboseLevel = right.verboseLevel;
     85}
     86
     87// --------------------------------------------------------------------
     88
     89G4LPhysicsFreeVector&
     90G4LPhysicsFreeVector::operator=(const G4LPhysicsFreeVector& right)
     91{
     92  // Check assignment to self
     93  //
     94  if(this == &right) { return *this; }
     95
     96  DeleteData();
     97  CopyData(right);
     98
     99  verboseLevel = right.verboseLevel;
     100  return *this;
    80101}
    81102
Note: See TracChangeset for help on using the changeset viewer.