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

#include <coresoftware/blob/master/offline/framework/fun4all/Fun4AllDstOutputManager.h>

+ Inheritance diagram for Fun4AllDstOutputManager:
+ Collaboration diagram for Fun4AllDstOutputManager:

Public Member Functions

 Fun4AllDstOutputManager (const std::string &myname="DSTOUT", const std::string &filename="dstout.root")
 
 ~Fun4AllDstOutputManager () override
 
 Fun4AllDstOutputManager (const Fun4AllDstOutputManager &)=delete
 
Fun4AllDstOutputManageroperator= (Fun4AllDstOutputManager const &)=delete
 
int AddNode (const std::string &nodename) override
 add a node in outputmanager
 
int AddRunNode (const std::string &nodename) override
 add a runwise node in outputmanager
 
int StripNode (const std::string &nodename) override
 not write a node in outputmanager
 
int StripRunNode (const std::string &nodename) override
 not write a runwise node in outputmanager
 
void SaveRunNode (const int i) override
 
void SaveDstNode (const int i) override
 
int outfileopen (const std::string &fname) override
 opens output file
 
void Print (const std::string &what="ALL") const override
 
int Write (PHCompositeNode *startNode) override
 write starting from given node
 
int WriteNode (PHCompositeNode *thisNode) override
 write specified node
 
std::string UsedOutFileName () const
 
void CompressionSetting (const int i)
 
- 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 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 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.
 

Private Member Functions

int outfile_open_first_write ()
 

Private Attributes

PHNodeIOManagerdstOut {nullptr}
 
int m_SaveRunNodeFlag {1}
 
int m_SaveDstNodeFlag {1}
 
int m_CompressionSetting {505}
 
int m_CurrentSegment {0}
 
std::string m_FileNameStem
 
std::string m_UsedOutFileName
 
std::set< std::string > savenodes
 
std::set< std::string > saverunnodes
 
std::set< std::string > stripnodes
 
std::set< std::string > striprunnodes
 

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 14 of file Fun4AllDstOutputManager.h.

View newest version in sPHENIX GitHub at line 14 of file Fun4AllDstOutputManager.h

Constructor & Destructor Documentation

Fun4AllDstOutputManager::Fun4AllDstOutputManager ( const std::string &  myname = "DSTOUT",
const std::string &  filename = "dstout.root" 
)

Definition at line 20 of file Fun4AllDstOutputManager.cc.

View newest version in sPHENIX GitHub at line 20 of file Fun4AllDstOutputManager.cc

Fun4AllDstOutputManager::~Fun4AllDstOutputManager ( )
override

Definition at line 26 of file Fun4AllDstOutputManager.cc.

View newest version in sPHENIX GitHub at line 26 of file Fun4AllDstOutputManager.cc

References dstOut.

Fun4AllDstOutputManager::Fun4AllDstOutputManager ( const Fun4AllDstOutputManager )
delete

Member Function Documentation

int Fun4AllDstOutputManager::AddNode ( const std::string &  )
overridevirtual

add a node in outputmanager

Reimplemented from Fun4AllOutputManager.

Definition at line 32 of file Fun4AllDstOutputManager.cc.

View newest version in sPHENIX GitHub at line 32 of file Fun4AllDstOutputManager.cc

References savenodes.

Referenced by Fun4All_EMCalLikelihood(), Fun4All_G4_Calo(), Fun4All_G4_Clusters(), Fun4All_GeoExtract(), generate_hepmc_bjet(), run_calo_fromMDC2Hits_towslope_Fun4All_G4_Calo(), rundst_spiNo(), and spiNo2().

+ Here is the caller graph for this function:

int Fun4AllDstOutputManager::AddRunNode ( const std::string &  )
overridevirtual

add a runwise node in outputmanager

Reimplemented from Fun4AllOutputManager.

Definition at line 38 of file Fun4AllDstOutputManager.cc.

View newest version in sPHENIX GitHub at line 38 of file Fun4AllDstOutputManager.cc

References saverunnodes.

Referenced by Fun4All_GeoExtract().

+ Here is the caller graph for this function:

void Fun4AllDstOutputManager::CompressionSetting ( const int  i)
inline

Definition at line 36 of file Fun4AllDstOutputManager.h.

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

References i, and m_CompressionSetting.

Fun4AllDstOutputManager& Fun4AllDstOutputManager::operator= ( Fun4AllDstOutputManager const &  )
delete
int Fun4AllDstOutputManager::outfile_open_first_write ( )
private

Definition at line 256 of file Fun4AllDstOutputManager.cc.

View newest version in sPHENIX GitHub at line 256 of file Fun4AllDstOutputManager.cc

References Fun4AllOutputManager::ApplyFileRule(), dstOut, PHFlag::FlagExist(), material_mapping_optimisation::format, PHFlag::get_IntFlag(), recoConsts::instance(), m_CompressionSetting, m_CurrentSegment, m_FileNameStem, m_UsedOutFileName, Fun4AllOutputManager::OutFileName(), merge_hashes::p, path, PHWHERE, PHWrite, runnumber, Fun4AllOutputManager::SetEventsWritten(), str, and UsedOutFileName().

Referenced by Write().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int Fun4AllDstOutputManager::outfileopen ( const std::string &  )
overridevirtual

opens output file

Reimplemented from Fun4AllOutputManager.

Definition at line 56 of file Fun4AllDstOutputManager.cc.

View newest version in sPHENIX GitHub at line 56 of file Fun4AllDstOutputManager.cc

References Fun4AllOutputManager::OutFileName().

+ Here is the call graph for this function:

void Fun4AllDstOutputManager::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 62 of file Fun4AllDstOutputManager.cc.

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

References Fun4AllBase::Name(), Fun4AllOutputManager::OutFileName(), Fun4AllOutputManager::Print(), savenodes, and stripnodes.

+ Here is the call graph for this function:

void Fun4AllDstOutputManager::SaveDstNode ( const int  i)
inlineoverridevirtual

Reimplemented from Fun4AllOutputManager.

Definition at line 28 of file Fun4AllDstOutputManager.h.

View newest version in sPHENIX GitHub at line 28 of file Fun4AllDstOutputManager.h

References i, and m_SaveDstNodeFlag.

void Fun4AllDstOutputManager::SaveRunNode ( const int  i)
inlineoverridevirtual

Reimplemented from Fun4AllOutputManager.

Definition at line 27 of file Fun4AllDstOutputManager.h.

View newest version in sPHENIX GitHub at line 27 of file Fun4AllDstOutputManager.h

References i, and m_SaveRunNodeFlag.

Referenced by Fun4All_BHG().

+ Here is the caller graph for this function:

int Fun4AllDstOutputManager::StripNode ( const std::string &  )
overridevirtual

not write a node in outputmanager

Reimplemented from Fun4AllOutputManager.

Definition at line 44 of file Fun4AllDstOutputManager.cc.

View newest version in sPHENIX GitHub at line 44 of file Fun4AllDstOutputManager.cc

References stripnodes.

Referenced by DstCompress(), Fun4All_BHG(), and Fun4All_CaloProduction_PreQM23().

+ Here is the caller graph for this function:

int Fun4AllDstOutputManager::StripRunNode ( const std::string &  )
overridevirtual

not write a runwise node in outputmanager

Reimplemented from Fun4AllOutputManager.

Definition at line 50 of file Fun4AllDstOutputManager.cc.

View newest version in sPHENIX GitHub at line 50 of file Fun4AllDstOutputManager.cc

References striprunnodes.

std::string Fun4AllDstOutputManager::UsedOutFileName ( ) const
inline

Definition at line 35 of file Fun4AllDstOutputManager.h.

View newest version in sPHENIX GitHub at line 35 of file Fun4AllDstOutputManager.h

References m_UsedOutFileName.

Referenced by outfile_open_first_write(), and WriteNode().

+ Here is the caller graph for this function:

int Fun4AllDstOutputManager::Write ( PHCompositeNode )
overridevirtual

write starting from given node

Reimplemented from Fun4AllOutputManager.

Definition at line 103 of file Fun4AllDstOutputManager.cc.

View newest version in sPHENIX GitHub at line 103 of file Fun4AllDstOutputManager.cc

References dstOut, PHNodeIterator::findFirst(), Fun4AllServer::instance(), m_SaveDstNodeFlag, Fun4AllServer::MakeNodesPersistent(), Fun4AllServer::MakeNodesTransient(), PHNode::makePersistent(), PHNode::makeTransient(), Fun4AllBase::Name(), outfile_open_first_write(), PHWHERE, savenodes, stripnodes, Fun4AllBase::Verbosity(), and PHNodeIOManager::write().

+ Here is the call graph for this function:

int Fun4AllDstOutputManager::WriteNode ( PHCompositeNode )
overridevirtual

Member Data Documentation

PHNodeIOManager* Fun4AllDstOutputManager::dstOut {nullptr}
private

Definition at line 40 of file Fun4AllDstOutputManager.h.

View newest version in sPHENIX GitHub at line 40 of file Fun4AllDstOutputManager.h

Referenced by outfile_open_first_write(), Write(), WriteNode(), and ~Fun4AllDstOutputManager().

int Fun4AllDstOutputManager::m_CompressionSetting {505}
private

Definition at line 43 of file Fun4AllDstOutputManager.h.

View newest version in sPHENIX GitHub at line 43 of file Fun4AllDstOutputManager.h

Referenced by CompressionSetting(), and outfile_open_first_write().

int Fun4AllDstOutputManager::m_CurrentSegment {0}
private

Definition at line 44 of file Fun4AllDstOutputManager.h.

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

Referenced by outfile_open_first_write().

std::string Fun4AllDstOutputManager::m_FileNameStem
private

Definition at line 45 of file Fun4AllDstOutputManager.h.

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

Referenced by outfile_open_first_write(), and WriteNode().

int Fun4AllDstOutputManager::m_SaveDstNodeFlag {1}
private

Definition at line 42 of file Fun4AllDstOutputManager.h.

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

Referenced by SaveDstNode(), Write(), and WriteNode().

int Fun4AllDstOutputManager::m_SaveRunNodeFlag {1}
private

Definition at line 41 of file Fun4AllDstOutputManager.h.

View newest version in sPHENIX GitHub at line 41 of file Fun4AllDstOutputManager.h

Referenced by SaveRunNode(), and WriteNode().

std::string Fun4AllDstOutputManager::m_UsedOutFileName
private

Definition at line 46 of file Fun4AllDstOutputManager.h.

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

Referenced by outfile_open_first_write(), UsedOutFileName(), and WriteNode().

std::set<std::string> Fun4AllDstOutputManager::savenodes
private

Definition at line 47 of file Fun4AllDstOutputManager.h.

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

Referenced by AddNode(), Print(), and Write().

std::set<std::string> Fun4AllDstOutputManager::saverunnodes
private

Definition at line 48 of file Fun4AllDstOutputManager.h.

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

Referenced by AddRunNode(), and WriteNode().

std::set<std::string> Fun4AllDstOutputManager::stripnodes
private

Definition at line 49 of file Fun4AllDstOutputManager.h.

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

Referenced by Print(), StripNode(), and Write().

std::set<std::string> Fun4AllDstOutputManager::striprunnodes
private

Definition at line 50 of file Fun4AllDstOutputManager.h.

View newest version in sPHENIX GitHub at line 50 of file Fun4AllDstOutputManager.h

Referenced by StripRunNode(), and WriteNode().


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