Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

LCDXML2G4InactiveVolume Class Reference

#include <LCDXML2G4InactiveVolume.hh>

Collaboration diagram for LCDXML2G4InactiveVolume:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LCDXML2G4InactiveVolume ()
 LCDXML2G4InactiveVolume (G4VPhysicalVolume *momvol, LCDG4MaterialMgr *matmgr, LCD_Document *detdb, std::map< G4LogicalVolume *, G4int > *m)
 ~LCDXML2G4InactiveVolume ()
void SetMotherVolume (G4VPhysicalVolume *momvol)
void SetMaterialMgr (LCDG4MaterialMgr *matmgr)
int SetGeom (LCD_Document *detdb)
void SetDetTypeMap (std::map< G4LogicalVolume *, G4int > *m)
int MakeInactiveVolume (const XERCES_CPP_NAMESPACE::DOM_Element &voldb)
int MakeShapeInactive (XERCES_CPP_NAMESPACE::DOM_Element shapeElt, const XERCES_CPP_NAMESPACE::DOMString &shapeName, bool reflected, char *volName)
bool GetInactiveMaterialName (XERCES_CPP_NAMESPACE::DOM_Element shapeElt, const XERCES_CPP_NAMESPACE::DOMString &shapeName, char *name, const int bufLen)

Private Attributes

G4VPhysicalVolume * m_momvol
LCDG4MaterialMgrm_matmgr
std::map< G4LogicalVolume *,
G4int > * 
m_pdettype

Constructor & Destructor Documentation

XERCES_CPP_NAMESPACE_USE LCDXML2G4InactiveVolume::LCDXML2G4InactiveVolume  ) 
 

Definition at line 34 of file LCDXML2G4InactiveVolume.cc.

References m_matmgr, m_momvol, and m_pdettype.

00034                                                  {
00035   m_momvol   =0;
00036   m_matmgr   =0;
00037   m_pdettype=0;
00038 }

LCDXML2G4InactiveVolume::LCDXML2G4InactiveVolume G4VPhysicalVolume *  momvol,
LCDG4MaterialMgr matmgr,
LCD_Document detdb,
std::map< G4LogicalVolume *, G4int > *  m
 

Definition at line 46 of file LCDXML2G4InactiveVolume.cc.

00047                                     {
00048   SetMotherVolume(momvol);
00049   SetMaterialMgr(matmgr);
00050   SetDetTypeMap(m);
00051   SetGeom(detDb);
00052 }

LCDXML2G4InactiveVolume::~LCDXML2G4InactiveVolume  ) 
 

Definition at line 58 of file LCDXML2G4InactiveVolume.cc.

00058                                                   {
00059 }


Member Function Documentation

bool LCDXML2G4InactiveVolume::GetInactiveMaterialName XERCES_CPP_NAMESPACE::DOM_Element  shapeElt,
const XERCES_CPP_NAMESPACE::DOMString &  shapeName,
char *  name,
const int  bufLen
 

int LCDXML2G4InactiveVolume::MakeInactiveVolume const XERCES_CPP_NAMESPACE::DOM_Element &  voldb  ) 
 

Referenced by SetGeom().

int LCDXML2G4InactiveVolume::MakeShapeInactive XERCES_CPP_NAMESPACE::DOM_Element  shapeElt,
const XERCES_CPP_NAMESPACE::DOMString &  shapeName,
bool  reflected,
char *  volName
 

void LCDXML2G4InactiveVolume::SetDetTypeMap std::map< G4LogicalVolume *, G4int > *  m  )  [inline]
 

Definition at line 32 of file LCDXML2G4InactiveVolume.hh.

References m_pdettype.

00032 { m_pdettype=m; }

int LCDXML2G4InactiveVolume::SetGeom LCD_Document detdb  ) 
 

Definition at line 66 of file LCDXML2G4InactiveVolume.cc.

References LCD_Document::eltPresent(), LCD_DocumentUtil::firstDesc(), LCD_Document::getDocument(), LCD_Document::getElement(), m_matmgr, m_momvol, and MakeInactiveVolume().

00066                                                         {
00067   // Make InactiveVolume detector geometry
00068   int iret=0;
00069 
00070   // Check MotherVolume , Material Manager and detDB were set?
00071   if (m_momvol == 0) {
00072     fprintf(stderr,
00073             "LCDXML2G4InactiveVolume::SetGeom Error!!! MotherVolume was not set!!!\n");
00074   }
00075   if (m_matmgr == 0) {
00076     fprintf(stderr,
00077             "LCDXML2G4InactiveVolume::SetGeom Error!!! MaterialMgr was not set!!!\n");
00078   }
00079   if (detDb == 0) {
00080     fprintf(stderr,
00081             "LCDXML2G4InactiveVolume::SetGeom Error!!! detDb was not set!!!\n");
00082   }
00083   if (m_momvol == 0 || m_matmgr == 0 || detDb == 0) {
00084     return iret;
00085   }
00086 
00087 
00088   DOM_Element  docElt = detDb->getDocument().getDocumentElement();
00089   DOM_NodeList volList = docElt.getElementsByTagName(DOMString("volume"));
00090   int          listLen = volList.getLength();
00091   DOM_Element  vol;
00092   DOM_Element  child;
00093 
00094   int          ix;
00095   for(ix = 0; ix < listLen; ix++) {
00096     vol = (const DOM_Element &) volList.item(ix);
00097     // Check if it has child with tagname support
00098     child = LCD_DocumentUtil::firstDesc(vol, DOMString("support"));
00099     if (child != DOM_Element()) {
00100       MakeInactiveVolume(vol);
00101     }
00102   }
00103 
00104   // Coil
00105   if (detDb->eltPresent("COIL")) {
00106     vol =detDb->getElement(DOMString("COIL"), DOMString("volume"));
00107     MakeInactiveVolume(vol);
00108   }
00109 
00110   return iret;
00111 }

void LCDXML2G4InactiveVolume::SetMaterialMgr LCDG4MaterialMgr matmgr  )  [inline]
 

Definition at line 30 of file LCDXML2G4InactiveVolume.hh.

References m_matmgr.

00030 { m_matmgr = matmgr; }

void LCDXML2G4InactiveVolume::SetMotherVolume G4VPhysicalVolume *  momvol  )  [inline]
 

Definition at line 29 of file LCDXML2G4InactiveVolume.hh.

References m_momvol.

00029 { m_momvol = momvol; }


Member Data Documentation

LCDG4MaterialMgr* LCDXML2G4InactiveVolume::m_matmgr [private]
 

Definition at line 53 of file LCDXML2G4InactiveVolume.hh.

Referenced by LCDXML2G4InactiveVolume(), SetGeom(), and SetMaterialMgr().

G4VPhysicalVolume* LCDXML2G4InactiveVolume::m_momvol [private]
 

Definition at line 52 of file LCDXML2G4InactiveVolume.hh.

Referenced by LCDXML2G4InactiveVolume(), SetGeom(), and SetMotherVolume().

std::map<G4LogicalVolume*,G4int>* LCDXML2G4InactiveVolume::m_pdettype [private]
 

Definition at line 54 of file LCDXML2G4InactiveVolume.hh.

Referenced by LCDXML2G4InactiveVolume(), and SetDetTypeMap().


The documentation for this class was generated from the following files:
Generated on Thu Oct 7 18:45:08 2004 for LCDG4 by doxygen 1.3.4