25 ATH_MSG_DEBUG(
"LegacyBarcodeSvc start of initialize in thread ID: " << std::this_thread::get_id() );
30 return StatusCode::SUCCESS;
35 static std::mutex barcodeMutex;
36 std::lock_guard<std::mutex> barcodeLock(barcodeMutex);
41 const auto tid = std::this_thread::get_id();
46 ATH_MSG_DEBUG(
"initializeBarcodes: initialized new barcodes for thread ID " << tid );
48 ATH_MSG_DEBUG(
"initializeBarcodes: reset new barcodes for thread ID " << tid );
50 ATH_MSG_ERROR(
"initializeBarcodes: failed to initialize new barcode for thread ID " << tid );
53 ATH_MSG_DEBUG(
"initializeBarcodes: barcodes for this thread ID found, did not construct new" );
55 ATH_MSG_DEBUG(
"initializeBarcodes: reset existing barcodes for thread ID " << tid );
57 return StatusCode::SUCCESS;
62 const auto tid = std::this_thread::get_id();
65 ATH_MSG_WARNING(
"getBarcodeInfo: failed to find BarcodeInfo for thread ID " << tid <<
", created a new one." );
70 return bcPair->second;
72 ATH_MSG_ERROR (
"getBarcodeInfo: could not add a the new BarcodeInfo object to the map!" );
75 return bcPair->second;
89 <<
" will return a vertex barcode greater than "
110 <<
" will return a particle barcode of less than "
131 <<
" will return a vertex barcode greater than 0: "
139 <<
" will return a vertex barcode below "
158 <<
" will return a particle barcode of less than 0: "
166 <<
" will return a particle barcode below "
176 ATH_MSG_DEBUG(
"registering largest generated particle barcode" );
183 ATH_MSG_DEBUG(
"registering largest generated particle barcode" );
218 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
BarcodeInfo & getBarcodeInfo()
virtual void registerLargestGeneratedParticleBC(int bc) override
Inform the BarcodeSvc about the largest particle and vertex Barcodes in the event input.
virtual int secondaryParticleBcOffset() const override
Return the secondary particle and vertex offsets.
virtual StatusCode initialize() override
Athena algorithm's interface methods.
int m_firstVertex
barcode information used for GenVertices
virtual void registerLargestGeneratedVtxBC(int bc) override
virtual int newGeneratedVertex() override
Generate a new unique vertex barcode below the simulation offset.
virtual StatusCode resetBarcodes(int largestGeneratedParticleBC=0, int largestGeneratedVertexBC=0) override
Reset barcodes.
LegacyBarcodeSvc(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters.
virtual int newSecondaryParticle(int) override
Generate a new unique barcode for a secondary particle above the simulation offset.
virtual StatusCode initializeBarcodes(int largestGeneratedParticleBC=0, int largestGeneratedVertexBC=0) override
Construct and insert a new set of barcode members.
virtual int secondaryVertexBcOffset() const override
Return the secondary vertex offset.
virtual void registerLargestSimulationVtxBC(int bc) override
int m_firstSecondary
barcode information used for secondary GenParticles
virtual void registerLargestSecondaryParticleBC(int bc) override
virtual int newSimulationVertex() override
Generate a new unique vertex barcode above the simulation offset.
LegacyBarcodeSvcThreadMap_t m_bcThreadMap
virtual int newGeneratedParticle(int) override
Generate a new unique particle barcode below the simulation offset (for particles from pre-defined de...
constexpr int UNDEFINED_ID
constexpr int SIM_BARCODE_THRESHOLD
Constant defining the barcode threshold for simulated particles, eg. can be used to separate generato...
int currentGeneratedVertex
int currentSimulationVertex
int currentSecondaryParticle
int currentGeneratedParticle