Public Member Functions | |
TimeImpl (int n, G4double t[], G4double b[], G4double e[]=0) | |
void | setPeriod (G4double v) |
G4double | factorB (G4double t) |
G4double | factorE (G4double t) |
Static Public Member Functions | |
static TimeImpl * | readTime (InputFile &in, MyBLArgumentVector argv, MyBLArgumentMap namedArgs) |
Private Attributes | |
BTSpline1D | B |
BTSpline1D | E |
G4double | tMin |
G4double | tMax |
G4double | period |
class TimeImpl -- class implementation of a time dependence.
Definition at line 177 of file MyBLFieldMap.cc.
TimeImpl::TimeImpl | ( | int | n, | |
G4double | t[], | |||
G4double | b[], | |||
G4double | e[] = 0 | |||
) | [inline] |
Constructor. n is # points in the arrays, t[] is the list of time values (ns), b[] and e[] are the factors for B field and E field. t[], b[], and e[] are copied so the caller can delete them after calling this routine.
Definition at line 189 of file MyBLFieldMap.cc.
References period, tMax, and tMin.
Referenced by readTime().
G4double TimeImpl::factorB | ( | G4double | t | ) | [inline] |
Definition at line 196 of file MyBLFieldMap.cc.
References B, period, tMax, and tMin.
Referenced by MyBLFieldMap::getFieldValue(), and MyBLFieldMap::getTimeFactor().
G4double TimeImpl::factorE | ( | G4double | t | ) | [inline] |
Definition at line 206 of file MyBLFieldMap.cc.
References E, period, tMax, and tMin.
Referenced by MyBLFieldMap::getFieldValue(), and MyBLFieldMap::getTimeFactor().
TimeImpl * TimeImpl::readTime | ( | InputFile & | in, | |
MyBLArgumentVector | argv, | |||
MyBLArgumentMap | namedArgs | |||
) | [static] |
Definition at line 379 of file MyBLFieldMap.cc.
References argDouble(), B, E, InputFile::getline(), period, InputFile::repeatLine(), setPeriod(), and TimeImpl().
Referenced by MyBLFieldMap::readFile().
00380 { 00381 G4double period=-1.0; 00382 argDouble(period,"period",namedArgs); 00383 00384 std::vector<G4double> T; 00385 std::vector<G4double> B; 00386 std::vector<G4double> E; 00387 00388 char *line; 00389 while((line=in.getline()) != 0) { 00390 if(isalpha(line[0])) { 00391 in.repeatLine(); 00392 break; 00393 } 00394 G4double t,b,e; 00395 int j = sscanf(line,"%lf%lf%lf",&t,&b,&e); 00396 if(j < 2 || j > 3) return 0; 00397 if(j == 2) e = b; 00398 T.push_back(t); 00399 B.push_back(b); 00400 E.push_back(e); 00401 } 00402 00403 if(T.size() > 0) { 00404 TimeImpl *impl = 00405 new TimeImpl(T.size(),&T[0],&B[0],&E[0]); 00406 impl->setPeriod(period); 00407 return impl; 00408 } 00409 00410 return 0; 00411 }
void TimeImpl::setPeriod | ( | G4double | v | ) | [inline] |
Definition at line 195 of file MyBLFieldMap.cc.
References period.
Referenced by MyBLFieldMap::createTimeDependence(), and readTime().
00195 { period = v; }
BTSpline1D TimeImpl::B [private] |
Definition at line 178 of file MyBLFieldMap.cc.
Referenced by factorB(), and readTime().
BTSpline1D TimeImpl::E [private] |
Definition at line 179 of file MyBLFieldMap.cc.
Referenced by factorE(), and readTime().
G4double TimeImpl::period [private] |
Definition at line 182 of file MyBLFieldMap.cc.
Referenced by factorB(), factorE(), readTime(), setPeriod(), and TimeImpl().
G4double TimeImpl::tMax [private] |
Definition at line 181 of file MyBLFieldMap.cc.
Referenced by factorB(), factorE(), and TimeImpl().
G4double TimeImpl::tMin [private] |
Definition at line 180 of file MyBLFieldMap.cc.
Referenced by factorB(), factorE(), and TimeImpl().