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

#include <JETSCAPE/blob/main/src/jet/HadronPrinter.h>

+ Inheritance diagram for Jetscape::HadronPrinter:
+ Collaboration diagram for Jetscape::HadronPrinter:

Public Member Functions

 HadronPrinter ()
 
virtual ~HadronPrinter ()
 
virtual void Init ()
 
virtual void Exec () final
 
virtual void Clear ()
 
virtual void WriteTask (weak_ptr< JetScapeWriter > w)
 
void SetFinalHadrons (vector< shared_ptr< Hadron >> &hadrons)
 
void PrintFinalHadron ()
 
- Public Member Functions inherited from Jetscape::JetScapeModuleBase
 JetScapeModuleBase ()
 
 JetScapeModuleBase (string m_name)
 
virtual ~JetScapeModuleBase ()
 
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 Finish ()
 
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 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 ()
 

Public Attributes

sigslot::signal1< vector
< shared_ptr< Hadron > > & > 
GetFinalHadronList
 

Private Attributes

vector< shared_ptr< Hadron > > finalHadrons
 
std::ofstream fHadronOutfile
 the output stream where events are saved to file
 

Static Private Attributes

static RegisterJetScapeModule
< HadronPrinter
reg
 

Additional Inherited Members

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

Detailed Description

Definition at line 30 of file HadronPrinter.h.

View newest version in sPHENIX GitHub at line 30 of file HadronPrinter.h

Constructor & Destructor Documentation

Jetscape::HadronPrinter::HadronPrinter ( )

Definition at line 23 of file HadronPrinter.cc.

View newest version in sPHENIX GitHub at line 23 of file HadronPrinter.cc

Jetscape::HadronPrinter::~HadronPrinter ( )
virtual

Definition at line 27 of file HadronPrinter.cc.

View newest version in sPHENIX GitHub at line 27 of file HadronPrinter.cc

Member Function Documentation

void Jetscape::HadronPrinter::Clear ( void  )
virtual

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

Reimplemented from Jetscape::JetScapeModuleBase.

Definition at line 48 of file HadronPrinter.cc.

View newest version in sPHENIX GitHub at line 48 of file HadronPrinter.cc

References finalHadrons.

void Jetscape::HadronPrinter::Exec ( )
finalvirtual

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

Reimplemented from Jetscape::JetScapeModuleBase.

Definition at line 41 of file HadronPrinter.cc.

View newest version in sPHENIX GitHub at line 41 of file HadronPrinter.cc

References finalHadrons, GetFinalHadronList, PrintFinalHadron(), and VERBOSE.

+ Here is the call graph for this function:

void Jetscape::HadronPrinter::Init ( )
virtual

A virtual function for a default initialization of a JetScapeModuleBase. It also checks whether a XML file is loaded or not.

Reimplemented from Jetscape::JetScapeModuleBase.

Definition at line 31 of file HadronPrinter.cc.

View newest version in sPHENIX GitHub at line 31 of file HadronPrinter.cc

References Jetscape::JetScapeSignalManager::ConnectGetFinalHadronListSignal(), fHadronOutfile, Jetscape::JetScapeSignalManager::Instance(), and Jetscape::JetScapeTask::SetId().

+ Here is the call graph for this function:

void Jetscape::HadronPrinter::PrintFinalHadron ( )

Definition at line 57 of file HadronPrinter.cc.

View newest version in sPHENIX GitHub at line 57 of file HadronPrinter.cc

References fHadronOutfile, finalHadrons, h, i, it, JSINFO, Jetscape::JetScapeParticleBase::pid(), and Jetscape::JetScapeParticleBase::pstat().

Referenced by Exec(), and SetFinalHadrons().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Jetscape::HadronPrinter::SetFinalHadrons ( vector< shared_ptr< Hadron >> &  hadrons)
inline

Definition at line 46 of file HadronPrinter.h.

View newest version in sPHENIX GitHub at line 46 of file HadronPrinter.h

References finalHadrons, and PrintFinalHadron().

+ Here is the call graph for this function:

void Jetscape::HadronPrinter::WriteTask ( weak_ptr< JetScapeWriter w)
virtual

A virtual function to define a default WriteTask() function for a JetScapeTask. It can be overridden by different modules/tasks. Current setup: Every task gets handed a pointer to the writer and can add any information it likes to it (using predefined functions like WriteComment()) This is maximally flexible but makes it difficult to properly store information for a variety of outputs. E.g., sigmaGen: A HardProcess can easily write the xsec to any stream-type output using WriteComment. But to set it in a HepMC file, either HardProcess needs to make a case-by-case selection, meaning a new file format would need to percolate through multiple base classes, or the writer needs to know this information and implement WriteEvent appropriately. The latter is obviously better, but it's non-trivial to collect this information.

Reimplemented from Jetscape::JetScapeTask.

Definition at line 51 of file HadronPrinter.cc.

View newest version in sPHENIX GitHub at line 51 of file HadronPrinter.cc

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

+ Here is the call graph for this function:

Member Data Documentation

std::ofstream Jetscape::HadronPrinter::fHadronOutfile
private

the output stream where events are saved to file

Definition at line 56 of file HadronPrinter.h.

View newest version in sPHENIX GitHub at line 56 of file HadronPrinter.h

Referenced by Init(), and PrintFinalHadron().

vector<shared_ptr<Hadron> > Jetscape::HadronPrinter::finalHadrons
private

Definition at line 55 of file HadronPrinter.h.

View newest version in sPHENIX GitHub at line 55 of file HadronPrinter.h

Referenced by Clear(), Exec(), PrintFinalHadron(), and SetFinalHadrons().

sigslot::signal1<vector<shared_ptr<Hadron> >& > Jetscape::HadronPrinter::GetFinalHadronList

Definition at line 44 of file HadronPrinter.h.

View newest version in sPHENIX GitHub at line 44 of file HadronPrinter.h

Referenced by Exec().

RegisterJetScapeModule< HadronPrinter > Jetscape::HadronPrinter::reg
staticprivate

Definition at line 59 of file HadronPrinter.h.

View newest version in sPHENIX GitHub at line 59 of file HadronPrinter.h


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