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

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

+ Inheritance diagram for Fun4AllOutputManager:
+ Collaboration diagram for Fun4AllOutputManager:

Public Member Functions

 ~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
 
virtual int outfileopen (const std::string &)
 opens output file
 
int WriteGeneric (PHCompositeNode *startNode)
 Common method, called before calling virtual Write.
 
virtual int Write (PHCompositeNode *)
 write starting from given node
 
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 Member Functions

 Fun4AllOutputManager (const std::string &myname)
 
 Fun4AllOutputManager (const std::string &myname, const std::string &outfname)
 
- Protected Member Functions inherited from Fun4AllBase
 Fun4AllBase (const std::string &name="NONAME")
 

Private Attributes

bool m_UseFileRuleFlag {false}
 add file rule to filename (runnumber-segment)
 
unsigned int m_NEvents {0}
 Number of Events.
 
unsigned int m_MaxEvents {std::numeric_limits<unsigned int>::max()}
 Number of Events to write before roll over.
 
std::string m_RunAfterClosingScript
 Script to run after closing of file.
 
std::string m_ClosingArgs
 string with arguments for closing script
 
std::string m_OutFileName
 output file name
 
std::vector< std::string > m_EventSelectorsVector
 vector of event selectors modules
 
std::vector< unsigned > m_RecoModuleIndexVector
 vector of associated module indexes
 

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
}
 

Detailed Description

Definition at line 14 of file Fun4AllOutputManager.h.

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

Constructor & Destructor Documentation

Fun4AllOutputManager::~Fun4AllOutputManager ( )
overridedefault

destructor

Fun4AllOutputManager::Fun4AllOutputManager ( const std::string &  myname)
protected

constructor. is protected since we do not want the class to be created in root macros

Definition at line 11 of file Fun4AllOutputManager.cc.

View newest version in sPHENIX GitHub at line 11 of file Fun4AllOutputManager.cc

Fun4AllOutputManager::Fun4AllOutputManager ( const std::string &  myname,
const std::string &  outfname 
)
protected

Definition at line 16 of file Fun4AllOutputManager.cc.

View newest version in sPHENIX GitHub at line 16 of file Fun4AllOutputManager.cc

Member Function Documentation

int Fun4AllOutputManager::AddEventSelector ( const std::string &  recomodule)
virtual

add an event selector to the outputmanager. event will get written only if all event selectors process_event method return EVENT_OK

Definition at line 23 of file Fun4AllOutputManager.cc.

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

References m_EventSelectorsVector.

Referenced by MakeTree().

+ Here is the caller graph for this function:

virtual int Fun4AllOutputManager::AddNode ( const std::string &  )
inlinevirtual

add a node in outputmanager

Reimplemented in Fun4AllDstOutputManager.

Definition at line 24 of file Fun4AllOutputManager.h.

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

Referenced by G4TTree(), MakeTree(), MyHitTTree(), run(), runall(), and runmb().

+ Here is the caller graph for this function:

virtual int Fun4AllOutputManager::AddRunNode ( const std::string &  )
inlinevirtual

add a runwise node in outputmanager

Reimplemented in Fun4AllDstOutputManager.

Definition at line 30 of file Fun4AllOutputManager.h.

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

bool Fun4AllOutputManager::ApplyFileRule ( ) const
inline

Definition at line 106 of file Fun4AllOutputManager.h.

View newest version in sPHENIX GitHub at line 106 of file Fun4AllOutputManager.h

References m_UseFileRuleFlag.

Referenced by Fun4AllDstOutputManager::outfile_open_first_write().

+ Here is the caller graph for this function:

int Fun4AllOutputManager::DoNotWriteEvent ( std::vector< int > *  retcodes) const
virtual

decides if event is to be written or not

Definition at line 68 of file Fun4AllOutputManager.cc.

View newest version in sPHENIX GitHub at line 68 of file Fun4AllOutputManager.cc

References index, and m_RecoModuleIndexVector.

virtual std::vector<std::string>* Fun4AllOutputManager::EventSelector ( )
inlinevirtual

retrieves pointer to vector of event selector module names

Definition at line 79 of file Fun4AllOutputManager.h.

View newest version in sPHENIX GitHub at line 79 of file Fun4AllOutputManager.h

References m_EventSelectorsVector.

Referenced by Fun4AllServer::UpdateEventSelector().

+ Here is the caller graph for this function:

virtual unsigned int Fun4AllOutputManager::EventsWritten ( ) const
inlinevirtual

get number of Events

Definition at line 94 of file Fun4AllOutputManager.h.

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

References m_NEvents.

Referenced by Print().

+ Here is the caller graph for this function:

unsigned int Fun4AllOutputManager::GetNEvents ( ) const
inline

Definition at line 108 of file Fun4AllOutputManager.h.

View newest version in sPHENIX GitHub at line 108 of file Fun4AllOutputManager.h

References m_MaxEvents.

virtual void Fun4AllOutputManager::IncrementEvents ( const unsigned int  i)
inlinevirtual

increment number of events

Definition at line 96 of file Fun4AllOutputManager.h.

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

References i, and m_NEvents.

Referenced by Fun4AllHepMCOutputManager::Write().

+ Here is the caller graph for this function:

virtual std::string Fun4AllOutputManager::OutFileName ( ) const
inlinevirtual

get output file name

Definition at line 100 of file Fun4AllOutputManager.h.

View newest version in sPHENIX GitHub at line 100 of file Fun4AllOutputManager.h

References m_OutFileName.

Referenced by Fun4AllPrdfOutputManager::InitPrdfManager(), Fun4AllDstOutputManager::outfile_open_first_write(), Fun4AllPrdfOutputManager::outfileopen(), Fun4AllDstOutputManager::outfileopen(), Fun4AllDstOutputManager::Print(), Fun4AllEventOutputManager::SetOutfileName(), and Fun4AllDstOutputManager::WriteNode().

+ Here is the caller graph for this function:

void Fun4AllOutputManager::OutFileName ( const std::string &  name)
inline

Definition at line 101 of file Fun4AllOutputManager.h.

View newest version in sPHENIX GitHub at line 101 of file Fun4AllOutputManager.h

References m_OutFileName, and perf_headwind::name.

virtual int Fun4AllOutputManager::outfileopen ( const std::string &  )
inlinevirtual

opens output file

Reimplemented in Fun4AllDstOutputManager, Fun4AllPrdfOutputManager, Fun4AllHepMCOutputManager, and Fun4AllEventOutputManager.

Definition at line 58 of file Fun4AllOutputManager.h.

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

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

print method (dump event selector)

Reimplemented from Fun4AllBase.

Reimplemented in Fun4AllEventOutputManager.

Definition at line 48 of file Fun4AllOutputManager.cc.

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

References EventsWritten(), m_EventSelectorsVector, m_RecoModuleIndexVector, and Fun4AllBase::Name().

Referenced by Fun4AllEventOutputManager::Print(), Fun4AllHepMCOutputManager::Print(), Fun4AllDstOutputManager::Print(), run(), runall(), and runmb().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual std::vector<unsigned>* Fun4AllOutputManager::RecoModuleIndex ( )
inlinevirtual

retrieves pointer to vector of event selector module ids

Definition at line 85 of file Fun4AllOutputManager.h.

View newest version in sPHENIX GitHub at line 85 of file Fun4AllOutputManager.h

References m_RecoModuleIndexVector.

Referenced by Fun4AllServer::UpdateEventSelector().

+ Here is the caller graph for this function:

int Fun4AllOutputManager::RunAfterClosing ( )

Definition at line 78 of file Fun4AllOutputManager.cc.

View newest version in sPHENIX GitHub at line 78 of file Fun4AllOutputManager.cc

References m_ClosingArgs, and m_RunAfterClosingScript.

Referenced by Fun4AllRolloverFileOutStream::open_new_file().

+ Here is the caller graph for this function:

virtual void Fun4AllOutputManager::SaveDstNode ( const int  )
inlinevirtual

Reimplemented in Fun4AllDstOutputManager.

Definition at line 48 of file Fun4AllOutputManager.h.

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

virtual void Fun4AllOutputManager::SaveRunNode ( const int  )
inlinevirtual

Reimplemented in Fun4AllDstOutputManager.

Definition at line 47 of file Fun4AllOutputManager.h.

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

void Fun4AllOutputManager::SetClosingScript ( const std::string &  script)
inline

Definition at line 102 of file Fun4AllOutputManager.h.

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

References m_RunAfterClosingScript.

void Fun4AllOutputManager::SetClosingScriptArgs ( const std::string &  args)
inline

Definition at line 103 of file Fun4AllOutputManager.h.

View newest version in sPHENIX GitHub at line 103 of file Fun4AllOutputManager.h

References check_smearing_config::args, and m_ClosingArgs.

Referenced by Fun4AllRolloverFileOutStream::open_new_file().

+ Here is the caller graph for this function:

virtual void Fun4AllOutputManager::SetEventsWritten ( const unsigned int  i)
inlinevirtual

set number of events

Definition at line 98 of file Fun4AllOutputManager.h.

View newest version in sPHENIX GitHub at line 98 of file Fun4AllOutputManager.h

References i, and m_NEvents.

Referenced by Fun4AllDstOutputManager::outfile_open_first_write().

+ Here is the caller graph for this function:

void Fun4AllOutputManager::SetNEvents ( const unsigned int  nevt)
inline

Definition at line 107 of file Fun4AllOutputManager.h.

View newest version in sPHENIX GitHub at line 107 of file Fun4AllOutputManager.h

References m_MaxEvents.

virtual int Fun4AllOutputManager::StripNode ( const std::string &  )
inlinevirtual

not write a node in outputmanager

Reimplemented in Fun4AllDstOutputManager.

Definition at line 36 of file Fun4AllOutputManager.h.

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

Referenced by Fun4All_TrkrHitSet_Unpacker().

+ Here is the caller graph for this function:

virtual int Fun4AllOutputManager::StripRunNode ( const std::string &  )
inlinevirtual

not write a runwise node in outputmanager

Reimplemented in Fun4AllDstOutputManager.

Definition at line 42 of file Fun4AllOutputManager.h.

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

void Fun4AllOutputManager::UseFileRule ( )
inline

Definition at line 105 of file Fun4AllOutputManager.h.

View newest version in sPHENIX GitHub at line 105 of file Fun4AllOutputManager.h

References m_UseFileRuleFlag.

virtual int Fun4AllOutputManager::Write ( PHCompositeNode )
inlinevirtual

write starting from given node

Reimplemented in Fun4AllDstOutputManager, Fun4AllPrdfOutputManager, Fun4AllHepMCOutputManager, and Fun4AllEventOutputManager.

Definition at line 67 of file Fun4AllOutputManager.h.

View newest version in sPHENIX GitHub at line 67 of file Fun4AllOutputManager.h

Referenced by WriteGeneric().

+ Here is the caller graph for this function:

int Fun4AllOutputManager::WriteGeneric ( PHCompositeNode startNode)

Common method, called before calling virtual Write.

Definition at line 40 of file Fun4AllOutputManager.cc.

View newest version in sPHENIX GitHub at line 40 of file Fun4AllOutputManager.cc

References m_NEvents, and Write().

+ Here is the call graph for this function:

virtual int Fun4AllOutputManager::WriteNode ( PHCompositeNode )
inlinevirtual

write specified node

Reimplemented in Fun4AllDstOutputManager.

Definition at line 73 of file Fun4AllOutputManager.h.

View newest version in sPHENIX GitHub at line 73 of file Fun4AllOutputManager.h

Member Data Documentation

std::string Fun4AllOutputManager::m_ClosingArgs
private

string with arguments for closing script

Definition at line 132 of file Fun4AllOutputManager.h.

View newest version in sPHENIX GitHub at line 132 of file Fun4AllOutputManager.h

Referenced by RunAfterClosing(), and SetClosingScriptArgs().

std::vector<std::string> Fun4AllOutputManager::m_EventSelectorsVector
private

vector of event selectors modules

Definition at line 138 of file Fun4AllOutputManager.h.

View newest version in sPHENIX GitHub at line 138 of file Fun4AllOutputManager.h

Referenced by AddEventSelector(), EventSelector(), and Print().

unsigned int Fun4AllOutputManager::m_MaxEvents {std::numeric_limits<unsigned int>::max()}
private

Number of Events to write before roll over.

Definition at line 126 of file Fun4AllOutputManager.h.

View newest version in sPHENIX GitHub at line 126 of file Fun4AllOutputManager.h

Referenced by GetNEvents(), and SetNEvents().

unsigned int Fun4AllOutputManager::m_NEvents {0}
private

Number of Events.

Definition at line 123 of file Fun4AllOutputManager.h.

View newest version in sPHENIX GitHub at line 123 of file Fun4AllOutputManager.h

Referenced by EventsWritten(), IncrementEvents(), SetEventsWritten(), and WriteGeneric().

std::string Fun4AllOutputManager::m_OutFileName
private

output file name

Definition at line 135 of file Fun4AllOutputManager.h.

View newest version in sPHENIX GitHub at line 135 of file Fun4AllOutputManager.h

Referenced by OutFileName().

std::vector<unsigned> Fun4AllOutputManager::m_RecoModuleIndexVector
private

vector of associated module indexes

Definition at line 141 of file Fun4AllOutputManager.h.

View newest version in sPHENIX GitHub at line 141 of file Fun4AllOutputManager.h

Referenced by DoNotWriteEvent(), Print(), and RecoModuleIndex().

std::string Fun4AllOutputManager::m_RunAfterClosingScript
private

Script to run after closing of file.

Definition at line 129 of file Fun4AllOutputManager.h.

View newest version in sPHENIX GitHub at line 129 of file Fun4AllOutputManager.h

Referenced by RunAfterClosing(), and SetClosingScript().

bool Fun4AllOutputManager::m_UseFileRuleFlag {false}
private

add file rule to filename (runnumber-segment)

Definition at line 120 of file Fun4AllOutputManager.h.

View newest version in sPHENIX GitHub at line 120 of file Fun4AllOutputManager.h

Referenced by ApplyFileRule(), and UseFileRule().


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