Skip to content
Snippets Groups Projects
Commit 5f02c026 authored by Olivier Couet's avatar Olivier Couet
Browse files

- initialize members (coverity)

git-svn-id: http://root.cern.ch/svn/root/trunk@31811 27541ba8-7e3a-0410-8455-c3a389f83636
parent 89e970d6
No related branches found
No related tags found
No related merge requests found
......@@ -22,20 +22,22 @@ ClassImp(TMaterial)
//______________________________________________________________________________
TMaterial::TMaterial()
{
//*-*-*-*-*-*-*-*-*-*-*Material default constructor*-*-*-*-*-*-*-*-*-*-*-*
//*-* ============================
// Material default constructor.
//do nothing
fA = 0;
fDensity = 0;
fInterLength = 0;
fNumber = 0;
fRadLength = 0;
fZ = 0;
}
//______________________________________________________________________________
TMaterial::TMaterial(const char *name, const char *title, Float_t a, Float_t z, Float_t density)
:TNamed(name,title), TAttFill(0,1)
{
//*-*-*-*-*-*-*-*-*-*-*Material normal constructor*-*-*-*-*-*-*-*-*-*-*-*-*
//*-* ============================
// Material normal constructor.
if (!gGeometry) gGeometry = new TGeometry("Geometry","Default Geometry");
fA = a;
......@@ -48,13 +50,11 @@ TMaterial::TMaterial(const char *name, const char *title, Float_t a, Float_t z,
}
//______________________________________________________________________________
TMaterial::TMaterial(const char *name, const char *title, Float_t a, Float_t z, Float_t density, Float_t radl, Float_t inter)
:TNamed(name,title), TAttFill(0,1)
{
//*-*-*-*-*-*-*-*-*-*-*Material normal constructor*-*-*-*-*-*-*-*-*-*-*-*-*
//*-* ============================
// Material normal constructor.
if (!gGeometry) gGeometry = new TGeometry("Geometry","Default Geometry");
fA = a;
......@@ -70,13 +70,13 @@ TMaterial::TMaterial(const char *name, const char *title, Float_t a, Float_t z,
//______________________________________________________________________________
TMaterial::~TMaterial()
{
//*-*-*-*-*-*-*-*-*-*-*Material default destructor*-*-*-*-*-*-*-*-*-*-*-*-*
//*-* ============================
// Material default destructor.
if (gGeometry) gGeometry->GetListOfMaterials()->Remove(this);
}
//______________________________________________________________________________
void TMaterial::Streamer(TBuffer &R__b)
{
......
......@@ -19,40 +19,38 @@ ClassImp(TMixture)
// Manages a detector mixture. See class TGeometry.
//
//______________________________________________________________________________
TMixture::TMixture()
{
//*-*-*-*-*-*-*-*-*-*-*Mixture default constructor*-*-*-*-*-*-*-*-*-*-*-*
//*-* ============================
// Mixture default constructor.
fAmixt = 0;
fZmixt = 0;
fWmixt = 0;
fNmixt = 0;
}
//______________________________________________________________________________
TMixture::TMixture(const char *name, const char *title, Int_t nmixt)
:TMaterial(name,title,0,0,0)
{
//*-*-*-*-*-*-*-*-*-*-*Mixture normal constructor*-*-*-*-*-*-*-*-*-*-*-*-*
//*-* ============================
//*-*
//*-* Defines mixture OR COMPOUND as composed by
//*-* the basic nmixt materials defined later by DefineElement.
//*-*
//*-* If nmixt > 0 then Wmixt contains the PROPORTION BY WEIGHTS
//*-* of each basic material in the mixture.
//*-*
//*-* If nmixt < 0 then Wmixt contains the number of atoms
//*-* of a given kind into the molecule of the COMPOUND
//*-* In this case, Wmixt is changed to relative weights. *
//*-*
//*-* nb : the radiation length is computed according
//*-* the EGS manual slac-210 uc-32 June-78
//*-* formula 2-6-8 (37)
//*-*
//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
// Mixture normal constructor
//
// Defines mixture OR COMPOUND as composed by
// the basic nmixt materials defined later by DefineElement.
//
// If nmixt > 0 then Wmixt contains the PROPORTION BY WEIGHTS
// of each basic material in the mixture.
//
// If nmixt < 0 then Wmixt contains the number of atoms
// of a given kind into the molecule of the COMPOUND
// In this case, Wmixt is changed to relative weights.
//
// nb : the radiation length is computed according
// the EGS manual slac-210 uc-32 June-78
// formula 2-6-8 (37)
if (nmixt == 0) {
fAmixt = 0;
......@@ -73,8 +71,7 @@ TMixture::TMixture(const char *name, const char *title, Int_t nmixt)
//______________________________________________________________________________
TMixture::~TMixture()
{
//*-*-*-*-*-*-*-*-*-*-*Mixture default destructor*-*-*-*-*-*-*-*-*-*-*-*-*
//*-* ============================
// Mixture default destructor.
delete [] fAmixt;
delete [] fZmixt;
......@@ -84,11 +81,11 @@ TMixture::~TMixture()
fWmixt = 0;
}
//______________________________________________________________________________
void TMixture::DefineElement(Int_t n, Float_t a, Float_t z, Float_t w)
{
//*-*-*-*-*-*-*-*-*-*-*Define one mixture element*-*-*-*-*-*-*-*-*-*-*-*-*-*
//*-* ==========================
// Define one mixture element.
if (n < 0 || n >= TMath::Abs(fNmixt)) return;
fAmixt[n] = a;
......@@ -96,11 +93,12 @@ void TMixture::DefineElement(Int_t n, Float_t a, Float_t z, Float_t w)
fWmixt[n] = w;
}
//_______________________________________________________________________
//______________________________________________________________________________
void TMixture::Streamer(TBuffer &b)
{
//*-*-*-*-*-*-*-*-*Stream a class object*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
//*-* =========================================
// Stream a class object.
UInt_t R__s, R__c;
if (b.IsReading()) {
b.ReadVersion(&R__s, &R__c);
......@@ -125,4 +123,3 @@ void TMixture::Streamer(TBuffer &b)
b.SetByteCount(R__c, kTRUE);
}
}
......@@ -65,6 +65,7 @@ TNode::TNode()
fShape = 0;
fNodes = 0;
fVisibility = 1;
fX = fY = fZ = 0;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment