Garfield++ v1r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
vec.h File Reference

Go to the source code of this file.

Classes

class  absref
 
class  virt_common_base_col< X, C >
 
class  vec
 
class  vecReg
 
class  basis
 
class  basisReg
 
class  point
 
class  pointReg
 
class  abssyscoor
 
class  fixsyscoor
 

Macros

#define pvecerror(string)
 
#define pvecerrorp(string)
 
#define ApplyAnyFunctionToVecElements(func)
 
#define vec_syscoor_index   0
 

Functions

std::ostream & operator<< (std::ostream &file, const vec &v)
 
std::ostream & operator<< (std::ostream &file, const vecReg &v)
 
std::ostream & operator<< (std::ostream &file, const basis &b)
 
std::ostream & operator<< (std::ostream &file, const basisReg &v)
 
std::ostream & operator<< (std::ostream &file, const point &p)
 
std::ostream & operator<< (std::ostream &file, const pointReg &v)
 
std::ostream & operator<< (std::ostream &file, const abssyscoor &s)
 
std::ostream & operator<< (std::ostream &file, const fixsyscoor &s)
 

Variables

int vecerror
 
vec dex
 
vec dey
 
vec dez
 
vec dv0
 

Macro Definition Documentation

◆ ApplyAnyFunctionToVecElements

#define ApplyAnyFunctionToVecElements (   func)
Value:
{ \
ActivePtr<absref_transmit> aref_tran_cont; \
get_components(aref_tran_cont); \
absref_transmit* aref_tran = aref_tran_cont.get(); \
if(aref_tran != NULL) { \
int n; \
int q = aref_tran->qaref; \
for(n = 0; n < q; n++)(this->*(aref_tran->aref[n])).func; \
q = aref_tran->qaref_pointer; \
for(n = 0; n < q; n++) aref_tran->aref_pointer[n]->func; \
q = aref_tran->qaref_other; \
for(n = 0; n < q; n++) { \
absref* ar = aref_tran->get_other(n); \
if(ar == NULL) break; \
else ar->func; \
} \
} \
}
Definition: vec.h:134

Definition at line 220 of file vec.h.

◆ pvecerror

#define pvecerror (   string)
Value:
mfunname(string); \
if (vecerror != 0) { \
mcerr << "vecerror is not zero, program is terminated\n" \
<< " function detected error is " << string << '\n'; \
spexit(mcerr); \
}
#define mfunname(string)
Definition: FunNameStack.h:67
#define mcerr
Definition: prstream.h:135
int vecerror
Definition: vec.cpp:31

Definition at line 52 of file vec.h.

◆ pvecerrorp

#define pvecerrorp (   string)
Value:
mfunnamep(string); \
if (vecerror != 0) { \
mcerr << "vecerror is not zero, program is terminated\n" \
<< " function detected error is " << string << '\n'; \
spexit(mcerr); \
}
#define mfunnamep(string)
Definition: FunNameStack.h:77

Definition at line 59 of file vec.h.

◆ vec_syscoor_index

#define vec_syscoor_index   0

Definition at line 559 of file vec.h.

Function Documentation

◆ operator<<() [1/8]

std::ostream & operator<< ( std::ostream &  file,
const abssyscoor s 
)

Definition at line 595 of file vec.cpp.

595 {
596 f.print(file, 2);
597 return file;
598}

◆ operator<<() [2/8]

std::ostream & operator<< ( std::ostream &  file,
const basis b 
)

Definition at line 455 of file vec.cpp.

509 {
510 Ifile << "basis: name=" << b.name << '\n';
511 indn.n += 2;
512 int indnsave = indn.n;
513 Ifile << "ex: ";
514 indn.n = 0;
515 file << b.ex;
516 indn.n = indnsave;
517 Ifile << "ey: ";
518 indn.n = 0;
519 file << b.ey;
520 indn.n = indnsave;
521 Ifile << "ez: ";
522 indn.n = 0;
523 file << b.ez;
524 indn.n = indnsave;
525 indn.n -= 2;
526 //file << '\n';
527 return file;
528}
vec ey
Definition: vec.h:399
String name
Definition: vec.h:412
vec ex
Definition: vec.h:399
vec ez
Definition: vec.h:399
indentation indn
Definition: prstream.cpp:13
#define Ifile
Definition: prstream.h:207

◆ operator<<() [3/8]

std::ostream & operator<< ( std::ostream &  file,
const basisReg v 
)

Definition at line 530 of file vec.cpp.

530 {
531 Ifile << "basisReg=" << ((basis&)b);
532 return file;
533}
Definition: vec.h:397

◆ operator<<() [4/8]

std::ostream & operator<< ( std::ostream &  file,
const fixsyscoor s 
)

Definition at line 633 of file vec.cpp.

633 {
634 Ifile << "fixsyscoor:\n";
635 f.RegPassivePtr::print(file, 2);
636 f.abssyscoor::print(file, 2);
637 return file;
638}

◆ operator<<() [5/8]

std::ostream & operator<< ( std::ostream &  file,
const point p 
)

Definition at line 530 of file vec.cpp.

557 {
558 Ifile << "point:\n";
559 indn.n += 2;
560 file << p.v;
561 indn.n -= 2;
562 return file;
563}
vec v
Definition: vec.h:479

◆ operator<<() [6/8]

std::ostream & operator<< ( std::ostream &  file,
const pointReg v 
)

Definition at line 565 of file vec.cpp.

565 {
566 Ifile << "pointReg=" << ((point&)b);
567 return file;
568}
Definition: vec.h:477

◆ operator<<() [7/8]

std::ostream & operator<< ( std::ostream &  file,
const vec v 
)

Definition at line 346 of file vec.cpp.

346 {
347 Ifile << "vector=" << std::setw(13) << v.x << std::setw(13) << v.y
348 << std::setw(13) << v.z;
349 file << '\n';
350 file.flush();
351 return file;
352}
vfloat y
Definition: vec.h:250
vfloat x
Definition: vec.h:250
vfloat z
Definition: vec.h:250

◆ operator<<() [8/8]

std::ostream & operator<< ( std::ostream &  file,
const vecReg v 
)

Definition at line 359 of file vec.cpp.

359 {
360 Ifile << "vecReg=" << ((vec&)v);
361 return file;
362}
Definition: vec.h:248

Variable Documentation

◆ dex

vec dex
extern

Referenced by basis::basis().

◆ dey

vec dey
extern

Referenced by basis::basis().

◆ dez

vec dez
extern

Referenced by basis::basis().

◆ dv0

vec dv0
extern

◆ vecerror