* provided "as is" without express or implied warranty. *
**************************************************************************/
-/* $Header$ */
+/* $Id$ */
///////////////////////////////////////////////////////////////////////////////
// //
#include <TList.h>
#include <TLorentzVector.h>
#include <TMath.h>
-#include <TMath.h>
#include <TObjArray.h>
-#include <TPad.h>
#include <TPaveLabel.h>
#include <TROOT.h>
+#include <TVirtualMC.h>
+#include "AliLog.h"
+#include "AliMC.h"
#include "AliMCQA.h"
#include "AliModule.h"
#include "AliRun.h"
//
// Build list of volume names
//
+ AliMC * mc = gAlice->GetMCApp();
for(i=0;i<fNvolumes;++i) {
AliModule *mod = dynamic_cast<AliModule*>
- ((*gAlice->Modules())[gAlice->DetFromMate(gMC->VolId2Mate(i+1))]);
+ ((*gAlice->Modules())[mc->DetFromMate(gMC->VolId2Mate(i+1))]);
(*fVolNames)[i]=new TNamed(gMC->VolName(i+1),mod->GetName());
}
}
//_______________________________________________________________________
-void AliMCQA::Copy(AliMCQA &) const
+void AliMCQA::Copy(TObject &) const
{
- Fatal("Copy ctor","Not implemented!\n");
+ AliFatal("Not implemented!");
}
//_______________________________________________________________________
AliMCQA::~AliMCQA()
-{
+ {
//
// Destructor
//
gROOT->GetListOfBrowsables()->Remove(this);
+ //if program crashes here - it probobly means that
+ //one of added browsables was deleted and not removed previously from that list
+ //skowron
+
if (fQAList) {
fQAList->Delete();
delete fQAList;
- fQAList=0;
+ fQAList = 0;
}
if (fQAHist) {
fQAHist->Delete();
delete fQAHist;
- fQAHist=0;
+ fQAHist = 0;
}
if (fVolNames) {
fVolNames->Delete();
delete fVolNames;
- fVolNames=0;
+ fVolNames = 0;
}
if (fModNames) {
fModNames->Delete();
delete fModNames;
- fModNames=0;
+ fModNames = 0;
}
delete [] fDetDone;
delete fMPaveLabel;
static Double_t mpim=0;
static Double_t mep=0;
static Double_t mem=0;
- Double_t mass=0;
+ Double_t mass = 0;
Int_t num = gMC->TrackPid();
switch (num) {
mass=mem;
break;
default:
- mass =gAlice->PDGDB()->GetParticle(num)->Mass();
+ if (gAlice->PDGDB()->GetParticle(num))
+ mass = gAlice->PDGDB()->GetParticle(num)->Mass();
break;
}