![]() |
|
|||
File indexing completed on 2025-08-03 08:19:55
0001 /******************************************************************************* 0002 * Copyright (c) The JETSCAPE Collaboration, 2018 0003 * 0004 * Modular, task-based framework for simulating all aspects of heavy-ion collisions 0005 * 0006 * For the list of contributors see AUTHORS. 0007 * 0008 * Report issues at https://github.com/JETSCAPE/JETSCAPE/issues 0009 * 0010 * or via email to bugs.jetscape@gmail.com 0011 * 0012 * Distributed under the GNU General Public License 3.0 (GPLv3 or later). 0013 * See COPYING for details. 0014 ******************************************************************************/ 0015 0016 #ifndef JETENERGYLOSSMANAGER_H 0017 #define JETENERGYLOSSMANAGER_H 0018 0019 #include "JetScapeTask.h" 0020 #include "JetClass.h" 0021 #include "sigslot.h" 0022 0023 #include <vector> 0024 0025 namespace Jetscape { 0026 /** @class Jet energy loss manager. 0027 */ 0028 class JetEnergyLossManager 0029 : public JetScapeTask, 0030 public std::enable_shared_from_this<JetEnergyLossManager> { 0031 0032 public: 0033 /** Default constructor to create a jet energy loss manager. Sets task ID as "JLossManager". Flag GetHardPartonListConnected is set to false. 0034 */ 0035 JetEnergyLossManager(); 0036 0037 /** Destructor for the jet energy loss manager. 0038 */ 0039 virtual ~JetEnergyLossManager(); 0040 0041 /** It initializes the tasks attached to the jet energy loss manager. It also sends a signal to connect the JetEnergyLoss object to the GetHardPartonList() function of the HardProcess class. It can be overridden by other tasks. 0042 @sa JetScapeSignalManager to understand the implementation of signal slots philosophy. 0043 */ 0044 virtual void Init(); 0045 0046 /** It reads the Hard Patrons list and calls CreateSignalSlots() function. Then, it executes the energy loss tasks attached with the jet energy loss manager. This function also includes the parallel computing feature. It can be overridden by other tasks. 0047 */ 0048 virtual void Exec(); 0049 0050 /** It erases the tasks attached with the energy loss manager. It can be overridden by other tasks. 0051 */ 0052 virtual void Clear(); 0053 0054 /** It writes the output information relevant to the jet energy loss tasks/subtasks into a file. It can be overridden by other tasks. 0055 @param w A pointer of type JetScapeWriter class. 0056 @sa JetScapeWriter class for further information. 0057 */ 0058 virtual void WriteTask(weak_ptr<JetScapeWriter> w); 0059 0060 int GetNumSignals(); 0061 0062 /** Uses philosophy of signal slots. Checks whether the attached task is connected via signal slots to the functions UpdateEnergyDeposit(), GetEnergyDensity(), GetHydroCell() (defined in FluidDynamics class), and DoEnergyLoss() (defined in JetEnergyLoss class). If not, then, it sends a signal to these functions. 0063 @sa JetScapeSignalManager to understand the implementation of signal slots philosophy. 0064 */ 0065 void CreateSignalSlots(); 0066 0067 /** A signal to connect the JetEnergyLossManager to the function GetHardPartonList() of the class HardProcess. 0068 */ 0069 sigslot::signal1<vector<shared_ptr<Parton>> &> GetHardPartonList; 0070 0071 /** Use the flag m_GetHardPartonListConnected as true, if JetEnergyLossManager had sent a signal to function GetHardPartonList() of the class HardProcess. 0072 @param m_GetHardPartonListConnected A boolean flag. 0073 */ 0074 void SetGetHardPartonListConnected(bool m_GetHardPartonListConnected) { 0075 GetHardPartonListConnected = m_GetHardPartonListConnected; 0076 } 0077 0078 /** @return GetHardPartonListConnected A boolean flag. Its status indicates whether JetEnergyLossManager had sent a signal to the function GetHardPartonList() of the class HardProcess. 0079 */ 0080 const bool GetGetHardPartonListConnected() { 0081 return GetHardPartonListConnected; 0082 } 0083 0084 private: 0085 bool GetHardPartonListConnected; 0086 vector<shared_ptr<Parton>> hp; 0087 }; 0088 0089 } // end namespace Jetscape 0090 0091 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |