Ignore:
Timestamp:
Nov 5, 2010, 3:45:55 PM (14 years ago)
Author:
garnier
Message:

update ti head

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/digits_hits/detector/src/G4VPrimitiveScorer.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4VPrimitiveScorer.cc,v 1.2 2006/06/29 18:06:03 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     27// $Id: G4VPrimitiveScorer.cc,v 1.5 2010/07/23 04:34:59 taso Exp $
     28// GEANT4 tag $Name: $
    2929//
    3030// G4VPrimitiveScorer
     
    3434#include "G4Step.hh"
    3535#include "G4TouchableHistory.hh"
    36 
     36#include "G4UnitsTable.hh"
    3737
    3838G4VPrimitiveScorer::G4VPrimitiveScorer(G4String name, G4int depth)
    39  :primitiveName(name),detector(0),filter(0),verboseLevel(0),indexDepth(depth)
     39  :primitiveName(name),detector(0),filter(0),verboseLevel(0),indexDepth(depth),
     40   unitName("NoUnit"),unitValue(1.0)
    4041{;}
    4142
     
    7475}
    7576
     77void G4VPrimitiveScorer::CheckAndSetUnit(const G4String& unit,
     78                                         const G4String& category){
     79    if ( G4UnitDefinition::GetCategory(unit) == category){
     80        unitName = unit;
     81        unitValue = G4UnitDefinition::GetValueOf(unit);
     82    } else {
     83        G4String msg = "Invalid unit ["+unit+"] (Current  unit is [" +GetUnit()+"] )";
     84        G4Exception(GetName(),"DetPS0000",JustWarning,msg);
     85    }
     86}
Note: See TracChangeset for help on using the changeset viewer.