#ifndef ROOT_TGeoElement
#define ROOT_TGeoElement
#ifndef ROOT_TNamed
#include "TNamed.h"
#endif
#ifndef ROOT_TObjArray
#include "TObjArray.h"
#endif
class TGeoElementTable;
class TGeoElement : public TNamed
{
enum EGeoElement {
kElemUsed = BIT(17),
kElemDefined = BIT(18)
};
protected:
Int_t fZ;
Double_t fA;
public:
TGeoElement();
TGeoElement(const char *name, const char *title, Int_t z, Double_t a);
virtual ~TGeoElement() {;}
Int_t Z() const {return fZ;}
Double_t A() const {return fA;}
Bool_t IsDefined() const {return TObject::TestBit(kElemDefined);}
Bool_t IsUsed() const {return TObject::TestBit(kElemUsed);}
void SetDefined(Bool_t flag=kTRUE) {TObject::SetBit(kElemDefined,flag);}
void SetUsed(Bool_t flag=kTRUE) {TObject::SetBit(kElemUsed,flag);}
TGeoElementTable *GetElementTable() const;
ClassDef(TGeoElement, 1)
};
class TGeoElementTable : public TObject
{
private:
Int_t fNelements;
TObjArray *fList;
void BuildDefaultElements();
protected:
TGeoElementTable(const TGeoElementTable&);
TGeoElementTable& operator=(const TGeoElementTable&);
public:
TGeoElementTable();
TGeoElementTable(Int_t nelements);
virtual ~TGeoElementTable();
void AddElement(const char *name, const char *title, Int_t z, Double_t a);
TGeoElement *FindElement(const char *name);
TGeoElement *GetElement(Int_t z) {return (TGeoElement*)fList->At(z);}
Int_t GetNelements() const {return fNelements;}
ClassDef(TGeoElementTable, 2)
};
#endif
ROOT page - Class index - Class Hierarchy - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.