|
||||
File indexing completed on 2025-01-18 09:55:21
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 #ifndef DDDIGI_DIGILOCKEDACTION_H 0014 #define DDDIGI_DIGILOCKEDACTION_H 0015 0016 /// Framework include files 0017 #include <DDDigi/DigiEventAction.h> 0018 0019 /// C/C++ include files 0020 #include <mutex> 0021 0022 /// Namespace for the AIDA detector description toolkit 0023 namespace dd4hep { 0024 0025 /// Namespace for the Digitization part of the AIDA detector description toolkit 0026 namespace digi { 0027 0028 // Forward declarations 0029 class DigiAction; 0030 class DigiLockedAction; 0031 0032 /// Class to execute non-reentrant subaction in wrapped mode 0033 /** 0034 * 0035 * \author M.Frank 0036 * \version 1.0 0037 * \ingroup DD4HEP_DIGITIZATION 0038 */ 0039 class DigiLockedAction : public DigiEventAction { 0040 protected: 0041 /// Action lock to inhibit calling the non-reentrant underlying 0042 std::mutex m_lock; 0043 /// Reference to underlying action 0044 DigiEventAction* m_action = 0; 0045 0046 protected: 0047 /// Define standard assignments and constructors 0048 DDDIGI_DEFINE_ACTION_CONSTRUCTORS(DigiLockedAction); 0049 0050 public: 0051 /// Standard constructor 0052 DigiLockedAction(const kernel_t& kernel, const std::string& nam); 0053 /// Default destructor 0054 virtual ~DigiLockedAction(); 0055 /// Underlying object to be used during the locked execution 0056 void use(DigiEventAction* action); 0057 /// Callback to read event locked 0058 virtual void execute(context_t& context) const override; 0059 }; 0060 0061 } // End namespace digi 0062 } // End namespace dd4hep 0063 #endif // DDDIGI_DIGILOCKEDACTION_H
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |