ATLAS Offline Software
ValidationBarcodeSvc.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef BARCODESERVICES_VALIDATIONBARCODESVC_H
6 #define BARCODESERVICES_VALIDATIONBARCODESVC_H 1
7 
8 // STL includes
9 #include <string>
10 
11 // FrameWork includes
12 #include "GaudiKernel/IIncidentListener.h"
13 #include "GaudiKernel/ServiceHandle.h"
15 
16 //include
18 
19 class IIncidentSvc;
20 
21 
22 namespace Barcode {
23 
32  class ValidationBarcodeSvc : public extends<AthService, IBarcodeSvc, IIncidentListener> {
33  public:
34 
36  ValidationBarcodeSvc( const std::string& name, ISvcLocator* pSvcLocator );
37 
39  virtual ~ValidationBarcodeSvc();
40 
42  virtual StatusCode initialize() override;
43  virtual StatusCode finalize() override;
44 
46  virtual void handle(const Incident& inc) override;
47 
50  virtual int newSimulationVertex() override;
51 
54  virtual int newSecondaryParticle( int parentBC=HepMC::UNDEFINED_ID ) override;
55 
57  virtual int newGeneratedParticle(int parentBC=HepMC::UNDEFINED_ID ) override;
58 
60  virtual int newGeneratedVertex() override;
61 
63  virtual int secondaryParticleBcOffset() const override;
64  virtual int secondaryVertexBcOffset() const override;
65 
68  virtual void registerLargestGeneratedParticleBC( int ) override {};
69  virtual void registerLargestGeneratedVtxBC( int ) override {};
70  virtual void registerLargestSecondaryParticleBC( int ) override {};
71  virtual void registerLargestSimulationVtxBC( int ) override {};
72 
73  private:
75 
80 
85 
89 
90  };
91 
92 
93 } // end 'Barcode' namespace
94 
95 #endif //> !BARCODESERVICES_VALIDATIONBARCODESVC_H
Barcode
Definition: IBarcodeSvc.h:17
Barcode::ValidationBarcodeSvc::registerLargestSimulationVtxBC
virtual void registerLargestSimulationVtxBC(int) override
Definition: ValidationBarcodeSvc.h:71
Barcode::ValidationBarcodeSvc::m_currentSecondary
int m_currentSecondary
Definition: ValidationBarcodeSvc.h:84
Barcode::ValidationBarcodeSvc::m_vertexIncrement
int m_vertexIncrement
Definition: ValidationBarcodeSvc.h:78
Barcode::ValidationBarcodeSvc
Definition: ValidationBarcodeSvc.h:32
Barcode::ValidationBarcodeSvc::secondaryVertexBcOffset
virtual int secondaryVertexBcOffset() const override
Return the secondary vertex offset.
Definition: ValidationBarcodeSvc.cxx:129
Barcode::ValidationBarcodeSvc::newSimulationVertex
virtual int newSimulationVertex() override
Generate a new unique vertex barcode, based on the parent particle barcode and the physics process co...
Definition: ValidationBarcodeSvc.cxx:51
Barcode::ValidationBarcodeSvc::m_incidentSvc
ServiceHandle< IIncidentSvc > m_incidentSvc
IncidentSvc to catch begin of event and end of envent.
Definition: ValidationBarcodeSvc.h:71
Barcode::ValidationBarcodeSvc::secondaryParticleBcOffset
virtual int secondaryParticleBcOffset() const override
Return the secondary particle and vertex offsets.
Definition: ValidationBarcodeSvc.cxx:122
Barcode::ValidationBarcodeSvc::m_currentVertex
int m_currentVertex
Definition: ValidationBarcodeSvc.h:79
Barcode::ValidationBarcodeSvc::registerLargestGeneratedVtxBC
virtual void registerLargestGeneratedVtxBC(int) override
Definition: ValidationBarcodeSvc.h:69
Barcode::ValidationBarcodeSvc::ValidationBarcodeSvc
ValidationBarcodeSvc(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters.
Definition: ValidationBarcodeSvc.cxx:12
Barcode::ValidationBarcodeSvc::m_firstVertex
int m_firstVertex
barcode information used for GenVertices
Definition: ValidationBarcodeSvc.h:77
Barcode::ValidationBarcodeSvc::m_secondaryIncrement
int m_secondaryIncrement
Definition: ValidationBarcodeSvc.h:83
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
IBarcodeSvc.h
Barcode::ValidationBarcodeSvc::m_firstSecondary
int m_firstSecondary
barcode information used for secondary GenParticles
Definition: ValidationBarcodeSvc.h:82
Barcode::ValidationBarcodeSvc::newGeneratedVertex
virtual int newGeneratedVertex() override
Generate a new unique vertex barcode below the simulation offset.
Definition: ValidationBarcodeSvc.cxx:106
Barcode::ValidationBarcodeSvc::m_barcodeGenerationOffset
int m_barcodeGenerationOffset
not sure why this is needed...
Definition: ValidationBarcodeSvc.h:88
Barcode::ValidationBarcodeSvc::registerLargestGeneratedParticleBC
virtual void registerLargestGeneratedParticleBC(int) override
Inform the BarcodeSvc about the largest particle and vertex Barcodes in the event input.
Definition: ValidationBarcodeSvc.h:68
HepMC::UNDEFINED_ID
constexpr int UNDEFINED_ID
Definition: MagicNumbers.h:56
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
Barcode::ValidationBarcodeSvc::initialize
virtual StatusCode initialize() override
Athena algorithm's interface methods.
Definition: ValidationBarcodeSvc.cxx:36
Barcode::ValidationBarcodeSvc::newSecondaryParticle
virtual int newSecondaryParticle(int parentBC=HepMC::UNDEFINED_ID) override
Generate a new unique barcode for a secondary particle, based on the parent particle barcode.
Definition: ValidationBarcodeSvc.cxx:68
Barcode::ValidationBarcodeSvc::finalize
virtual StatusCode finalize() override
framework methods
Definition: ValidationBarcodeSvc.cxx:148
Barcode::ValidationBarcodeSvc::~ValidationBarcodeSvc
virtual ~ValidationBarcodeSvc()
Destructor.
Definition: ValidationBarcodeSvc.cxx:31
Barcode::ValidationBarcodeSvc::m_particleGenerationIncrement
int m_particleGenerationIncrement
barcode offset for each generation of updated particles
Definition: ValidationBarcodeSvc.h:87
AthService.h
Barcode::ValidationBarcodeSvc::newGeneratedParticle
virtual int newGeneratedParticle(int parentBC=HepMC::UNDEFINED_ID) override
Generate a new unique particle barcode below the simulation offset (for particles from pre-defined de...
Definition: ValidationBarcodeSvc.cxx:87
Barcode::ValidationBarcodeSvc::handle
virtual void handle(const Incident &inc) override
Incident to reset the barcodes at the beginning of the event.
Definition: ValidationBarcodeSvc.cxx:136
Barcode::ValidationBarcodeSvc::registerLargestSecondaryParticleBC
virtual void registerLargestSecondaryParticleBC(int) override
Definition: ValidationBarcodeSvc.h:70
ServiceHandle< IIncidentSvc >