Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Jetscape::JetScape Class Reference

#include <JETSCAPE/blob/main/src/framework/JetScape.h>

+ Inheritance diagram for Jetscape::JetScape:
+ Collaboration diagram for Jetscape::JetScape:

Public Member Functions

 JetScape ()
 
virtual ~JetScape ()
 
void Init ()
 
void Exec ()
 
void Finish ()
 
void SetNumberOfEvents (int m_n_events)
 
int GetNumberOfEvents ()
 
void SetReuseHydro (const bool reuse_hydro)
 
bool GetReuseHydro () const
 
void SetNReuseHydro (const unsigned int n_reuse_hydro)
 
unsigned int GetNReuseHydro () const
 
- Public Member Functions inherited from Jetscape::JetScapeModuleBase
 JetScapeModuleBase ()
 
 JetScapeModuleBase (string m_name)
 
virtual ~JetScapeModuleBase ()
 
virtual void Clear ()
 
void SetXMLMainFileName (string m_name)
 
string GetXMLMainFileName ()
 
void SetXMLUserFileName (string m_name)
 
string GetXMLUserFileName ()
 
shared_ptr< std::mt19937 > GetMt19937Generator ()
 
tinyxml2::XMLElementGetXMLElement (std::initializer_list< const char * > path, bool isRequired=true)
 
std::string GetXMLElementText (std::initializer_list< const char * > path, bool isRequired=true)
 
int GetXMLElementInt (std::initializer_list< const char * > path, bool isRequired=true)
 
double GetXMLElementDouble (std::initializer_list< const char * > path, bool isRequired=true)
 
- Public Member Functions inherited from Jetscape::JetScapeTask
 JetScapeTask ()
 
virtual ~JetScapeTask ()
 
virtual void ExecuteTasks ()
 
virtual void ExecuteTask ()
 
virtual void InitTask ()
 
virtual void InitTasks ()
 
virtual void ClearTasks ()
 
virtual void ClearTask ()
 
virtual void FinishTask ()
 
virtual void FinishTasks ()
 
virtual void WriteTasks (weak_ptr< JetScapeWriter > w)
 
virtual void WriteTask (weak_ptr< JetScapeWriter > w)
 
virtual void CollectHeader (weak_ptr< JetScapeWriter > w)
 
virtual void CollectHeaders (weak_ptr< JetScapeWriter > w)
 
virtual void Add (shared_ptr< JetScapeTask > m_tasks)
 
virtual const int GetMyTaskNumber () const
 
const vector< shared_ptr
< JetScapeTask > > 
GetTaskList () const
 
shared_ptr< JetScapeTaskGetTaskAt (int i)
 
void EraseTaskLast ()
 
void EraseTaskAt (int i)
 
void ResizeTaskList (int i)
 
void ClearTaskList ()
 
int GetNumberOfTasks ()
 
const bool GetActive () const
 
void SetActive (bool m_active_exec)
 
void SetId (string m_id)
 
const string GetId () const
 
const shared_ptr
< JetScapeModuleMutex
GetMutex () const
 
void SetMutex (shared_ptr< JetScapeModuleMutex > m_mutex)
 
- Public Member Functions inherited from sigslot::has_slots< sigslot::multi_threaded_local >
 has_slots ()
 
 has_slots (const has_slots &hs)
 
void signal_connect (_signal_base< sigslot::multi_threaded_local > *sender)
 
void signal_disconnect (_signal_base< sigslot::multi_threaded_local > *sender)
 
virtual ~has_slots ()
 
void disconnect_all ()
 

Protected Member Functions

void CompareElementsFromXML ()
 
void recurseToBuild (std::vector< std::string > &elems, tinyxml2::XMLElement *mElement)
 
void recurseToSearch (std::vector< std::string > &elems, tinyxml2::XMLElement *uElement)
 
void ReadGeneralParametersFromXML ()
 
void DetermineTaskListFromXML ()
 
void DetermineWritersFromXML ()
 
void CheckForWriterFromXML (const char *writerName, std::string outputFilename)
 
void SetModuleId (tinyxml2::XMLElement *moduleElement, shared_ptr< JetScapeModuleBase > module)
 
void SetPointers ()
 
void Show ()
 

Protected Attributes

int n_events
 
int n_events_printout
 
bool reuse_hydro_
 
unsigned int n_reuse_hydro_
 
std::shared_ptr< CausalLiquefierliquefier
 
bool fEnableAutomaticTaskListDetermination
 

Additional Inherited Members

- Static Public Member Functions inherited from Jetscape::JetScapeModuleBase
static int GetCurrentEvent ()
 
static void IncrementCurrentEvent ()
 

Detailed Description

Definition at line 26 of file JetScape.h.

View newest version in sPHENIX GitHub at line 26 of file JetScape.h

Constructor & Destructor Documentation

Jetscape::JetScape::JetScape ( )

Default constructor to create the main task of the JetScape framework.

Default constructor to create the main task of the JetScape framework. It sets the total number of events to 1. By default, hydro events are used only once

Definition at line 46 of file JetScape.cc.

View newest version in sPHENIX GitHub at line 46 of file JetScape.cc

References Jetscape::JetScapeTask::SetId(), and VERBOSE.

+ Here is the call graph for this function:

Jetscape::JetScape::~JetScape ( )
virtual

This is a destructor for a JetScape.

Definition at line 53 of file JetScape.cc.

View newest version in sPHENIX GitHub at line 53 of file JetScape.cc

References VERBOSE.

Member Function Documentation

void Jetscape::JetScape::CheckForWriterFromXML ( const char *  writerName,
std::string  outputFilename 
)
protected

Definition at line 834 of file JetScape.cc.

View newest version in sPHENIX GitHub at line 834 of file JetScape.cc

References Jetscape::JetScapeTask::Add(), boost::dynamic_pointer_cast(), Jetscape::JetScapeModuleBase::GetXMLElementText(), JSINFO, VERBOSE, and writer.

Referenced by DetermineWritersFromXML().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Jetscape::JetScape::CompareElementsFromXML ( )
protected

Definition at line 130 of file JetScape.cc.

View newest version in sPHENIX GitHub at line 130 of file JetScape.cc

References tinyxml2::XMLNode::FirstChildElement(), Jetscape::JetScapeXML::GetXMLRootMain(), Jetscape::JetScapeXML::GetXMLRootUser(), Jetscape::JetScapeXML::Instance(), recurseToBuild(), recurseToSearch(), and Acts::Experimental::detail::BlueprintHelper::sort().

Referenced by Init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Jetscape::JetScape::DetermineTaskListFromXML ( )
protected

Definition at line 206 of file JetScape.cc.

View newest version in sPHENIX GitHub at line 206 of file JetScape.cc

References Jetscape::JetScapeTask::Add(), boost::dynamic_pointer_cast(), fixGDML::element, tinyxml2::XMLNode::FirstChildElement(), tinyxml2::XMLElement::GetText(), Jetscape::JetScapeModuleBase::GetXMLElementText(), Jetscape::JetScapeXML::GetXMLRootUser(), Jetscape::JetScapeXML::Instance(), JSINFO, JSWARN, liquefier, tinyxml2::XMLElement::Name(), tinyxml2::XMLNode::NextSiblingElement(), SetModuleId(), and VERBOSE.

Referenced by Init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Jetscape::JetScape::DetermineWritersFromXML ( )
protected

Definition at line 790 of file JetScape.cc.

View newest version in sPHENIX GitHub at line 790 of file JetScape.cc

References CheckForWriterFromXML(), fixGDML::element, tinyxml2::XMLNode::FirstChildElement(), Jetscape::JetScapeModuleBase::GetXMLElementText(), Jetscape::JetScapeXML::GetXMLRootUser(), Jetscape::JetScapeXML::Instance(), and VERBOSE.

Referenced by Init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Jetscape::JetScape::Exec ( )
virtual

This function execute the modules/tasks of a JetScapeTask for all the events. It also calls "GetPartons()" function to print parton shower, and "WriteTasks()" function to store the data in the XML file.

Reimplemented from Jetscape::JetScapeModuleBase.

Definition at line 926 of file JetScape.cc.

View newest version in sPHENIX GitHub at line 926 of file JetScape.cc

References BOLDRED, Jetscape::JetScapeTask::ClearTasks(), Jetscape::JetScapeTask::CollectHeaders(), Jetscape::JetScapeTask::ExecuteTasks(), f, GetNumberOfEvents(), Jetscape::JetScapeTask::GetNumberOfTasks(), Jetscape::JetScapeTask::GetTaskList(), i, Jetscape::JetScapeModuleBase::IncrementCurrentEvent(), it, JSDEBUG, JSINFO, JSWARN, n_events_printout, n_reuse_hydro_, reuse_hydro_, VERBOSE, and Jetscape::JetScapeTask::WriteTasks().

+ Here is the call graph for this function:

void Jetscape::JetScape::Finish ( )
virtual

A virtual function to define a default Finish() function for a JetScapeTask. It can be overridden by different modules/tasks.

Reimplemented from Jetscape::JetScapeTask.

Definition at line 1042 of file JetScape.cc.

View newest version in sPHENIX GitHub at line 1042 of file JetScape.cc

References BOLDBLACK, Jetscape::JetScapeTask::FinishTasks(), GetNumberOfEvents(), JSDEBUG, and JSINFO.

+ Here is the call graph for this function:

unsigned int Jetscape::JetScape::GetNReuseHydro ( ) const
inline

Definition at line 76 of file JetScape.h.

View newest version in sPHENIX GitHub at line 76 of file JetScape.h

References n_reuse_hydro_.

int Jetscape::JetScape::GetNumberOfEvents ( )
inline

This function returns the total number of events.

Definition at line 53 of file JetScape.h.

View newest version in sPHENIX GitHub at line 53 of file JetScape.h

References n_events.

Referenced by Exec(), and Finish().

+ Here is the caller graph for this function:

bool Jetscape::JetScape::GetReuseHydro ( ) const
inline

Returns whether hydro events are reused.

Definition at line 63 of file JetScape.h.

View newest version in sPHENIX GitHub at line 63 of file JetScape.h

References reuse_hydro_.

Referenced by SetNReuseHydro().

+ Here is the caller graph for this function:

void Jetscape::JetScape::Init ( )
virtual

This function initializes the main task of the JetScape framework. It calls JetScapeTask::InitTaks() function to initialize the modules/tasks of a JetScapeTask.

Reimplemented from Jetscape::JetScapeModuleBase.

Definition at line 62 of file JetScape.cc.

View newest version in sPHENIX GitHub at line 62 of file JetScape.cc

References BOLDRED, CompareElementsFromXML(), DetermineTaskListFromXML(), DetermineWritersFromXML(), fEnableAutomaticTaskListDetermination, Jetscape::JetScapeTask::GetNumberOfTasks(), Jetscape::JetScapeModuleBase::GetXMLMainFileName(), Jetscape::JetScapeModuleBase::GetXMLUserFileName(), Jetscape::JetScapeTask::InitTasks(), Jetscape::JetScapeXML::Instance(), JSINFO, Jetscape::JetScapeXML::OpenXMLMainFile(), Jetscape::JetScapeXML::OpenXMLUserFile(), ReadGeneralParametersFromXML(), SetPointers(), and Show().

+ Here is the call graph for this function:

void Jetscape::JetScape::ReadGeneralParametersFromXML ( )
protected

Definition at line 143 of file JetScape.cc.

View newest version in sPHENIX GitHub at line 143 of file JetScape.cc

References fEnableAutomaticTaskListDetermination, Jetscape::JetScapeModuleBase::GetXMLElementInt(), Jetscape::JetScapeModuleBase::GetXMLElementText(), Jetscape::JetScapeLogger::Instance(), JSDEBUG, JSINFO, n_events_printout, nEvents, Jetscape::JetScapeTaskSupport::ReadSeedFromXML(), Jetscape::JetScapeLogger::SetDebug(), SetNReuseHydro(), SetNumberOfEvents(), Jetscape::JetScapeLogger::SetRemark(), SetReuseHydro(), Jetscape::JetScapeLogger::SetVerboseLevel(), and VERBOSE.

Referenced by Init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Jetscape::JetScape::recurseToBuild ( std::vector< std::string > &  elems,
tinyxml2::XMLElement mElement 
)
protected

Definition at line 95 of file JetScape.cc.

View newest version in sPHENIX GitHub at line 95 of file JetScape.cc

References tinyxml2::XMLNode::FirstChildElement(), tinyxml2::XMLElement::Name(), and tinyxml2::XMLNode::NextSiblingElement().

Referenced by CompareElementsFromXML().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Jetscape::JetScape::recurseToSearch ( std::vector< std::string > &  elems,
tinyxml2::XMLElement uElement 
)
protected

Definition at line 111 of file JetScape.cc.

View newest version in sPHENIX GitHub at line 111 of file JetScape.cc

References tinyxml2::XMLNode::FirstChildElement(), JSWARN, tinyxml2::XMLElement::Name(), and tinyxml2::XMLNode::NextSiblingElement().

Referenced by CompareElementsFromXML().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Jetscape::JetScape::SetModuleId ( tinyxml2::XMLElement moduleElement,
shared_ptr< JetScapeModuleBase module 
)
protected

Definition at line 773 of file JetScape.cc.

View newest version in sPHENIX GitHub at line 773 of file JetScape.cc

References tinyxml2::XMLNode::FirstChildElement(), tinyxml2::XMLElement::GetText(), JSINFO, perf_headwind::name, tinyxml2::XMLElement::Name(), and tinyxml2::XMLNode::NextSiblingElement().

Referenced by DetermineTaskListFromXML().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Jetscape::JetScape::SetNReuseHydro ( const unsigned int  n_reuse_hydro)
inline

Controls number of times a hydro event gets reused. Reusal has to be explicitly turned on by SetReuseHydro. Turn it on first to avoid a warning.

Definition at line 69 of file JetScape.h.

View newest version in sPHENIX GitHub at line 69 of file JetScape.h

References GetReuseHydro(), JSWARN, and n_reuse_hydro_.

Referenced by ReadGeneralParametersFromXML().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Jetscape::JetScape::SetNumberOfEvents ( int  m_n_events)
inline

This function sets the total number of events to "m_n_events".

Definition at line 49 of file JetScape.h.

View newest version in sPHENIX GitHub at line 49 of file JetScape.h

References n_events.

Referenced by ReadGeneralParametersFromXML().

+ Here is the caller graph for this function:

void Jetscape::JetScape::SetPointers ( )
protected
void Jetscape::JetScape::SetReuseHydro ( const bool  reuse_hydro)
inline

Controls whether to reuse a hydro event (for speedup). The number of times is controled by SetNReuseHydro

Definition at line 58 of file JetScape.h.

View newest version in sPHENIX GitHub at line 58 of file JetScape.h

References reuse_hydro_.

Referenced by ReadGeneralParametersFromXML().

+ Here is the caller graph for this function:

void Jetscape::JetScape::Show ( )
protected

Definition at line 59 of file JetScape.cc.

View newest version in sPHENIX GitHub at line 59 of file JetScape.cc

References Jetscape::ShowJetscapeBanner().

Referenced by Init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

bool Jetscape::JetScape::fEnableAutomaticTaskListDetermination
protected

Definition at line 102 of file JetScape.h.

View newest version in sPHENIX GitHub at line 102 of file JetScape.h

Referenced by Init(), and ReadGeneralParametersFromXML().

std::shared_ptr<CausalLiquefier> Jetscape::JetScape::liquefier
protected

Definition at line 99 of file JetScape.h.

View newest version in sPHENIX GitHub at line 99 of file JetScape.h

Referenced by DetermineTaskListFromXML().

int Jetscape::JetScape::n_events
protected

Definition at line 93 of file JetScape.h.

View newest version in sPHENIX GitHub at line 93 of file JetScape.h

Referenced by GetNumberOfEvents(), and SetNumberOfEvents().

int Jetscape::JetScape::n_events_printout
protected

Definition at line 94 of file JetScape.h.

View newest version in sPHENIX GitHub at line 94 of file JetScape.h

Referenced by Exec(), and ReadGeneralParametersFromXML().

unsigned int Jetscape::JetScape::n_reuse_hydro_
protected

Definition at line 97 of file JetScape.h.

View newest version in sPHENIX GitHub at line 97 of file JetScape.h

Referenced by Exec(), GetNReuseHydro(), and SetNReuseHydro().

bool Jetscape::JetScape::reuse_hydro_
protected

Definition at line 96 of file JetScape.h.

View newest version in sPHENIX GitHub at line 96 of file JetScape.h

Referenced by Exec(), GetReuseHydro(), and SetReuseHydro().


The documentation for this class was generated from the following files: