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

#include <coresoftware/blob/master/generators/phhepmc/Fun4AllHepMCOutputManager.h>

+ Inheritance diagram for Fun4AllHepMCOutputManager:
+ Collaboration diagram for Fun4AllHepMCOutputManager:

Public Member Functions

 Fun4AllHepMCOutputManager (const std::string &myname="HEPMCOUT", const std::string &filename="hepmcout.txt")
 
 ~Fun4AllHepMCOutputManager () override
 
int outfileopen (const std::string &) override
 opens output file
 
void Print (const std::string &what="ALL") const override
 
int Write (PHCompositeNode *startNode) override
 write starting from given node
 
int AddComment (const std::string &text)
 
int get_embedding_id () const
 
void set_embedding_id (int id)
 
- Public Member Functions inherited from Fun4AllOutputManager
 ~Fun4AllOutputManager () override=default
 destructor
 
void Print (const std::string &what="ALL") const override
 print method (dump event selector)
 
virtual int AddNode (const std::string &)
 add a node in outputmanager
 
virtual int AddRunNode (const std::string &)
 add a runwise node in outputmanager
 
virtual int StripNode (const std::string &)
 not write a node in outputmanager
 
virtual int StripRunNode (const std::string &)
 not write a runwise node in outputmanager
 
virtual void SaveRunNode (const int)
 
virtual void SaveDstNode (const int)
 
virtual int AddEventSelector (const std::string &recomodule)
 add an event selector to the outputmanager. event will get written only if all event selectors process_event method return EVENT_OK
 
int WriteGeneric (PHCompositeNode *startNode)
 Common method, called before calling virtual Write.
 
virtual int WriteNode (PHCompositeNode *)
 write specified node
 
virtual std::vector
< std::string > * 
EventSelector ()
 retrieves pointer to vector of event selector module names
 
virtual std::vector< unsigned > * RecoModuleIndex ()
 retrieves pointer to vector of event selector module ids
 
virtual int DoNotWriteEvent (std::vector< int > *retcodes) const
 decides if event is to be written or not
 
virtual unsigned int EventsWritten () const
 get number of Events
 
virtual void IncrementEvents (const unsigned int i)
 increment number of events
 
virtual void SetEventsWritten (const unsigned int i)
 set number of events
 
virtual std::string OutFileName () const
 get output file name
 
void OutFileName (const std::string &name)
 
void SetClosingScript (const std::string &script)
 
void SetClosingScriptArgs (const std::string &args)
 
int RunAfterClosing ()
 
void UseFileRule ()
 
bool ApplyFileRule () const
 
void SetNEvents (const unsigned int nevt)
 
unsigned int GetNEvents () const
 
- Public Member Functions inherited from Fun4AllBase
virtual ~Fun4AllBase ()
 
virtual const std::string Name () const
 Returns the name of this module.
 
virtual void Name (const std::string &name)
 Sets the name of this module.
 
virtual void Verbosity (const int ival)
 Sets the verbosity of this module (0 by default=quiet).
 
virtual void Verbosity (enu_Verbosity ival)
 Sets the verbosity of this module (0 by default=quiet).
 
virtual int Verbosity () const
 Gets the verbosity of this module.
 

Protected Attributes

std::string outfilename
 
HepMC::IO_GenEvent * ascii_out
 
std::string comment
 
int comment_written
 
std::ofstream * filestream
 
std::ostream * zipstream
 
int _embedding_id
 

Additional Inherited Members

- Public Types inherited from Fun4AllBase
enum  enu_Verbosity {
  VERBOSITY_QUIET = 0, VERBOSITY_SOME = 1, VERBOSITY_MORE = 2, VERBOSITY_EVEN_MORE = 3,
  VERBOSITY_A_LOT = 4, VERBOSITY_MAX = std::numeric_limits<int>::max() - 10
}
 
- Protected Member Functions inherited from Fun4AllOutputManager
 Fun4AllOutputManager (const std::string &myname)
 
 Fun4AllOutputManager (const std::string &myname, const std::string &outfname)
 

Detailed Description

Definition at line 16 of file Fun4AllHepMCOutputManager.h.

View newest version in sPHENIX GitHub at line 16 of file Fun4AllHepMCOutputManager.h

Constructor & Destructor Documentation

Fun4AllHepMCOutputManager::Fun4AllHepMCOutputManager ( const std::string &  myname = "HEPMCOUT",
const std::string &  filename = "hepmcout.txt" 
)

Definition at line 35 of file Fun4AllHepMCOutputManager.cc.

View newest version in sPHENIX GitHub at line 35 of file Fun4AllHepMCOutputManager.cc

References ascii_out, filestream, out, outfilename, zipstream, and zoutbuffer.

Fun4AllHepMCOutputManager::~Fun4AllHepMCOutputManager ( )
override

Definition at line 80 of file Fun4AllHepMCOutputManager.cc.

View newest version in sPHENIX GitHub at line 80 of file Fun4AllHepMCOutputManager.cc

References ascii_out, comment, comment_written, filestream, zipstream, and zoutbuffer.

Member Function Documentation

int Fun4AllHepMCOutputManager::AddComment ( const std::string &  text)

Definition at line 158 of file Fun4AllHepMCOutputManager.cc.

View newest version in sPHENIX GitHub at line 158 of file Fun4AllHepMCOutputManager.cc

References comment, comment_written, and text().

+ Here is the call graph for this function:

int Fun4AllHepMCOutputManager::get_embedding_id ( ) const
inline

embedding ID for the sub-event to be output positive ID is the embedded event of interest, e.g. jetty event from pythia negative IDs are backgrounds, .e.g out of time pile up collisions Usually, ID = 0 means the primary Au+Au collision background

Definition at line 36 of file Fun4AllHepMCOutputManager.h.

View newest version in sPHENIX GitHub at line 36 of file Fun4AllHepMCOutputManager.h

References _embedding_id.

int Fun4AllHepMCOutputManager::outfileopen ( const std::string &  )
inlineoverridevirtual

opens output file

Reimplemented from Fun4AllOutputManager.

Definition at line 24 of file Fun4AllHepMCOutputManager.h.

View newest version in sPHENIX GitHub at line 24 of file Fun4AllHepMCOutputManager.h

void Fun4AllHepMCOutputManager::Print ( const std::string &  what = "ALL") const
overridevirtual

Print out some info about this module.

Parameters
whatcan be used to specify what to print exactly.

Reimplemented from Fun4AllBase.

Definition at line 104 of file Fun4AllHepMCOutputManager.cc.

View newest version in sPHENIX GitHub at line 104 of file Fun4AllHepMCOutputManager.cc

References comment, Fun4AllBase::Name(), outfilename, and Fun4AllOutputManager::Print().

+ Here is the call graph for this function:

void Fun4AllHepMCOutputManager::set_embedding_id ( int  id)
inline

embedding ID for the sub-event to be output positive ID is the embedded event of interest, e.g. jetty event from pythia negative IDs are backgrounds, .e.g out of time pile up collisions Usually, ID = 0 means the primary Au+Au collision background

Definition at line 42 of file Fun4AllHepMCOutputManager.h.

View newest version in sPHENIX GitHub at line 42 of file Fun4AllHepMCOutputManager.h

References _embedding_id, and train_ambiguity_solver::id.

Referenced by Fun4All_G4_sPHENIX_truthphotonjet().

+ Here is the caller graph for this function:

int Fun4AllHepMCOutputManager::Write ( PHCompositeNode )
overridevirtual

write starting from given node

Reimplemented from Fun4AllOutputManager.

Definition at line 117 of file Fun4AllHepMCOutputManager.cc.

View newest version in sPHENIX GitHub at line 117 of file Fun4AllHepMCOutputManager.cc

References _embedding_id, Fun4AllReturnCodes::ABORTRUN, ascii_out, assert, comment, comment_written, Fun4AllReturnCodes::DISCARDEVENT, Fun4AllReturnCodes::EVENT_OK, PHHepMCGenEventMap::get(), PHHepMCGenEvent::getEvent(), Fun4AllOutputManager::IncrementEvents(), and PHWHERE.

+ Here is the call graph for this function:

Member Data Documentation

int Fun4AllHepMCOutputManager::_embedding_id
protected

positive ID is the embedded event of interest, e.g. jetty event from pythia negative IDs are backgrounds, .e.g out of time pile up collisions Usually, ID = 0 means the primary Au+Au collision background

Definition at line 57 of file Fun4AllHepMCOutputManager.h.

View newest version in sPHENIX GitHub at line 57 of file Fun4AllHepMCOutputManager.h

Referenced by get_embedding_id(), set_embedding_id(), and Write().

HepMC::IO_GenEvent* Fun4AllHepMCOutputManager::ascii_out
protected

Definition at line 46 of file Fun4AllHepMCOutputManager.h.

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

Referenced by Fun4AllHepMCOutputManager(), Write(), and ~Fun4AllHepMCOutputManager().

std::string Fun4AllHepMCOutputManager::comment
protected

Definition at line 47 of file Fun4AllHepMCOutputManager.h.

View newest version in sPHENIX GitHub at line 47 of file Fun4AllHepMCOutputManager.h

Referenced by AddComment(), Print(), Write(), and ~Fun4AllHepMCOutputManager().

int Fun4AllHepMCOutputManager::comment_written
protected

Definition at line 48 of file Fun4AllHepMCOutputManager.h.

View newest version in sPHENIX GitHub at line 48 of file Fun4AllHepMCOutputManager.h

Referenced by AddComment(), Write(), and ~Fun4AllHepMCOutputManager().

std::ofstream* Fun4AllHepMCOutputManager::filestream
protected

Definition at line 51 of file Fun4AllHepMCOutputManager.h.

View newest version in sPHENIX GitHub at line 51 of file Fun4AllHepMCOutputManager.h

Referenced by Fun4AllHepMCOutputManager(), and ~Fun4AllHepMCOutputManager().

std::string Fun4AllHepMCOutputManager::outfilename
protected

Definition at line 45 of file Fun4AllHepMCOutputManager.h.

View newest version in sPHENIX GitHub at line 45 of file Fun4AllHepMCOutputManager.h

Referenced by Fun4AllHepMCOutputManager(), and Print().

std::ostream* Fun4AllHepMCOutputManager::zipstream
protected

Definition at line 52 of file Fun4AllHepMCOutputManager.h.

View newest version in sPHENIX GitHub at line 52 of file Fun4AllHepMCOutputManager.h

Referenced by Fun4AllHepMCOutputManager(), and ~Fun4AllHepMCOutputManager().


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