Garfield++ 4.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
Heed::manip_absvol_treeid Class Reference

Service class (array of manip_absvol). More...

#include <volume.h>

Public Member Functions

 manip_absvol_treeid ()
 Constructor.
 
manip_absvolG_lamvol () const
 Get last address of manipulator.
 
absvolG_lavol () const
 Get last address of volume.
 
void down_absref (absref *f)
 
void up_absref (absref *f)
 
int check_manip_absvol_registered (manip_absvol *amvol)
 
int check_absvol_registered (absvol *avol)
 
void print (std::ostream &file, int l) const
 

Public Attributes

std::vector< manip_absvol * > eid
 List of volumes.
 

Friends

int operator== (manip_absvol_treeid &tid1, manip_absvol_treeid &tid2)
 
int operator!= (manip_absvol_treeid &tid1, manip_absvol_treeid &tid2)
 

Detailed Description

Service class (array of manip_absvol).

Definition at line 32 of file volume.h.

Constructor & Destructor Documentation

◆ manip_absvol_treeid()

Heed::manip_absvol_treeid::manip_absvol_treeid ( )
inline

Constructor.

Definition at line 35 of file volume.h.

35{}

Member Function Documentation

◆ check_absvol_registered()

int Heed::manip_absvol_treeid::check_absvol_registered ( absvol avol)

Definition at line 37 of file volume.cpp.

37 {
38 for (auto vol : eid) if (vol->Gavol() == avol) return 1;
39 return 0;
40}
std::vector< manip_absvol * > eid
List of volumes.
Definition: volume.h:37

◆ check_manip_absvol_registered()

int Heed::manip_absvol_treeid::check_manip_absvol_registered ( manip_absvol amvol)

Definition at line 32 of file volume.cpp.

32 {
33 for (auto vol : eid) if (vol == amvol) return 1;
34 return 0;
35}

◆ down_absref()

void Heed::manip_absvol_treeid::down_absref ( absref f)

Definition at line 22 of file volume.cpp.

22 {
23 const int qeid = eid.size();
24 for (int n = qeid - 1; n >= 1; n--) eid[n]->down_absref(f);
25}
void down_absref(absref *f)
Definition: volume.cpp:22

Referenced by down_absref(), and Heed::stvpoint::stvpoint().

◆ G_lamvol()

manip_absvol * Heed::manip_absvol_treeid::G_lamvol ( ) const
inline

Get last address of manipulator.

Definition at line 39 of file volume.h.

39 {
40 return eid.empty() ? nullptr : eid.back();
41 }

◆ G_lavol()

absvol * Heed::manip_absvol_treeid::G_lavol ( ) const

Get last address of volume.

Definition at line 18 of file volume.cpp.

18 {
19 return eid.empty() ? nullptr : eid.back()->Gavol();
20}

Referenced by Heed::stvpoint::volume().

◆ print()

void Heed::manip_absvol_treeid::print ( std::ostream &  file,
int  l 
) const

Definition at line 55 of file volume.cpp.

55 {
56 if (l < 0) return;
57 if (eid.empty()) {
58 Ifile << "no volume defined\n";
59 } else {
60 // TODO!
61 /*
62 const int qeid = eid.size();
63 if (l > 0) {
64 for (int n = 0; n < qeid - 1; ++n) {
65 Ifile << "n=" << n;
66 eid[n]->print(file, 0);
67 }
68 }
69 Ifile << "n=" << qeid - 1;
70 eid.back()->print(file, 0);
71 */
72 }
73 file.flush();
74}
#define Ifile
Definition: prstream.h:195

Referenced by Heed::stvpoint::print().

◆ up_absref()

void Heed::manip_absvol_treeid::up_absref ( absref f)

Friends And Related Function Documentation

◆ operator!=

int operator!= ( manip_absvol_treeid tid1,
manip_absvol_treeid tid2 
)
friend

Definition at line 61 of file volume.h.

61 {
62 if (tid1 == tid2) return 0;
63 return 1;
64}

◆ operator==

int operator== ( manip_absvol_treeid tid1,
manip_absvol_treeid tid2 
)
friend

Definition at line 42 of file volume.cpp.

42 {
43 // First a quick check.
44 if (tid1.eid.size() != tid2.eid.size()) return 0;
45 // Check the last volume.
46 if (tid1.G_lamvol() != tid2.G_lamvol()) return 0;
47 // Check all volumes.
48 const int qeid = tid1.eid.size();
49 for (int n = 0; n < qeid - 1; ++n) {
50 if (tid1.eid[n] != tid2.eid[n]) return 0;
51 }
52 return 1;
53}

Member Data Documentation

◆ eid


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