Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:17:13

0001 //==========================================================================
0002 //  AIDA Detector description implementation 
0003 //--------------------------------------------------------------------------
0004 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
0005 // All rights reserved.
0006 //
0007 // For the licensing terms see $DD4hepINSTALL/LICENSE.
0008 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
0009 //
0010 // Author     : M.Frank
0011 //
0012 //==========================================================================
0013 
0014 // Framework include files
0015 #include <DD4hep/Printout.h>
0016 #include <DD4hep/InstanceCount.h>
0017 #include <DDDigi/DigiContext.h>
0018 #include <DDDigi/DigiKernel.h>
0019 
0020 // C/C++ include files
0021 #include <algorithm>
0022 
0023 using namespace dd4hep::digi;
0024 
0025 /// Default constructor
0026 DigiContext::DigiContext(const DigiKernel& k, std::unique_ptr<DigiEvent>&& e)
0027   : kernel(k), event(std::move(e))
0028 {
0029   InstanceCount::increment(this);
0030 }
0031 
0032 /// Default destructor
0033 DigiContext::~DigiContext() {
0034   // Do not delete run and event structures here. This is done outside in the framework
0035   InstanceCount::decrement(this);
0036 }
0037 
0038 /// Have a shared initializer lock
0039 std::mutex& DigiContext::initializer_lock()  const  {
0040   return kernel.initializer_lock();
0041 }
0042 
0043 /// Have a global I/O lock (e.g. for ROOT)
0044 std::mutex& DigiContext::global_io_lock()   const  {
0045   return kernel.global_io_lock();
0046 }
0047 
0048 /// Have a global output log lock
0049 std::mutex& DigiContext::global_output_lock()   const  {
0050   return kernel.global_output_lock();
0051 }
0052 
0053 /// Access to detector description
0054 dd4hep::Detector& DigiContext::detectorDescription()  const {
0055   return kernel.detectorDescription();
0056 }
0057 
0058 /// Generic framework access
0059 DigiContext::UserFramework& DigiContext::userFramework()  const  {
0060   return kernel.userFramework();
0061 }
0062 
0063 /// Access to the main input action sequence from the kernel object
0064 DigiActionSequence& DigiContext::inputAction() const    {
0065   return kernel.inputAction();
0066 }
0067 
0068 /// Access to the main event action sequence from the kernel object
0069 DigiActionSequence& DigiContext::eventAction()  const  {
0070   return kernel.eventAction();
0071 }
0072 
0073 /// Access to the main output action sequence from the kernel object
0074 DigiActionSequence& DigiContext::outputAction() const    {
0075   return kernel.outputAction();
0076 }
0077