Garfield++ 3.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 36 of file volume.cpp.

36 {
37 for (auto vol : eid) if (vol->Gavol() == avol) return 1;
38 return 0;
39}
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 31 of file volume.cpp.

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

◆ down_absref()

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

Definition at line 21 of file volume.cpp.

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

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()

◆ print()

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

Definition at line 54 of file volume.cpp.

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

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 41 of file volume.cpp.

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

Member Data Documentation

◆ eid


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