// if(trackTPC->GetTPCNclsIter1()<fCutsRC->GetMinNClustersTPC()) continue;
tpcTrack2 = AliESDtrackCuts::GetTPCOnlyTrack(esdEvent, jTrack);
if(!tpcTrack2) continue;
- if(!tpcTrack2->RelateToVertex(vtxESD,esdEvent->GetMagneticField(),100.)) { delete tpcTrack2; continue; }
+ if(!tpcTrack2->RelateToVertex(vtxESD,esdEvent->GetMagneticField(),100.)) { delete tpcTrack2; tpcTrack2=0; continue; }
- if(!fCutsRC->AcceptTrack(tpcTrack2)) { delete tpcTrack2; continue; }
+ if(!fCutsRC->AcceptTrack(tpcTrack2)) { delete tpcTrack2; tpcTrack2=0; continue; }
// check matching
- if (TMath::Abs(esdTrack->GetY() - tpcTrack2->GetY()) > 3) { delete tpcTrack2; continue; }
- if (TMath::Abs(esdTrack->GetSnp() - tpcTrack2->GetSnp()) > 0.2) { delete tpcTrack2; continue; }
- if (TMath::Abs(esdTrack->GetTgl() - tpcTrack2->GetTgl()) > 0.2) { delete tpcTrack2; continue; }
+ if (TMath::Abs(esdTrack->GetY() - tpcTrack2->GetY()) > 3) { delete tpcTrack2; tpcTrack2=0; continue; }
+ if (TMath::Abs(esdTrack->GetSnp() - tpcTrack2->GetSnp()) > 0.2) { delete tpcTrack2; tpcTrack2=0; continue; }
+ if (TMath::Abs(esdTrack->GetTgl() - tpcTrack2->GetTgl()) > 0.2) { delete tpcTrack2; tpcTrack2=0; continue; }
hasMatch=kTRUE;
break;
}
FillHistograms(tpcTrack2,esdTrack,hasMatch);
- /* if(tpcTrack2) {
- delete tpcTrack2;
-
- }*/
+ delete tpcTrack2;
}
//_____________________________________________________________________________
AliLog* AliLog::fgInstance = NULL;
Bool_t AliLog::fgDebugEnabled = kTRUE;
+Bool_t AliLog::fgCoreEnabled = kFALSE;
/**
* get root logger singleton instance
fgDebugEnabled = enabled;
}
+void AliLog::EnableCoreDump(Bool_t enabled)
+{
+// enable or disable debug output
+
+ fgCoreEnabled = enabled;
+ gSystem->ResetSignal(kSigFloatingException,enabled);
+ gSystem->ResetSignal(kSigSegmentationViolation,enabled);
+
+
+}
+
+
+
//_____________________________________________________________________________
void AliLog::SetGlobalLogLevel(EType_t type)
{
delete fgInstance;
if (gSystem) {
gSystem->StackTrace();
+ if (fgCoreEnabled) MakeCoreDump("core.AliRoot");
gSystem->Abort();
} else {
+ if (fgCoreEnabled) MakeCoreDump("core.AliRoot");
::abort();
}
}
}
+
+
//_____________________________________________________________________________
void AliLog::Debug(UInt_t level, const char* message,
const char* module, const char* className,
}
va_end(ap);
}
+
+
+void AliLog::MakeCoreDump(const char *fout){
+ //
+ // Functionality to make a program snapshot
+ // gcore - Generate a core file for a running process
+ // gcore dmake a current snapshot, program can continue further
+ // We assum that gcore is installed
+ // for details see: man gcore
+ //
+ // Example use - make default core file for current process: AliLog::MakeCoreDump(0)
+ //
+ //
+ // Automatic core dump creation in case of the AliFatal can be specified using
+ // static void EnableCoreDump(Bool_t enabled);
+ // Core dump is created in addition to the stack trace ()
+ // marian.ivanov@cern.ch
+ //
+ if (!gSystem) return;
+ printf("AliLog::MakeCoreDump\n");
+ if (fout){
+ gSystem->Exec(Form("gcore -o %s %d",fout, gSystem->GetPid()));
+ }else{
+ gSystem->Exec(Form("gcore %d", gSystem->GetPid()));
+ }
+}
static AliLog *GetRootLogger();
// delete root logger singleton instance
- static void DeleteRootLogger();
+ static void DeleteRootLogger();
// NB: the following functions should not be static
// NB: deprecated: logging configuration should be made through to a configuration file
+ static void EnableCoreDump(Bool_t enabled);
+ static void MakeCoreDump(const char *fout);
static void EnableDebug(Bool_t enabled);
static void SetGlobalLogLevel(EType_t type);
static Int_t GetGlobalLogLevel();
static AliLog* fgInstance; //! pointer to current instance
static Bool_t fgDebugEnabled; // flag for debug en-/disabling
+ static Bool_t fgCoreEnabled; // flag for core dump en-/disabling
UInt_t fGlobalLogLevel; // global logging level
TObjArray fModuleDebugLevels; // debug levels for modules