The Gaudi Framework  master (37c0b60a)
PartPropExa.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #ifndef GAUDIEXAMPLES_PARTPROPEXA_H
12 #define GAUDIEXAMPLES_PARTPROPEXA_H 1
13 
14 #include <GaudiKernel/Algorithm.h>
16 #if HEPPDT_VERSION_MAJOR == 2
17 # include <HepPDT/CommonParticleData.hh>
18 #endif
19 #if HEPPDT_VERSION_MAJOR == 3
20 # include <HepPDT/ParticleData.hh>
21 namespace HepPDT {
22  using CommonParticleData = ParticleData;
23 }
24 #endif
25 #include <HepPDT/ProcessUnknownID.hh>
26 
27 class IPartPropSvc;
28 
29 class PartPropExa : public Algorithm {
30 
31 public:
33  StatusCode initialize() override;
34  StatusCode execute() override;
35 
36 private:
37  ServiceHandle<IPartPropSvc> m_pps{ this, "PartPropSvc", "PartPropSvc" };
38 };
39 
40 namespace HepPDT {
41  class TestUnknownID : public ProcessUnknownID {
42  public:
43  TestUnknownID() = default;
44 
45  CommonParticleData* processUnknownID( ParticleID, const ParticleDataTable& pdt ) override;
46  };
47 } // namespace HepPDT
48 
49 #endif // GAUDIEXAMPLES_PARTPROPEXA_H
PartPropExa::execute
StatusCode execute() override
Definition: PartPropExa.cpp:52
PartPropExa::initialize
StatusCode initialize() override
Definition: PartPropExa.cpp:26
IPartPropSvc
Definition: IPartPropSvc.h:30
ParticleID
Definition: ParticleID.py:1
ServiceHandle< IPartPropSvc >
Algorithm
Alias for backward compatibility.
Definition: Algorithm.h:58
Algorithm.h
ServiceHandle.h
HepPDT::TestUnknownID::processUnknownID
CommonParticleData * processUnknownID(ParticleID, const ParticleDataTable &pdt) override
Definition: PartPropExa.cpp:58
HepPDT
Definition: IPartPropSvc.h:18
StatusCode
Definition: StatusCode.h:65
HepPDT::TestUnknownID::TestUnknownID
TestUnknownID()=default
HepPDT::TestUnknownID
Definition: PartPropExa.h:41
Gaudi::Algorithm::Algorithm
Algorithm(std::string name, ISvcLocator *svcloc, std::string version=PACKAGE_VERSION)
Constructor.
Definition: Algorithm.h:101
PartPropExa
Definition: PartPropExa.h:29
PartPropExa::m_pps
ServiceHandle< IPartPropSvc > m_pps
Definition: PartPropExa.h:37