|
||||
File indexing completed on 2025-01-18 09:55:20
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_NOISE_DIGISIGNALPROCESSORSEQUENCE_H 0014 #define DDDIGI_NOISE_DIGISIGNALPROCESSORSEQUENCE_H 0015 0016 // Framework include files 0017 #include <DDDigi/DigiParallelWorker.h> 0018 #include <DDDigi/DigiSignalProcessor.h> 0019 0020 /// Namespace for the AIDA detector description toolkit 0021 namespace dd4hep { 0022 0023 /// Namespace for the Digitization part of the AIDA detector description toolkit 0024 namespace digi { 0025 0026 // Forward declarations 0027 class DigiSignalProcessor; 0028 class DigiSignalProcessorSequence; 0029 0030 /// Concrete implementation of the Digitization event action sequence 0031 /** 0032 * The sequence dispatches the callbacks to all registered DigiAction 0033 * members and all registered callbacks. 0034 * 0035 * Note Multi-Threading issue: 0036 * Neither callbacks not the action list is protected against multiple 0037 * threads calling the Digi callbacks! 0038 * These must be protected in the user actions themselves. 0039 * 0040 * \author M.Frank 0041 * \version 1.0 0042 * \ingroup DD4HEP_DIGITIZATION 0043 */ 0044 class DigiSignalProcessorSequence : public DigiSignalProcessor { 0045 public: 0046 struct CallData { 0047 DigiCellContext& context; 0048 double value; 0049 }; 0050 protected: 0051 using Worker = DigiParallelWorker<DigiSignalProcessor,CallData,int>; 0052 using Workers = DigiParallelWorkers<Worker>; 0053 /// The list of action objects to be called 0054 Workers m_actors; 0055 0056 protected: 0057 /// Define standard assignments and constructors 0058 DDDIGI_DEFINE_ACTION_CONSTRUCTORS(DigiSignalProcessorSequence); 0059 0060 public: 0061 /// Standard constructor 0062 DigiSignalProcessorSequence(const DigiKernel& kernel, const std::string& nam); 0063 /// Default destructor 0064 virtual ~DigiSignalProcessorSequence(); 0065 /// Adopt a new action as part of the sequence. Sequence takes ownership. 0066 void adopt(DigiSignalProcessor* action); 0067 /// Begin-of-event callback 0068 virtual double operator()(DigiCellContext& context) const override; 0069 }; 0070 0071 } // End namespace digi 0072 } // End namespace dd4hep 0073 #endif // DDDIGI_NOISE_DIGISIGNALPROCESSORSEQUENCE_H
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |