Loading...
Searching...
No Matches
ExTGRCLineProcessor.cc
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27/// \file persistency/P03/src/ExTGRCLineProcessor.cc
28/// \brief Implementation of the ExTGRCLineProcessor class
29
32
33//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
37
38//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
42
43//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
44G4bool ExTGRCLineProcessor::ProcessLine( const std::vector<G4String>& wl )
45{
46
47 G4bool iret = G4tgrLineProcessor::ProcessLine( wl );
48
49 G4String wl0 = wl[0];
50 for( size_t ii = 0; ii < wl0.length(); ii++ )
51 {
52 wl0[ii] = toupper( wl0[ii] );
53 }
54
55 if( !iret )
56 {
57 //------------------------------- parameter number
58 if( wl0 == ":REGION" )
59 {
60 std::vector<G4String>::const_iterator ite = wl.begin()+1;
61 std::vector<G4String> wlc;
62 for( ; ite != wl.end(); ite++ ) //loop skipping the first one
63 {
64 wlc.push_back( *ite );
65 }
66 // wlc = wlc.erase( wlc.begin() );
68 iret = 1;
69
70 }
71 else if( wl0 == ":CUTS" )
72 {
73 std::vector<G4String>::const_iterator ite = wl.begin()+1;
74 std::vector<G4String> wlc;
75 for( ; ite != wl.end(); ite++ ) //loop skipping the first one
76 {
77 wlc.push_back( *ite );
78 }
80 iret = 1;
81 }
82 else
83 {
84 iret = 0;
85 }
86 }
87
88 return iret;
89}
Definition of the ExTGRCLineProcessor class.
Definition of the ExTGRCRegionCutsMgr class.
G4bool ProcessLine(const std::vector< G4String > &wl)
static ExTGRCRegionCutsMgr * GetInstance()
void AddRegionCuts(const std::vector< G4String > &rc)
void AddRegionData(const std::vector< G4String > &rd)

Applications | User Support | Publications | Collaboration