#include <LegacyBarcodeSvc.h>
This BarcodeService reproduces the barcode treatmend for MC12: http://acode-browser.usatlas.bnl.gov/lxr/source/atlas/Simulation/G4Sim/MCTruth/src/TruthStrategyManager.cxx
- Author
- Andreas.Salzburger -at- cern.ch , Elmar.Ritsch -at- cern.ch
Definition at line 32 of file LegacyBarcodeSvc.h.
◆ LegacyBarcodeSvcThreadMap_t
◆ LegacyBarcodeSvc()
Barcode::LegacyBarcodeSvc::LegacyBarcodeSvc |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~LegacyBarcodeSvc()
virtual Barcode::LegacyBarcodeSvc::~LegacyBarcodeSvc |
( |
| ) |
|
|
virtualdefault |
◆ getBarcodeInfo()
Definition at line 61 of file LegacyBarcodeSvc.cxx.
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;
◆ initialize()
StatusCode Barcode::LegacyBarcodeSvc::initialize |
( |
| ) |
|
|
overridevirtual |
Athena algorithm's interface methods.
framework methods
Definition at line 22 of file LegacyBarcodeSvc.cxx.
25 ATH_MSG_DEBUG(
"LegacyBarcodeSvc start of initialize in thread ID: " << std::this_thread::get_id() );
30 return StatusCode::SUCCESS;
◆ initializeBarcodes()
StatusCode Barcode::LegacyBarcodeSvc::initializeBarcodes |
( |
int |
largestGeneratedParticleBC = 0 , |
|
|
int |
largestGeneratedVertexBC = 0 |
|
) |
| |
|
overridevirtual |
Construct and insert a new set of barcode members.
To be called for every new thread.
Definition at line 34 of file LegacyBarcodeSvc.cxx.
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;
◆ newGeneratedParticle()
int Barcode::LegacyBarcodeSvc::newGeneratedParticle |
( |
int |
| ) |
|
|
overridevirtual |
Generate a new unique particle barcode below the simulation offset (for particles from pre-defined decays)
Generate a new unique barcode for a particle produced in a pre-defined decay
Definition at line 149 of file LegacyBarcodeSvc.cxx.
155 if (bc.currentGeneratedParticle < 0)
158 <<
" will return a particle barcode of less than 0: "
159 << bc.currentGeneratedParticle <<
". Reset to "
166 <<
" will return a particle barcode below "
168 << bc.currentGeneratedParticle <<
". Expect clashes with simulation particles.");
171 return bc.currentGeneratedParticle;
◆ newGeneratedVertex()
int Barcode::LegacyBarcodeSvc::newGeneratedVertex |
( |
| ) |
|
|
overridevirtual |
Generate a new unique vertex barcode below the simulation offset.
Generate a new unique vertex barcode for pre-defined decay vertices.
Definition at line 123 of file LegacyBarcodeSvc.cxx.
129 if ( bc.currentGeneratedVertex > 0) {
131 <<
" will return a vertex barcode greater than 0: "
132 << bc.currentGeneratedVertex <<
". Reset to "
139 <<
" will return a vertex barcode below "
141 << bc.currentGeneratedVertex <<
". Expect clashes with simulation vertices.");
144 return bc.currentGeneratedVertex;
◆ newSecondaryParticle()
int Barcode::LegacyBarcodeSvc::newSecondaryParticle |
( |
int |
| ) |
|
|
overridevirtual |
Generate a new unique barcode for a secondary particle above the simulation offset.
Generate a new unique barcode for a secondary particle.
Definition at line 101 of file LegacyBarcodeSvc.cxx.
110 <<
" will return a particle barcode of less than "
112 << bc.currentSecondaryParticle <<
". Reset to "
118 return bc.currentSecondaryParticle;
◆ newSimulationVertex()
int Barcode::LegacyBarcodeSvc::newSimulationVertex |
( |
| ) |
|
|
overridevirtual |
Generate a new unique vertex barcode above the simulation offset.
Generate a new unique vertex simulated barcode.
Definition at line 80 of file LegacyBarcodeSvc.cxx.
89 <<
" will return a vertex barcode greater than "
91 << bc.currentSimulationVertex <<
". Reset to "
96 return bc.currentSimulationVertex;
◆ registerLargestGeneratedParticleBC()
void Barcode::LegacyBarcodeSvc::registerLargestGeneratedParticleBC |
( |
int |
bc | ) |
|
|
overridevirtual |
Inform the BarcodeSvc about the largest particle and vertex Barcodes in the event input.
Definition at line 175 of file LegacyBarcodeSvc.cxx.
176 ATH_MSG_DEBUG(
"registering largest generated particle barcode" );
178 barcodeInfo.currentGeneratedParticle = bc;
◆ registerLargestGeneratedVtxBC()
void Barcode::LegacyBarcodeSvc::registerLargestGeneratedVtxBC |
( |
int |
bc | ) |
|
|
overridevirtual |
◆ registerLargestSecondaryParticleBC()
void Barcode::LegacyBarcodeSvc::registerLargestSecondaryParticleBC |
( |
int |
bc | ) |
|
|
overridevirtual |
◆ registerLargestSimulationVtxBC()
void Barcode::LegacyBarcodeSvc::registerLargestSimulationVtxBC |
( |
int |
bc | ) |
|
|
overridevirtual |
◆ resetBarcodes()
StatusCode Barcode::LegacyBarcodeSvc::resetBarcodes |
( |
int |
largestGeneratedParticleBC = 0 , |
|
|
int |
largestGeneratedVertexBC = 0 |
|
) |
| |
|
overridevirtual |
Reset barcodes.
To be called at the beginning of each event.
Definition at line 209 of file LegacyBarcodeSvc.cxx.
215 bc.currentGeneratedVertex = largestGeneratedVertexBC;
216 bc.currentGeneratedParticle = largestGeneratedParticleBC;
218 return StatusCode::SUCCESS;
◆ secondaryParticleBcOffset()
int Barcode::LegacyBarcodeSvc::secondaryParticleBcOffset |
( |
| ) |
const |
|
overridevirtual |
Return the secondary particle and vertex offsets.
Return the secondary particle offset.
Definition at line 198 of file LegacyBarcodeSvc.cxx.
◆ secondaryVertexBcOffset()
int Barcode::LegacyBarcodeSvc::secondaryVertexBcOffset |
( |
| ) |
const |
|
overridevirtual |
◆ m_bcThreadMap
◆ m_firstSecondary
int Barcode::LegacyBarcodeSvc::m_firstSecondary |
|
private |
barcode information used for secondary GenParticles
Definition at line 80 of file LegacyBarcodeSvc.h.
◆ m_firstVertex
int Barcode::LegacyBarcodeSvc::m_firstVertex |
|
private |
◆ m_particleIncrement
int Barcode::LegacyBarcodeSvc::m_particleIncrement |
|
private |
◆ m_vertexIncrement
int Barcode::LegacyBarcodeSvc::m_vertexIncrement |
|
private |
The documentation for this class was generated from the following files: