Skip to content

Commit 84f2631

Browse files
committed
Fix for runtime error
1 parent ab167a4 commit 84f2631

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

PWGUD/Core/decayTree.cxx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,12 @@ void resonance::Print()
217217
}
218218

219219
// -----------------------------------------------------------------------------
220-
// decayTree
220+
// decayTree
221+
decayTree::decayTree()
222+
{
223+
fPDG = TDatabasePDG::Instance();
224+
}
225+
221226
bool decayTree::init(std::string const& parFile, o2::framework::HistogramRegistry& registry)
222227
{
223228
// initialisation of constants

PWGUD/Core/decayTree.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ class decayTree
464464
{
465465
public:
466466
// constructor/destructor
467-
decayTree() {}
467+
decayTree();
468468
~decayTree() {}
469469

470470
// setters
@@ -524,7 +524,7 @@ class decayTree
524524

525525
// loop over resonances and compute
526526
reset();
527-
for (const auto& res : fResonances) {
527+
for (auto res : fResonances) {
528528
computeResonance(res, tracks, comb);
529529
}
530530

@@ -747,7 +747,7 @@ class decayTree
747747
// 2: ULS accepted
748748
// 3: LS accepted
749749
int fStatus;
750-
Service<o2::framework::O2DatabasePDG> fPDG;
750+
TDatabasePDG* fPDG;
751751

752752
// event requierements
753753
int fnTracksMin;
@@ -811,7 +811,7 @@ class decayTree
811811
// is this a final state or a resonance
812812
if (res->isFinal()) {
813813
// is a final
814-
TParticlePDG* pdgparticle = fPDG->GetParticle(res->pid());
814+
auto pdgparticle = fPDG->GetParticle(res->pid());
815815
auto track = (tracks.begin() + comb[res->counter()]);
816816
ivm.SetXYZM(track.px(), track.py(), track.pz(), pdgparticle->Mass());
817817
res->setIVM(ivm);

Tutorials/PWGUD/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,3 @@ o2physics_add_dpl_workflow(udtutorial-07
5353
SOURCES UDTutorial_07.cxx
5454
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
5555
COMPONENT_NAME Analysis)
56-
57-
58-
59-

0 commit comments

Comments
 (0)