MyString2Anything Class Reference

#include <MyString2Anything.hh>

List of all members.

Public Member Functions

 MyString2Anything ()
 ~MyString2Anything ()

Static Public Member Functions

static void get_SD (G4String cont, G4String &m_str, G4double &m_dou)
static void get_SDUI (G4String cont, G4String &m_str, G4double &m_dou, G4int &m_int)
static void get_SIDU (G4String cont, G4String &m_str, G4int &m_int, G4double &m_dou)
static void get_SIDUI (G4String cont, G4String &m_str, G4int &m_int, G4double &m_dou, G4int &m_int2)
static void get_SIIDU (G4String cont, G4String &m_str, G4int &m_int1, G4int &m_int2, G4double &m_dou)
static void get_SIB (G4String cont, G4String &m_str, G4int &m_int, bool &m_bool)
static void get_SID (G4String cont, G4String &m_str, G4int &m_int, G4double &m_dou)
static void get_SI (G4String cont, G4String &m_str, G4int &m_int)
static void get_SII (G4String cont, G4String &m_str, G4int &m_int, G4int &m_int2)
static void get_SB (G4String cont, G4String &m_str, G4bool &m_bool)
static void get_SS (G4String cont, G4String &m_str, G4String &m_str2)
static void get_SSS (G4String cont, G4String &m_str, G4String &m_str2, G4String &m_str3)
static void get_SIS (G4String cont, G4String &m_str, G4int &m_int, G4String &m_str2)
static void get_IS (G4String cont, G4int &m_int, G4String &m_str)
static void get_I (G4String cont, G4int &m_int)
static void get_IDU (G4String cont, G4int &m_int, G4double &m_dou)
static void get_IIDU (G4String cont, G4int &m_int1, G4int &m_int2, G4double &m_dou)
static double get_U (G4String cont)
static void get_ID (G4String cont, G4int &m_int, G4double &m_dou)
static void get_IB (G4String cont, G4int &m_int, bool &m_bool)
static G4bool ConvertToBool (G4String st)

Detailed Description

Definition at line 10 of file MyString2Anything.hh.


Constructor & Destructor Documentation

MyString2Anything::MyString2Anything (  ) 

Definition at line 3 of file MyString2Anything.cc.

00003 {}

MyString2Anything::~MyString2Anything (  ) 

Definition at line 5 of file MyString2Anything.cc.

00005 {}


Member Function Documentation

static G4bool MyString2Anything::ConvertToBool ( G4String  st  )  [inline, static]

Definition at line 136 of file MyString2Anything.hh.

Referenced by get_IB(), and get_SIB().

00137                 {
00138                         st.toUpper();
00139                         G4bool vl = false;
00140                         if( st=="Y" || st=="YES" || st=="1" || st=="T" || st=="TRUE" )
00141                         { vl = true; }
00142                         return vl;
00143                 }

static void MyString2Anything::get_I ( G4String  cont,
G4int &  m_int 
) [inline, static]

Definition at line 96 of file MyString2Anything.hh.

Referenced by MyVGeometryParameter::get_RepCont().

00096                                                                 {
00097                         std::stringstream buf(cont);
00098                         buf>>m_int;
00099                 }

static void MyString2Anything::get_IB ( G4String  cont,
G4int &  m_int,
bool &  m_bool 
) [inline, static]

Definition at line 129 of file MyString2Anything.hh.

References ConvertToBool().

00129                                                                               {
00130                         G4String t_str;
00131                         std::stringstream buf(cont);
00132                         buf>>m_int>>t_str;
00133                         m_bool = ConvertToBool(t_str);
00134                 }

static void MyString2Anything::get_ID ( G4String  cont,
G4int &  m_int,
G4double &  m_dou 
) [inline, static]

Definition at line 124 of file MyString2Anything.hh.

00124                                                                                   {
00125                         std::stringstream buf(cont);
00126                         buf>>m_int>>m_dou;
00127                 }

static void MyString2Anything::get_IDU ( G4String  cont,
G4int &  m_int,
G4double &  m_dou 
) [inline, static]

Definition at line 101 of file MyString2Anything.hh.

00101                                                                                    {
00102                         G4String m_unit;
00103                         std::stringstream buf(cont);
00104                         buf>>m_int>>m_dou>>m_unit;
00105                         m_dou *= G4UnitDefinition::GetValueOf(m_unit);
00106                 }

static void MyString2Anything::get_IIDU ( G4String  cont,
G4int &  m_int1,
G4int &  m_int2,
G4double &  m_dou 
) [inline, static]

Definition at line 108 of file MyString2Anything.hh.

00108                                                                                                     {
00109                         G4String m_unit;
00110                         std::stringstream buf(cont);
00111                         buf>>m_int1>>m_int2>>m_dou>>m_unit;
00112                         m_dou *= G4UnitDefinition::GetValueOf(m_unit);
00113                 }

static void MyString2Anything::get_IS ( G4String  cont,
G4int &  m_int,
G4String &  m_str 
) [inline, static]

Definition at line 91 of file MyString2Anything.hh.

00091                                                                                    {
00092                         std::stringstream buf(cont);
00093                         buf>>m_int>>m_str;
00094                 }

static void MyString2Anything::get_SB ( G4String  cont,
G4String &  m_str,
G4bool &  m_bool 
) [inline, static]

Definition at line 71 of file MyString2Anything.hh.

Referenced by SimpleGeometryParameterMessenger::MySetNewValue().

00071                                                                                    {
00072                         std::stringstream buf(cont);
00073                         buf>>m_str>>m_bool;
00074                 }

static void MyString2Anything::get_SD ( G4String  cont,
G4String &  m_str,
G4double &  m_dou 
) [inline, static]

Definition at line 16 of file MyString2Anything.hh.

Referenced by SimpleGeometryParameterMessenger::MySetNewValue().

00016                                                                                      {
00017                         std::stringstream buf(cont);
00018                         buf>>m_str>>m_dou;
00019                 }

static void MyString2Anything::get_SDUI ( G4String  cont,
G4String &  m_str,
G4double &  m_dou,
G4int &  m_int 
) [inline, static]

Definition at line 21 of file MyString2Anything.hh.

Referenced by SimpleGeometryParameterMessenger::MySetNewValue().

00021                                                                                                     {
00022                         G4String m_unit;
00023                         std::stringstream buf(cont);
00024                         buf>>m_str>>m_dou>>m_unit>>m_int;
00025                         m_dou *= G4UnitDefinition::GetValueOf(m_unit);
00026                 }

static void MyString2Anything::get_SI ( G4String  cont,
G4String &  m_str,
G4int &  m_int 
) [inline, static]

Definition at line 61 of file MyString2Anything.hh.

Referenced by SimpleGeometryParameterMessenger::MySetNewValue().

00061                                                                                   {
00062                         std::stringstream buf(cont);
00063                         buf>>m_str>>m_int;
00064                 }

static void MyString2Anything::get_SIB ( G4String  cont,
G4String &  m_str,
G4int &  m_int,
bool &  m_bool 
) [inline, static]

Definition at line 49 of file MyString2Anything.hh.

References ConvertToBool().

00049                                                                                                  {
00050                         std::string val;
00051                         std::stringstream buf(cont);
00052                         buf>>m_str>>m_int>>val;
00053                         m_bool = ConvertToBool(val);
00054                 }

static void MyString2Anything::get_SID ( G4String  cont,
G4String &  m_str,
G4int &  m_int,
G4double &  m_dou 
) [inline, static]

Definition at line 56 of file MyString2Anything.hh.

00056                                                                                                     {
00057                         std::stringstream buf(cont);
00058                         buf>>m_str>>m_int>>m_dou;
00059                 }

static void MyString2Anything::get_SIDU ( G4String  cont,
G4String &  m_str,
G4int &  m_int,
G4double &  m_dou 
) [inline, static]

Definition at line 28 of file MyString2Anything.hh.

00028                                                                                                      {
00029                         G4String m_unit;
00030                         std::stringstream buf(cont);
00031                         buf>>m_str>>m_int>>m_dou>>m_unit;
00032                         m_dou *= G4UnitDefinition::GetValueOf(m_unit);
00033                 }

static void MyString2Anything::get_SIDUI ( G4String  cont,
G4String &  m_str,
G4int &  m_int,
G4double &  m_dou,
G4int &  m_int2 
) [inline, static]

Definition at line 35 of file MyString2Anything.hh.

Referenced by SimpleGeometryParameterMessenger::MySetNewValue().

00035                                                                                                                      {
00036                         G4String m_unit;
00037                         std::stringstream buf(cont);
00038                         buf>>m_str>>m_int>>m_dou>>m_unit>>m_int2;
00039                         m_dou *= G4UnitDefinition::GetValueOf(m_unit);
00040                 }

static void MyString2Anything::get_SII ( G4String  cont,
G4String &  m_str,
G4int &  m_int,
G4int &  m_int2 
) [inline, static]

Definition at line 66 of file MyString2Anything.hh.

Referenced by SimpleGeometryParameterMessenger::MySetNewValue().

00066                                                                                                   {
00067                         std::stringstream buf(cont);
00068                         buf>>m_str>>m_int>>m_int2;
00069                 }

static void MyString2Anything::get_SIIDU ( G4String  cont,
G4String &  m_str,
G4int &  m_int1,
G4int &  m_int2,
G4double &  m_dou 
) [inline, static]

Definition at line 42 of file MyString2Anything.hh.

00042                                                                                                                       {
00043                         G4String m_unit;
00044                         std::stringstream buf(cont);
00045                         buf>>m_str>>m_int1>>m_int2>>m_dou>>m_unit;
00046                         m_dou *= G4UnitDefinition::GetValueOf(m_unit);
00047                 }

static void MyString2Anything::get_SIS ( G4String  cont,
G4String &  m_str,
G4int &  m_int,
G4String &  m_str2 
) [inline, static]

Definition at line 86 of file MyString2Anything.hh.

00086                                                                                                      {
00087                         std::stringstream buf(cont);
00088                         buf>>m_str>>m_int>>m_str2;
00089                 }

static void MyString2Anything::get_SS ( G4String  cont,
G4String &  m_str,
G4String &  m_str2 
) [inline, static]

Definition at line 76 of file MyString2Anything.hh.

Referenced by SimpleGeometryParameterMessenger::MySetNewValue().

00076                                                                                       {
00077                         std::stringstream buf(cont);
00078                         buf>>m_str>>m_str2;
00079                 }

static void MyString2Anything::get_SSS ( G4String  cont,
G4String &  m_str,
G4String &  m_str2,
G4String &  m_str3 
) [inline, static]

Definition at line 81 of file MyString2Anything.hh.

Referenced by MyDetectorManagerMessenger::SetNewValue().

00081                                                                                                          {
00082                         std::stringstream buf(cont);
00083                         buf>>m_str>>m_str2>>m_str3;
00084                 }

static double MyString2Anything::get_U ( G4String  cont  )  [inline, static]

Definition at line 115 of file MyString2Anything.hh.

Referenced by ProcessCountingSvc::ReadOutputCard(), MonitorSD::ReadOutputCard(), McTruthSvc::ReadOutputCard(), KillerSD::ReadOutputCard(), MonitorSD::ReSet(), and MyTriggerSvc::SetMyTrigger().

00115                                                     {
00116                         double val = G4UnitDefinition::GetValueOf(cont);
00117                         if (!val){
00118                                 std::cout<<"WARNING: value of unit ("<<cont<<") is 0!!! will set it to 1!!!"<<std::endl;
00119                                 val = 1;
00120                         }
00121                         return val;
00122                 }


The documentation for this class was generated from the following files:

Generated on 15 Jun 2016 for g4sim by  doxygen 1.6.1