| The Gaudi Framework v28r2p1 (f1a77ff4)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
OutputStream Class Reference

A small to stream Data I/O. More...

`#include <src/PersistencySvc/OutputStream.h>`

Inheritance diagram for OutputStream:
[legend]
Collaboration diagram for OutputStream:
[legend]

## Public Types
typedef std::vector< DataStoreItem * > | Items
typedef std::vector< std::string > | ItemNames
typedef std::map< Algorithm *, Items > | AlgDependentItems
typedef std::map< std::string, ItemNames > | AlgDependentItemNames
Public Types inherited from Algorithm
typedef Gaudi::PluginService::Factory< IAlgorithm *, const std::string &, ISvcLocator * > | Factory
Public Types inherited from extends< PropertyHolder< CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > > >, IDataHandleHolder >
using | base_class = extends
| Typedef to this class. More...
using | extend_interfaces_base = extend_interfaces< Interfaces... >
| Typedef to the base of this class. More...
Public Types inherited from PropertyHolder< CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > > >
using | PropertyHolderImpl = PropertyHolder< CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > > >
| Typedef used to refer to this class from derived classes, as in. More...
Public Types inherited from CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > >
using | base_class = CommonMessaging
Public Types inherited from extend_interfaces< Interfaces... >
using | ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids... >::type
| take union of the ext_iids of all Interfaces... More...

## Public Member Functions
| OutputStream (const std::string &name, ISvcLocator *pSvcLocator)
| Standard algorithm Constructor. More...
virtual | ~OutputStream ()=default
| Standard Destructor. More...
StatusCode | initialize () override
| Initialize OutputStream. More...
StatusCode | finalize () override
| Terminate OutputStream. More...
StatusCode | execute () override
| Working entry point. More...
virtual StatusCode | connectConversionSvc ()
virtual bool | collect (IRegistry *dir, int level)
| Store agent's classback. More...
virtual StatusCode | collectObjects ()
| Collect all objects to be written to the output stream. More...
void | clearSelection ()
| Clear list of selected objects. More...
Public Member Functions inherited from Algorithm
| Algorithm (const std::string &name, ISvcLocator *svcloc, const std::string &version=PACKAGE_VERSION)
| Constructor. More...
StatusCode | sysStart () override
| Reinitialization method invoked by the framework. More...
StatusCode | sysInitialize () override
| Initialization method invoked by the framework. More...
StatusCode | sysReinitialize () override
| Reinitialization method invoked by the framework. More...
StatusCode | sysRestart () override
| Restart method invoked by the framework. More...
StatusCode | sysExecute (const EventContext &ctx) override
| The actions to be performed by the algorithm on an event. More...
StatusCode | sysStop () override
| System stop. More...
StatusCode | sysFinalize () override
| System finalization. More...
StatusCode | sysBeginRun () override
| beginRun method invoked by the framework. More...
StatusCode | sysEndRun () override
| endRun method invoked by the framework. More...
const std::string & | name () const override
| The identifying name of the algorithm object. More...
const Gaudi::StringKey & | nameKey () const override
const std::string & | type () const override
| The type of the algorithm object. More...
void | setType (const std::string &type) override
const std::string & | version () const override
unsigned int | index () const override
StatusCode | configure () override
| Dummy implementation of IStateful::configure() method. More...
StatusCode | terminate () override
| Dummy implementation of IStateful::terminate() method. More...
StatusCode | initialize () override
| the default (empty) implementation of IStateful::initialize() method More...
StatusCode | start () override
| the default (empty) implementation of IStateful::start() method More...
StatusCode | stop () override
| the default (empty) implementation of IStateful::stop() method More...
StatusCode | finalize () override
| the default (empty) implementation of IStateful::finalize() method More...
StatusCode | reinitialize () override
| the default (empty) implementation of IStateful::reinitialize() method More...
StatusCode | restart () override
| the default (empty) implementation of IStateful::restart() method More...
Gaudi::StateMachine::State | FSMState () const override
| returns the current state of the algorithm More...
Gaudi::StateMachine::State | targetFSMState () const override
| returns the state the algorithm will be in after the ongoing transition More...
bool | isExecuted () const override
| Has this algorithm been executed since the last reset? More...
void | setExecuted (bool state) override
| Set the executed flag to the specified state. More...
void | resetExecuted () override
| Reset the executed state of the Algorithm for the duration of the current event. More...
StatusCode | beginRun () override
| Algorithm begin run. More...
StatusCode | endRun () override
| Algorithm end run. This method is called at the end of the event loop. More...
bool | isEnabled () const override
| Is this algorithm enabled or disabled? More...
bool | filterPassed () const override
| Did this algorithm pass or fail its filter criterion for the last event? More...
void | setFilterPassed (bool state) override
| Set the filter passed flag to the specified state. More...
unsigned int | errorCount () const
| Get the number of failures of the algorithm. More...
template<class T >
StatusCode | service (const std::string &name, T *&psvc, bool createIf=true) const
| Access a service by name, creating it if it doesn't already exist. More...
template<class T >
StatusCode | service (const std::string &svcType, const std::string &svcName, T *&psvc) const
| Access a service by name and type, creating it if it doesn't already exist. More...
SmartIF< IService > | service (const std::string &name, const bool createIf=true, const bool quiet=false) const
| Return a pointer to the service identified by name (or "type/name") More...
template<class T >
SmartIF< T > | service (const std::string &name, bool createIf=true, bool quiet=false) const
SmartIF< IAuditorSvc > & | auditorSvc () const
| The standard auditor service.May not be invoked before sysInitialize() has been invoked. More...
SmartIF< IChronoStatSvc > & | chronoSvc () const
| The standard Chrono & Stat service, Return a pointer to the service if present. More...
SmartIF< IChronoStatSvc > & | chronoStatService () const
SmartIF< IDataProviderSvc > & | detSvc () const
| The standard detector data service. More...
SmartIF< IDataProviderSvc > & | detDataService () const
SmartIF< IConversionSvc > & | detCnvSvc () const
| The standard detector data persistency conversion service. More...
SmartIF< IConversionSvc > & | detDataCnvService () const
SmartIF< IDataProviderSvc > & | eventSvc () const
| The standard event data service. More...
SmartIF< IDataProviderSvc > & | evtSvc () const
| shortcut for method eventSvc More...
SmartIF< IDataProviderSvc > & | eventDataService () const
SmartIF< IConversionSvc > & | eventCnvSvc () const
| The standard event data persistency conversion service. More...
SmartIF< IConversionSvc > & | eventDataCnvService () const
SmartIF< IHistogramSvc > & | histoSvc () const
| The standard histogram service. More...
SmartIF< IHistogramSvc > & | histogramDataService () const
SmartIF< INTupleSvc > & | ntupleSvc () const
| The standard N tuple service. More...
SmartIF< INTupleSvc > & | ntupleService () const
SmartIF< IRndmGenSvc > & | randSvc () const
| The standard RandomGen service, Return a pointer to the service if present. More...
SmartIF< IToolSvc > & | toolSvc () const
| The standard ToolSvc service, Return a pointer to the service if present. More...
SmartIF< IExceptionSvc > & | exceptionSvc () const
| Get the exception Service. More...
SmartIF< IAlgContextSvc > & | contextSvc () const
| get Algorithm Context Service More...
SmartIF< ITimelineSvc > & | timelineSvc () const
SmartIF< ISvcLocator > & | serviceLocator () const override
| The standard service locator. More...
SmartIF< ISvcLocator > & | svcLoc () const
| shortcut for method serviceLocator More...
SmartIF< IHiveWhiteBoard > & | whiteboard () const
SmartIF< IAlgExecStateSvc > & | algExecStateSvc () const
bool | registerContext () const
| register for Algorithm Context Service? More...
StatusCode | createSubAlgorithm (const std::string &type, const std::string &name, Algorithm *&pSubAlg)
| Create a sub algorithm. More...
const std::vector< Algorithm * > * | subAlgorithms () const
| List of sub-algorithms. Returns a pointer to a vector of (sub) Algorithms. More...
std::vector< Algorithm * > * | subAlgorithms ()
| List of sub-algorithms. Returns a pointer to a vector of (sub) Algorithms. More...
StatusCode | setProperties ()
| Set the algorithm's properties. More...
template<class T >
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, ToolHandle< T > &hndl, const std::string &doc="none")
template<class T >
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, ToolHandleArray< T > &hndlArr, const std::string &doc="none")
SmartIF< IMonitorSvc > & | monitorSvc () const
| Access the monitor service. More...
template<class T >
void | declareInfo (const std::string &name, const T &var, const std::string &desc) const
| Declare monitoring information. More...
void | declareInfo (const std::string &name, const std::string &format, const void *var, int size, const std::string &desc) const
| Declare monitoring information (special case) More...
const EventContext & | getContext () const override
| get the context More...
virtual void | acceptDHVisitor (IDataHandleVisitor *) const override
void | commitHandles () override
void | registerTool (IAlgTool *tool) const
void | deregisterTool (IAlgTool *tool) const
template<class T >
StatusCode | declareTool (ToolHandle< T > &handle, std::string toolTypeAndName="", bool createIf=true)
const std::vector< IAlgTool * > & | tools () const
bool | isIOBound () const
void | setIOBound (bool value)
bool | isClonable () const override
| Specifies the clonability of the algorithm. More...
unsigned int | cardinality () const override
| Return the cardinality. More...
const std::vector< std::string > & | neededResources () const override
std::ostream & | toControlFlowExpression (std::ostream &os) const override
| Produce string represention of the control flow expression. More...
Public Member Functions inherited from DataHandleHolderBase< PropertyHolder< CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > > > >
std::vector< Gaudi::DataHandle * > | inputHandles () const override
std::vector< Gaudi::DataHandle * > | outputHandles () const override
virtual const DataObjIDColl & | extraInputDeps () const override
virtual const DataObjIDColl & | extraOutputDeps () const override
void | declare (Gaudi::DataHandle &handle) override
void | renounce (Gaudi::DataHandle &handle) override
const DataObjIDColl & | inputDataObjs () const override
const DataObjIDColl & | outputDataObjs () const override
void | addDependency (const DataObjID &id, const Gaudi::DataHandle::Mode &mode) override
Public Member Functions inherited from extends< PropertyHolder< CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > > >, IDataHandleHolder >
void * | i_cast (const InterfaceID &tid) const override
| Implementation of IInterface::i_cast. More...
StatusCode | queryInterface (const InterfaceID &ti, void **pp) override
| Implementation of IInterface::queryInterface. More...
std::vector< std::string > | getInterfaceNames () const override
| Implementation of IInterface::getInterfaceNames. More...
| ~extends () override=default
| Virtual destructor. More...
Public Member Functions inherited from PropertyHolder< CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > > >
| PropertyHolder ()=default
| ~PropertyHolder () override=default
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Details::PropertyBase &prop)
| Declare a property. More...
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, TYPE &value, const std::string &doc="none")
| Helper to wrap a regular data member and use it as a regular property. More...
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, TYPE &value, const std::string &doc="none") const
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, Gaudi::Property< TYPE, VERIFIER, HANDLERS > &prop, const std::string &doc="none")
| Declare a PropertyBase instance setting name and documentation. More...
Gaudi::Details::PropertyBase * | declareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="")
| Declare a remote property. More...
StatusCode | setProperty (const Gaudi::Details::PropertyBase &p) override
| set the property form another property More...
StatusCode | setProperty (const std::string &s) override
| set the property from the formatted string More...
StatusCode | setProperty (const std::string &n, const std::string &v) override
| set the property from name and the value More...
StatusCode | setProperty (const std::string &name, const TYPE &value)
| set the property form the value More...
StatusCode | getProperty (Gaudi::Details::PropertyBase *p) const override
| get the property More...
const Gaudi::Details::PropertyBase & | getProperty (const std::string &name) const override
| get the property by name More...
StatusCode | getProperty (const std::string &n, std::string &v) const override
| convert the property to the string More...
const std::vector< Gaudi::Details::PropertyBase * > & | getProperties () const override
| get all properties More...
bool | hasProperty (const std::string &name) const override
| Return true if we have a property with the given name. More...
| PropertyHolder (const PropertyHolder &)=delete
PropertyHolder & | operator= (const PropertyHolder &)=delete
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, GaudiHandleBase &ref, const std::string &doc="none")
| Specializations for various GaudiHandles. More...
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, GaudiHandleArrayBase &ref, const std::string &doc="none")
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, DataObjectHandleBase &ref, const std::string &doc="none")
Public Member Functions inherited from CommonMessagingBase
virtual | ~CommonMessagingBase ()=default
| Virtual destructor. More...
SmartIF< IMessageSvc > & | msgSvc () const
| The standard message service. More...
MsgStream & | msgStream () const
| Return an uninitialized MsgStream. More...
MsgStream & | msgStream (const MSG::Level level) const
| Predefined configurable message stream for the efficient printouts. More...
MsgStream & | always () const
| shortcut for the method msgStream(MSG::ALWAYS) More...
MsgStream & | fatal () const
| shortcut for the method msgStream(MSG::FATAL) More...
MsgStream & | err () const
| shortcut for the method msgStream(MSG::ERROR) More...
MsgStream & | error () const
| shortcut for the method msgStream(MSG::ERROR) More...
MsgStream & | warning () const
| shortcut for the method msgStream(MSG::WARNING) More...
MsgStream & | info () const
| shortcut for the method msgStream(MSG::INFO) More...
MsgStream & | debug () const
| shortcut for the method msgStream(MSG::DEBUG) More...
MsgStream & | verbose () const
| shortcut for the method msgStream(MSG::VERBOSE) More...
MsgStream & | msg () const
| shortcut for the method msgStream(MSG::INFO) More...
MSG::Level | msgLevel () const
| get the output level from the embedded MsgStream More...
MSG::Level | outputLevel () const __attribute__((deprecated))
| Backward compatibility function for getting the output level. More...
bool | msgLevel (MSG::Level lvl) const
| get the output level from the embedded MsgStream More...
Public Member Functions inherited from extend_interfaces< Interfaces... >
| ~extend_interfaces () override=default
| Virtual destructor. More...

## Protected Member Functions
StatusCode | decodeAcceptAlgs ()
| Decode list of Algorithms that this stream accepts. More...
void | acceptAlgsHandler (Gaudi::Details::PropertyBase &theProp)
| Handler for AcceptAlgs Property. More...
StatusCode | decodeRequireAlgs ()
| Decode list of Algorithms that this stream requires. More...
void | requireAlgsHandler (Gaudi::Details::PropertyBase &theProp)
| Handler for RequireAlgs Property. More...
StatusCode | decodeVetoAlgs ()
| Decode list of Algorithms that this stream is vetoed by. More...
void | vetoAlgsHandler (Gaudi::Details::PropertyBase &theProp)
| Handler for VetoAlgs Property. More...
Algorithm * | decodeAlgorithm (const std::string &theName)
| Decode a single algorithm name. More...
StatusCode | decodeAlgorithms (Gaudi::Property< std::vector< std::string >> &theNames, std::vector< Algorithm * > &theAlgs)
| Decode specified list of Algorithms. More...
bool | isEventAccepted () const
| Test whether this event should be output. More...
DataStoreItem * | findItem (const std::string &path)
| Find single item identified by its path (exact match) More...
virtual StatusCode | writeObjects ()
| Select the different objects and write them to file. More...
virtual bool | hasInput () const
| Tell if the instance has been configured with input items or not. More...
Protected Member Functions inherited from Algorithm
std::vector< IAlgTool * > & | tools ()
bool | isInitialized () const override
| Has the Algorithm already been initialized? More...
bool | isFinalized () const override
| Has the Algorithm already been finalized? More...
void | setIndex (const unsigned int &idx) override
| set instantiation index of Alg More...
Protected Member Functions inherited from DataHandleHolderBase< PropertyHolder< CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > > > >
void | initDataHandleHolder ()
| initializes all handles - called by the sysInitialize method of any descendant of this More...
Protected Member Functions inherited from PropertyHolder< CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > > >
Gaudi::Details::PropertyBase * | property (const std::string &name) const
Protected Member Functions inherited from CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > >
void | updateMsgStreamOutputLevel (int level)
| Update the output level of the cached MsgStream. More...

## Protected Attributes
Gaudi::Property< ItemNames > | m_itemNames {this, "ItemList", {}, "vector of item names to be saved to this stream"}
Gaudi::Property< ItemNames > | m_optItemNames
Gaudi::Property< AlgDependentItemNames > | m_algDependentItemList
Gaudi::Property< bool > | m_doPreLoad
Gaudi::Property< bool > | m_doPreLoadOpt
Gaudi::Property< std::string > | m_output {this, "Output", {}, "name of the output file specification"}
Gaudi::Property< std::string > | m_outputName {this, "OutputFile", {}, "name of the output file"}
Gaudi::Property< std::string > | m_storeName
Gaudi::Property< std::string > | m_persName
Gaudi::Property< std::vector< std::string > > | m_acceptNames
Gaudi::Property< std::vector< std::string > > | m_requireNames
Gaudi::Property< std::vector< std::string > > | m_vetoNames
Gaudi::Property< bool > | m_verifyItems
bool | m_fireIncidents = true
| should I fire incidents for writing opening/closing etc? in the baseclass, always fire the incidents by default in e.g. More...
SmartIF< IIncidentSvc > | m_incidentSvc
| Reference to the incident service. More...
std::string | m_outputType = "UPDATE"
| Output type: NEW(NEW,CREATE,WRITE,RECREATE), UPDATE) More...
std::unique_ptr< OutputStreamAgent > | m_agent
| Keep reference of agent. More...
SmartIF< IDataProviderSvc > | m_pDataProvider
| Keep reference to the data provider service. More...
SmartIF< IDataManagerSvc > | m_pDataManager
| Keep reference to the data manager service. More...
SmartIF< IConversionSvc > | m_pConversionSvc
| Keep reference to the data conversion service. More...
DataStoreItem * | m_currentItem
| Keep track of the current item. More...
Items | m_itemList
| Vector of items to be saved to this stream. More...
Items | m_optItemList
| Vector of optional items to be saved to this stream. More...
AlgDependentItems | m_algDependentItems
| Items to be saved for specific algorithms. More...
IDataSelector | m_objects
| Collection of objects being selected. More...
int | m_events
| Number of events written to this output stream. More...
std::vector< Algorithm * > | m_acceptAlgs
| Vector of Algorithms that this stream accepts. More...
std::vector< Algorithm * > | m_requireAlgs
| Vector of Algorithms that this stream requires. More...
std::vector< Algorithm * > | m_vetoAlgs
| Vector of Algorithms that this stream is vetoed by. More...
Protected Attributes inherited from Algorithm
std::unique_ptr< IDataHandleVisitor > | m_updateDataHandles
| Hook for for derived classes to provide a custom visitor for data handles. More...
Protected Attributes inherited from DataHandleHolderBase< PropertyHolder< CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > > > >
DataObjIDColl | m_inputDataObjs
DataObjIDColl | m_outputDataObjs

## Private Member Functions
void | clearItems (Items &itms)
| Clear item list. More...
void | addItem (Items &itms, const std::string &descriptor)
| Add item to output streamer list. More...
IDataSelector * | selectedObjects ()
| Return the list of selected objects. More...

## Detailed Description

A small to stream Data I/O.

Author: M.Frank author R. Lambert Version: 1.0

Definition at line 29 of file OutputStream.h.

## Member Typedef Documentation

typedef std::map<std::string, ItemNames> OutputStream::AlgDependentItemNames

Definition at line 35 of file OutputStream.h.

typedef std::map<Algorithm*, Items> OutputStream::AlgDependentItems

Definition at line 34 of file OutputStream.h.

typedef std::vector<std::string> OutputStream::ItemNames

Definition at line 33 of file OutputStream.h.

typedef std::vector<DataStoreItem*> OutputStream::Items

Definition at line 32 of file OutputStream.h.

## Constructor & Destructor Documentation

OutputStream::OutputStream | ( | const std::string & | name,
|  | ISvcLocator * | pSvcLocator
| ) |  |

Standard algorithm Constructor.

Definition at line 30 of file OutputStream.cpp.

31 : Algorithm( name, pSvcLocator ), m_agent{new OutputStreamAgent( this )}
32 {
33 // Associate action handlers with the AcceptAlgs, RequireAlgs and VetoAlgs.
34 m_acceptNames.declareUpdateHandler( &OutputStream::acceptAlgsHandler, this );
35 m_requireNames.declareUpdateHandler( &OutputStream::requireAlgsHandler, this );
36 m_vetoNames.declareUpdateHandler( &OutputStream::vetoAlgsHandler, this );
37 }
OutputStream::m_acceptNames
Gaudi::Property< std::vector< std::string > > m_acceptNames
Definition: OutputStream.h:57
OutputStream::m_vetoNames
Gaudi::Property< std::vector< std::string > > m_vetoNames
Definition: OutputStream.h:61
OutputStreamAgent
Definition: OutputStreamAgent.h:30
OutputStream::m_agent
std::unique_ptr< OutputStreamAgent > m_agent
Keep reference of agent.
Definition: OutputStream.h:77
OutputStream::requireAlgsHandler
void requireAlgsHandler(Gaudi::Details::PropertyBase &theProp)
Handler for RequireAlgs Property.
Definition: OutputStream.cpp:456
OutputStream::m_requireNames
Gaudi::Property< std::vector< std::string > > m_requireNames
Definition: OutputStream.h:59
OutputStream::vetoAlgsHandler
void vetoAlgsHandler(Gaudi::Details::PropertyBase &theProp)
Handler for VetoAlgs Property.
Definition: OutputStream.cpp:471
Algorithm::Algorithm
Algorithm(const std::string &name, ISvcLocator *svcloc, const std::string &version=PACKAGE_VERSION)
Constructor.
Definition: Algorithm.cpp:51
OutputStream::acceptAlgsHandler
void acceptAlgsHandler(Gaudi::Details::PropertyBase &theProp)
Handler for AcceptAlgs Property.
Definition: OutputStream.cpp:441

virtual OutputStream::~OutputStream | ( |  | ) |
| virtual default

Standard Destructor.

## Member Function Documentation

void OutputStream::acceptAlgsHandler | ( | Gaudi::Details::PropertyBase & | theProp | ) |
| protected

Handler for AcceptAlgs Property.

Definition at line 441 of file OutputStream.cpp.

442 {
443 StatusCode sc = decodeAlgorithms( m_acceptNames, m_acceptAlgs );
444 if ( sc.isFailure() ) {
445 throw GaudiException( "Failure in OutputStream::decodeAlgorithms", "OutputStream::acceptAlgsHandler", sc );
446 }
447 }
OutputStream::m_acceptNames
Gaudi::Property< std::vector< std::string > > m_acceptNames
Definition: OutputStream.h:57
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:23
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:84
OutputStream::m_acceptAlgs
std::vector< Algorithm * > m_acceptAlgs
Vector of Algorithms that this stream accepts.
Definition: OutputStream.h:98
OutputStream::decodeAlgorithms
StatusCode decodeAlgorithms(Gaudi::Property< std::vector< std::string >> &theNames, std::vector< Algorithm * > &theAlgs)
Decode specified list of Algorithms.
Definition: OutputStream.cpp:506
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26

void OutputStream::addItem | ( | Items & | itms,
|  | const std::string & | descriptor
| ) |  |
| private

Add item to output streamer list.

Definition at line 331 of file OutputStream.cpp.

332 {
333 int level = 0;
334 auto sep = descriptor.rfind( "#" );
335 std::string obj_path = descriptor.substr( 0, sep );
336 if ( sep != std::string::npos ) {
337 std::string slevel = descriptor.substr( sep + 1 );
338 level = ( slevel == "*" ) ? 9999999 : std::stoi( slevel );
339 }
340 if ( m_verifyItems ) {
341 size_t idx = obj_path.find( "/", 1 );
342 while ( idx != std::string::npos ) {
343 std::string sub_item = obj_path.substr( 0, idx );
344 if ( !findItem( sub_item ) ) addItem( itms, sub_item + "#1" );
345 idx = obj_path.find( "/", idx + 1 );
346 }
347 }
348 itms.push_back( new DataStoreItem( obj_path, level ) );
349 const auto& item = itms.back();
350 ON_DEBUG
351 debug() << "Adding OutputStream item " << item->path() << " with " << item->depth() << " level(s)." << endmsg;
352 }
OutputStream::m_verifyItems
Gaudi::Property< bool > m_verifyItems
Definition: OutputStream.h:63
std::string::rfind
T rfind(T...args)
DataStoreItem
Description of the DataStoreItem class.
Definition: DataStoreItem.h:17
std::string
STL class.
OutputStream::findItem
DataStoreItem * findItem(const std::string &path)
Find single item identified by its path (exact match)
Definition: OutputStream.cpp:319
OutputStream::addItem
void addItem(Items &itms, const std::string &descriptor)
Add item to output streamer list.
Definition: OutputStream.cpp:331
std::string::find
T find(T...args)
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:126
ON_DEBUG
#define ON_DEBUG
Definition: OutputStream.cpp:27
std::string::substr
T substr(T...args)
gaudirun.level
level
Definition: gaudirun.py:261
std::stoi
T stoi(T...args)
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244

void OutputStream::clearItems | ( | Items & | itms | ) |
| private

Clear item list.

Definition at line 312 of file OutputStream.cpp.

313 {
314 for ( auto& i : itms ) delete i;
315 itms.clear();
316 }

void OutputStream::clearSelection | ( |  | ) |

Clear list of selected objects.

Definition at line 309 of file OutputStream.cpp.

309 { m_objects.clear(); }
OutputStream::m_objects
IDataSelector m_objects
Collection of objects being selected.
Definition: OutputStream.h:93
std::vector::clear
T clear(T...args)

bool OutputStream::collect | ( | IRegistry * | dir,
|  | int | level
| ) |  |
| virtual

Store agent's classback.

Definition at line 216 of file OutputStream.cpp.

217 {
218 if ( level < m_currentItem->depth() ) {
219 if ( dir->object() ) {
220 /*
221 std::cout << "Analysing ("
222 << dir->name()
223 << ") Object:"
224 << ((dir->object()==0) ? "UNLOADED" : "LOADED")
225 << std::endl;
226 */
227 m_objects.push_back( dir->object() );
228 return true;
229 }
230 }
231 return false;
232 }
OutputStream::m_objects
IDataSelector m_objects
Collection of objects being selected.
Definition: OutputStream.h:93
std::vector::push_back
T push_back(T...args)
IRegistry::object
virtual DataObject * object() const =0
Retrieve object behind the link.

StatusCode OutputStream::collectObjects | ( |  | ) |
| virtual

Collect all objects to be written to the output stream.

Reimplemented in InputCopyStream.

Definition at line 235 of file OutputStream.cpp.

236 {
237 StatusCode status = StatusCode::SUCCESS;
238
239 // Traverse the tree and collect the requested objects
240 for ( auto& i : m_itemList ) {
241 DataObject* obj = nullptr;
242 m_currentItem = i;
243 StatusCode iret = m_pDataProvider->retrieveObject( m_currentItem->path(), obj );
244 if ( iret.isSuccess() ) {
245 iret = m_pDataManager->traverseSubTree( obj, m_agent.get() );
246 if ( !iret.isSuccess() ) status = iret;
247 } else {
248 error() << "Cannot write mandatory object(s) (Not found) " << m_currentItem->path() << endmsg;
249 status = iret;
250 }
251 }
252
253 // Traverse the tree and collect the requested objects (tolerate missing items here)
254 for ( auto& i : m_optItemList ) {
255 DataObject* obj = nullptr;
256 m_currentItem = i;
257 StatusCode iret = m_pDataProvider->retrieveObject( m_currentItem->path(), obj );
258 if ( iret.isSuccess() ) {
259 iret = m_pDataManager->traverseSubTree( obj, m_agent.get() );
260 }
261 if ( !iret.isSuccess() ) {
262 ON_DEBUG
263 debug() << "Ignore request to write non-mandatory object(s) " << m_currentItem->path() << endmsg;
264 }
265 }
266
267 // Collect objects dependent on particular algorithms
268 for ( const auto& iAlgItems : m_algDependentItems ) {
269 Algorithm* alg = iAlgItems.first;
270 const Items& items = iAlgItems.second;
271 if ( alg->isExecuted() && alg->filterPassed() ) {
272 ON_DEBUG
273 debug() << "Algorithm '" << alg->name() << "' fired. Adding " << items << endmsg;
274 for ( const auto& i : items ) {
275 DataObject* obj = nullptr;
276 m_currentItem = i;
277 StatusCode iret = m_pDataProvider->retrieveObject( m_currentItem->path(), obj );
278 if ( iret.isSuccess() ) {
279 iret = m_pDataManager->traverseSubTree( obj, m_agent.get() );
280 if ( !iret.isSuccess() ) status = iret;
281 } else {
282 error() << "Cannot write mandatory (algorithm dependent) object(s) (Not found) " << m_currentItem->path()
283 << endmsg;
284 status = iret;
285 }
286 }
287 }
288 }
289
290 if ( status.isSuccess() ) {
291 // Remove duplicates from the list of objects, preserving the order in the list
292 std::set<DataObject*> unique;
293 std::vector<DataObject*> tmp; // temporary vector with the reduced list
294 tmp.reserve( m_objects.size() );
295 for ( auto& o : m_objects ) {
296 if ( !unique.count( o ) ) {
297 // if the pointer is not in the set, add it to both the set and the temporary vector
298 unique.insert( o );
299 tmp.push_back( o );
300 }
301 }
302 m_objects.swap( tmp ); // swap the data of the two vectors
303 }
304
305 return status;
306 }
StatusCode::SUCCESS
Definition: StatusCode.h:30
OutputStream::m_objects
IDataSelector m_objects
Collection of objects being selected.
Definition: OutputStream.h:93
Algorithm::name
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:715
Algorithm::isExecuted
bool isExecuted() const override
Has this algorithm been executed since the last reset?
Definition: Algorithm.cpp:725
OutputStream::m_currentItem
DataStoreItem * m_currentItem
Keep track of the current item.
Definition: OutputStream.h:85
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:74
OutputStream::m_pDataProvider
SmartIF< IDataProviderSvc > m_pDataProvider
Keep reference to the data provider service.
Definition: OutputStream.h:79
std::unique
T unique(T...args)
OutputStream::m_agent
std::unique_ptr< OutputStreamAgent > m_agent
Keep reference of agent.
Definition: OutputStream.h:77
DataStoreItem::path
const std::string & path() const
Accessor: Retrieve load path.
Definition: DataStoreItem.h:65
std::vector::push_back
T push_back(T...args)
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:117
OutputStream::m_algDependentItems
AlgDependentItems m_algDependentItems
Items to be saved for specific algorithms.
Definition: OutputStream.h:91
OutputStream::Items
std::vector< DataStoreItem * > Items
Definition: OutputStream.h:32
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
OutputStream::m_itemList
Items m_itemList
Vector of items to be saved to this stream.
Definition: OutputStream.h:87
OutputStream::m_pDataManager
SmartIF< IDataManagerSvc > m_pDataManager
Keep reference to the data manager service.
Definition: OutputStream.h:81
std::set::count
T count(T...args)
std::unique_ptr::get
T get(T...args)
std::set::insert
T insert(T...args)
Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:78
std::vector::size
T size(T...args)
std::set
STL class.
std::vector< DataObject * >
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:126
Algorithm::filterPassed
bool filterPassed() const override
Did this algorithm pass or fail its filter criterion for the last event?
Definition: Algorithm.cpp:744
ON_DEBUG
#define ON_DEBUG
Definition: OutputStream.cpp:27
IDataManagerSvc::traverseSubTree
virtual StatusCode traverseSubTree(const std::string &sub_path, IDataStoreAgent *pAgent)=0
Analyse by traversing all data objects below the sub tree identified by its full path name...
DataObject
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
std::vector::reserve
T reserve(T...args)
OutputStream::m_optItemList
Items m_optItemList
Vector of optional items to be saved to this stream.
Definition: OutputStream.h:89
IDataProviderSvc::retrieveObject
virtual StatusCode retrieveObject(IRegistry *pDirectory, const std::string &path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.

StatusCode OutputStream::connectConversionSvc | ( |  | ) |
| virtual

Definition at line 355 of file OutputStream.cpp.

356 {
357 StatusCode status = StatusCode( StatusCode::FAILURE, true );
358 // Get output file from input
359 std::string dbType, svc, shr;
360 for ( auto attrib : Gaudi::Utils::AttribStringParser( m_output ) ) {
361 const std::string& tag = attrib.tag;
362 const std::string& val = attrib.value;
363 switch (::toupper( tag[0] ) ) {
364 case 'D':
365 m_outputName = val;
366 break;
367 case 'T':
368 dbType = val;
369 break;
370 case 'S':
371 switch (::toupper( tag[1] ) ) {
372 case 'V':
373 svc = val;
374 break;
375 case 'H':
376 shr = "YES";
377 break;
378 }
379 break;
380 case 'O': // OPT='<NEW<CREATE,WRITE,RECREATE>, UPDATE>'
381 switch (::toupper( val[0] ) ) {
382 case 'R':
383 if (::strncasecmp( val.c_str(), "RECREATE", 3 ) == 0 )
384 m_outputType = "RECREATE";
385 else if (::strncasecmp( val.c_str(), "READ", 3 ) == 0 )
386 m_outputType = "READ";
387 break;
388 case 'C':
389 case 'N':
390 case 'W':
391 m_outputType = "NEW";
392 break;
393 case 'U':
394 m_outputType = "UPDATE";
395 break;
396 default:
397 m_outputType = "???";
398 break;
399 }
400 break;
401 default:
402 break;
403 }
404 }
405 if ( !shr.empty() ) m_outputType += "|SHARED";
406 // Get access to the default Persistency service
407 // The default service is the same for input as for output.
408 // If this is not desired, then a specialized OutputStream must overwrite
409 // this value.
410 if ( !dbType.empty() || !svc.empty() ) {
411 std::string typ = !dbType.empty() ? dbType : svc;
412 auto ipers = serviceLocator()->service<IPersistencySvc>( m_persName );
413 if ( !ipers ) {
414 fatal() << "Unable to locate IPersistencySvc interface of " << m_persName << endmsg;
415 return StatusCode::FAILURE;
416 }
417 IConversionSvc* cnvSvc = nullptr;
418 status = ipers->getService( typ, cnvSvc );
419 if ( !status.isSuccess() ) {
420 fatal() << "Unable to locate IConversionSvc interface of database type " << typ << endmsg;
421 return status;
422 }
423 // Increase reference count and keep service.
424 m_pConversionSvc = cnvSvc;
425 } else {
426 fatal() << "Unable to locate IConversionSvc interface (Unknown technology) " << endmsg
427 << "You either have to specify a technology name or a service name!" << endmsg
428 << "Please correct the job option \"" << name() << ".Output\" !" << endmsg;
429 return StatusCode::FAILURE;
430 }
431 return StatusCode::SUCCESS;
432 }
Gaudi::Utils::AttribStringParser
Parse attribute strings allowing iteration over the various attributes.
Definition: AttribStringParser.h:30
StatusCode::SUCCESS
Definition: StatusCode.h:30
std::string::empty
T empty(T...args)
Algorithm::name
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:715
StatusCode::FAILURE
Definition: StatusCode.h:29
IConversionSvc
Definition: IConversionSvc.h:37
OutputStream::m_outputType
std::string m_outputType
Output type: NEW(NEW,CREATE,WRITE,RECREATE), UPDATE)
Definition: OutputStream.h:75
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:74
OutputStream::m_output
Gaudi::Property< std::string > m_output
Definition: OutputStream.h:51
OutputStream::m_outputName
Gaudi::Property< std::string > m_outputName
Definition: OutputStream.h:52
std::string
STL class.
ISvcLocator::service
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Definition: ISvcLocator.h:78
OutputStream::m_pConversionSvc
SmartIF< IConversionSvc > m_pConversionSvc
Keep reference to the data conversion service.
Definition: OutputStream.h:83
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
Algorithm::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
The standard service locator.
Definition: Algorithm.cpp:787
std::string::c_str
T c_str(T...args)
IPersistencySvc
Data persistency service interface.
Definition: IPersistencySvc.h:19
CommonMessagingBase::fatal
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
Definition: CommonMessaging.h:111
OutputStream::m_persName
Gaudi::Property< std::string > m_persName
Definition: OutputStream.h:55
toupper
void toupper(std::string &s)
Definition: StatusCodeSvc.cpp:10
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244

StatusCode OutputStream::decodeAcceptAlgs | ( |  | ) |
| protected

Decode list of Algorithms that this stream accepts.

Definition at line 434 of file OutputStream.cpp.

435 {
436 ON_DEBUG
437 debug() << "AcceptAlgs : " << m_acceptNames.value() << endmsg;
438 return decodeAlgorithms( m_acceptNames, m_acceptAlgs );
439 }
OutputStream::m_acceptNames
Gaudi::Property< std::vector< std::string > > m_acceptNames
Definition: OutputStream.h:57
OutputStream::m_acceptAlgs
std::vector< Algorithm * > m_acceptAlgs
Vector of Algorithms that this stream accepts.
Definition: OutputStream.h:98
OutputStream::decodeAlgorithms
StatusCode decodeAlgorithms(Gaudi::Property< std::vector< std::string >> &theNames, std::vector< Algorithm * > &theAlgs)
Decode specified list of Algorithms.
Definition: OutputStream.cpp:506
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:126
ON_DEBUG
#define ON_DEBUG
Definition: OutputStream.cpp:27
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244

Algorithm * OutputStream::decodeAlgorithm | ( | const std::string & | theName | ) |
| protected

Decode a single algorithm name.

Definition at line 479 of file OutputStream.cpp.

480 {
481 Algorithm* theAlgorithm = nullptr;
482
483 auto theAlgMgr = serviceLocator()->as<IAlgManager>();
484 if ( theAlgMgr ) {
485 // Check whether the supplied name corresponds to an existing
486 // Algorithm object.
487 SmartIF<IAlgorithm>& theIAlg = theAlgMgr->algorithm( theName );
488 if ( theIAlg ) {
489 try {
490 theAlgorithm = dynamic_cast<Algorithm*>( theIAlg.get() );
491 } catch ( ... ) {
492 // do nothing
493 }
494 }
495 } else {
496 fatal() << "Can't locate ApplicationMgr!!!" << endmsg;
497 }
498
499 if ( !theAlgorithm ) {
500 warning() << "Failed to decode Algorithm name " << theName << endmsg;
501 }
502
503 return theAlgorithm;
504 }
SmartIF< IAlgorithm >
IAlgManager
The IAlgManager is the interface implemented by the Algorithm Factory in the Application Manager to s...
Definition: IAlgManager.h:27
ISvcLocator::as
SmartIF< IFace > as()
Definition: ISvcLocator.h:106
SmartIF::get
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:76
CommonMessagingBase::warning
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Definition: CommonMessaging.h:120
Algorithm::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
The standard service locator.
Definition: Algorithm.cpp:787
Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:78
CommonMessagingBase::fatal
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
Definition: CommonMessaging.h:111
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244

StatusCode OutputStream::decodeAlgorithms | ( | Gaudi::Property< std::vector< std::string >> & | theNames,
|  | std::vector< Algorithm * > & | theAlgs
| ) |  |
| protected

Decode specified list of Algorithms.

Definition at line 506 of file OutputStream.cpp.

508 {
509 // Reset the list of Algorithms
510 theAlgs.clear();
511
512 StatusCode result = StatusCode::SUCCESS;
513
514 // Build the list of Algorithms from the names list
515 for ( const auto& it : theNames.value() ) {
516
517 Algorithm* theAlgorithm = decodeAlgorithm( it );
518 if ( theAlgorithm ) {
519 // Check that the specified algorithm doesn't already exist in the list
520 if ( std::find( std::begin( theAlgs ), std::end( theAlgs ), theAlgorithm ) == std::end( theAlgs ) ) {
521 theAlgorithm->addRef();
522 theAlgs.push_back( theAlgorithm );
523 }
524 } else {
525 info() << it << " doesn't exist - ignored" << endmsg;
526 }
527 }
528 result = StatusCode::SUCCESS;
529
530 return result;
531 }
StatusCode::SUCCESS
Definition: StatusCode.h:30
CommonMessagingBase::info
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
Definition: CommonMessaging.h:123
std::end
T end(T...args)
std::vector::push_back
T push_back(T...args)
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
std::vector::clear
T clear(T...args)
Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:78
std::find
T find(T...args)
std::begin
T begin(T...args)
OutputStream::decodeAlgorithm
Algorithm * decodeAlgorithm(const std::string &theName)
Decode a single algorithm name.
Definition: OutputStream.cpp:479
Gaudi::Property::value
const ValueType & value() const
Backward compatibility (.
Definition: Property.h:475
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244

StatusCode OutputStream::decodeRequireAlgs | ( |  | ) |
| protected

Decode list of Algorithms that this stream requires.

Definition at line 449 of file OutputStream.cpp.

450 {
451 ON_DEBUG
452 debug() << "RequireAlgs : " << m_requireNames.value() << endmsg;
453 return decodeAlgorithms( m_requireNames, m_requireAlgs );
454 }
OutputStream::m_requireAlgs
std::vector< Algorithm * > m_requireAlgs
Vector of Algorithms that this stream requires.
Definition: OutputStream.h:100
OutputStream::decodeAlgorithms
StatusCode decodeAlgorithms(Gaudi::Property< std::vector< std::string >> &theNames, std::vector< Algorithm * > &theAlgs)
Decode specified list of Algorithms.
Definition: OutputStream.cpp:506
OutputStream::m_requireNames
Gaudi::Property< std::vector< std::string > > m_requireNames
Definition: OutputStream.h:59
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:126
ON_DEBUG
#define ON_DEBUG
Definition: OutputStream.cpp:27
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244

StatusCode OutputStream::decodeVetoAlgs | ( |  | ) |
| protected

Decode list of Algorithms that this stream is vetoed by.

Definition at line 464 of file OutputStream.cpp.

465 {
466 ON_DEBUG
467 debug() << "VetoAlgs : " << m_vetoNames.value() << endmsg;
468 return decodeAlgorithms( m_vetoNames, m_vetoAlgs );
469 }
OutputStream::m_vetoNames
Gaudi::Property< std::vector< std::string > > m_vetoNames
Definition: OutputStream.h:61
OutputStream::decodeAlgorithms
StatusCode decodeAlgorithms(Gaudi::Property< std::vector< std::string >> &theNames, std::vector< Algorithm * > &theAlgs)
Decode specified list of Algorithms.
Definition: OutputStream.cpp:506
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:126
ON_DEBUG
#define ON_DEBUG
Definition: OutputStream.cpp:27
OutputStream::m_vetoAlgs
std::vector< Algorithm * > m_vetoAlgs
Vector of Algorithms that this stream is vetoed by.
Definition: OutputStream.h:102
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244

StatusCode OutputStream::execute | ( |  | ) |
| override

Working entry point.

Definition at line 142 of file OutputStream.cpp.

143 {
144 // Clear any previously existing item list
145 clearSelection();
146 // Test whether this event should be output
147 if ( isEventAccepted() ) {
148 const StatusCode sc = writeObjects();
149 clearSelection();
150 ++m_events;
151 if ( sc.isSuccess() && m_fireIncidents ) {
152 m_incidentSvc->fireIncident( Incident( m_outputName, IncidentType::WroteToOutputFile ) );
153 } else if ( m_fireIncidents ) {
154 m_incidentSvc->fireIncident( Incident( m_outputName, IncidentType::FailOutputFile ) );
155 }
156 return sc;
157 }
158 return StatusCode::SUCCESS;
159 }
OutputStream::isEventAccepted
bool isEventAccepted() const
Test whether this event should be output.
Definition: OutputStream.cpp:533
StatusCode::SUCCESS
Definition: StatusCode.h:30
OutputStream::m_events
int m_events
Number of events written to this output stream.
Definition: OutputStream.h:95
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:74
OutputStream::m_outputName
Gaudi::Property< std::string > m_outputName
Definition: OutputStream.h:52
OutputStream::writeObjects
virtual StatusCode writeObjects()
Select the different objects and write them to file.
Definition: OutputStream.cpp:162
IIncidentSvc::fireIncident
virtual void fireIncident(const Incident &incident)=0
Fire an Incident.
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
OutputStream::clearSelection
void clearSelection()
Clear list of selected objects.
Definition: OutputStream.cpp:309
OutputStream::m_incidentSvc
SmartIF< IIncidentSvc > m_incidentSvc
Reference to the incident service.
Definition: OutputStream.h:72
Incident
Base class for all Incidents (computing events).
Definition: Incident.h:17
OutputStream::m_fireIncidents
bool m_fireIncidents
should I fire incidents for writing opening/closing etc? in the baseclass, always fire the incidents ...
Definition: OutputStream.h:69

StatusCode OutputStream::finalize | ( |  | ) |
| override

Terminate OutputStream.

Definition at line 128 of file OutputStream.cpp.

129 {
130 info() << "Events output: " << m_events << endmsg;
131 if ( m_fireIncidents ) m_incidentSvc->fireIncident( Incident( m_outputName, IncidentType::EndOutputFile ) );
132 m_incidentSvc.reset();
133 m_pDataProvider.reset();
134 m_pDataManager.reset();
135 m_pConversionSvc.reset();
136 clearItems( m_optItemList );
137 clearItems( m_itemList );
138 return StatusCode::SUCCESS;
139 }
StatusCode::SUCCESS
Definition: StatusCode.h:30
OutputStream::clearItems
void clearItems(Items &itms)
Clear item list.
Definition: OutputStream.cpp:312
OutputStream::m_events
int m_events
Number of events written to this output stream.
Definition: OutputStream.h:95
CommonMessagingBase::info
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
Definition: CommonMessaging.h:123
OutputStream::m_outputName
Gaudi::Property< std::string > m_outputName
Definition: OutputStream.h:52
OutputStream::m_pDataProvider
SmartIF< IDataProviderSvc > m_pDataProvider
Keep reference to the data provider service.
Definition: OutputStream.h:79
OutputStream::m_pConversionSvc
SmartIF< IConversionSvc > m_pConversionSvc
Keep reference to the data conversion service.
Definition: OutputStream.h:83
IIncidentSvc::fireIncident
virtual void fireIncident(const Incident &incident)=0
Fire an Incident.
OutputStream::m_itemList
Items m_itemList
Vector of items to be saved to this stream.
Definition: OutputStream.h:87
OutputStream::m_pDataManager
SmartIF< IDataManagerSvc > m_pDataManager
Keep reference to the data manager service.
Definition: OutputStream.h:81
OutputStream::m_incidentSvc
SmartIF< IIncidentSvc > m_incidentSvc
Reference to the incident service.
Definition: OutputStream.h:72
Incident
Base class for all Incidents (computing events).
Definition: Incident.h:17
SmartIF::reset
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
Definition: SmartIF.h:88
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
OutputStream::m_fireIncidents
bool m_fireIncidents
should I fire incidents for writing opening/closing etc? in the baseclass, always fire the incidents ...
Definition: OutputStream.h:69
OutputStream::m_optItemList
Items m_optItemList
Vector of optional items to be saved to this stream.
Definition: OutputStream.h:89

DataStoreItem * OutputStream::findItem | ( | const std::string & | path | ) |
| protected

Find single item identified by its path (exact match)

Definition at line 319 of file OutputStream.cpp.

320 {
321 auto matchPath = [&]( const DataStoreItem* i ) { return i->path() == path; };
322 auto i = std::find_if( m_itemList.begin(), m_itemList.end(), matchPath );
323 if ( i == m_itemList.end() ) {
324 i = std::find_if( m_optItemList.begin(), m_optItemList.end(), matchPath );
325 if ( i == m_optItemList.end() ) return nullptr;
326 }
327 return *i;
328 }
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:772
std::vector::end
T end(T...args)
DataStoreItem
Description of the DataStoreItem class.
Definition: DataStoreItem.h:17
OutputStream::m_itemList
Items m_itemList
Vector of items to be saved to this stream.
Definition: OutputStream.h:87
std::find_if
T find_if(T...args)
std::vector::begin
T begin(T...args)
OutputStream::m_optItemList
Items m_optItemList
Vector of optional items to be saved to this stream.
Definition: OutputStream.h:89

bool OutputStream::hasInput | ( |  | ) | const
| protected virtual

Tell if the instance has been configured with input items or not.

Reimplemented in InputCopyStream.

Definition at line 561 of file OutputStream.cpp.

562 {
563 return !( m_itemNames.empty() && m_optItemNames.empty() && m_algDependentItemList.empty() );
564 }
OutputStream::m_optItemNames
Gaudi::Property< ItemNames > m_optItemNames
Definition: OutputStream.h:39
OutputStream::m_algDependentItemList
Gaudi::Property< AlgDependentItemNames > m_algDependentItemList
Definition: OutputStream.h:41
OutputStream::m_itemNames
Gaudi::Property< ItemNames > m_itemNames
Definition: OutputStream.h:38

StatusCode OutputStream::initialize | ( |  | ) |
| override

Initialize OutputStream.

Definition at line 40 of file OutputStream.cpp.

41 {
42
43 // Reset the number of events written
44 m_events = 0;
45 // Get access to the DataManagerSvc
46 m_pDataManager = serviceLocator()->service( m_storeName );
47 if ( !m_pDataManager ) {
48 fatal() << "Unable to locate IDataManagerSvc interface" << endmsg;
49 return StatusCode::FAILURE;
50 }
51 // Get access to the IncidentService
52 m_incidentSvc = serviceLocator()->service( "IncidentSvc" );
53 if ( !m_incidentSvc ) {
54 warning() << "Error retrieving IncidentSvc." << endmsg;
55 return StatusCode::FAILURE;
56 }
57 // Get access to the assigned data service
58 m_pDataProvider = serviceLocator()->service( m_storeName );
59 if ( !m_pDataProvider ) {
60 fatal() << "Unable to locate IDataProviderSvc interface of " << m_storeName << endmsg;
61 return StatusCode::FAILURE;
62 }
63 if ( hasInput() ) {
64 StatusCode status = connectConversionSvc();
65 if ( !status.isSuccess() ) {
66 fatal() << "Unable to connect to conversion service." << endmsg;
67 if ( m_outputName != "" && m_fireIncidents )
68 m_incidentSvc->fireIncident( Incident( m_outputName, IncidentType::FailOutputFile ) );
69 return status;
70 }
71 }
72
73 // Clear the list with optional items
74 clearItems( m_optItemList );
75 // Clear the item list
76 clearItems( m_itemList );
77
78 // Take the new item list from the properties.
79 ON_DEBUG debug() << "ItemList : " << m_itemNames.value() << endmsg;
80 for ( const auto& i : m_itemNames ) addItem( m_itemList, i );
81
82 // Take the new item list from the properties.
83 ON_DEBUG debug() << "OptItemList : " << m_optItemNames.value() << endmsg;
84 for ( const auto& i : m_optItemNames ) addItem( m_optItemList, i );
85
86 // prepare the algorithm selected dependent locations
87 ON_DEBUG debug() << "AlgDependentItemList : " << m_algDependentItemList.value() << endmsg;
88 for ( const auto& a : m_algDependentItemList ) {
89 // Get the algorithm pointer
90 Algorithm* theAlgorithm = decodeAlgorithm( a.first );
91 if ( theAlgorithm ) {
92 // Get the item list for this alg
93 auto& items = m_algDependentItems[theAlgorithm];
94 // Clear the list for this alg
95 clearItems( items );
96 // fill the list again
97 for ( const auto& i : a.second ) addItem( items, i );
98 }
99 }
100
101 // Take the item list to the data service preload list.
102 if ( m_doPreLoad ) {
103 for ( auto& j : m_itemList ) m_pDataProvider->addPreLoadItem( *j ).ignore();
104 // Not working: bad reference counting! pdataSvc->release();
105 }
106
107 if ( m_doPreLoadOpt ) {
108 for ( auto& j : m_optItemList ) m_pDataProvider->addPreLoadItem( *j ).ignore();
109 }
110 info() << "Data source: " << m_storeName.value() << " output: " << m_output.value() << endmsg;
111
112 // Decode the accept, required and veto Algorithms. The logic is the following:
113 // a. The event is accepted if all lists are empty.
114 // b. The event is provisionally accepted if any Algorithm in the accept list
115 // has been executed and has indicated that its filter is passed. This
116 // provisional acceptance can be overridden by the other lists.
117 // c. The event is rejected unless all Algorithms in the required list have
118 // been executed and have indicated that their filter passed.
119 // d. The event is rejected if any Algorithm in the veto list has been
120 // executed and has indicated that its filter has passed.
121 decodeAcceptAlgs().ignore();
122 decodeRequireAlgs().ignore();
123 decodeVetoAlgs().ignore();
124 return StatusCode::SUCCESS;
125 }
StatusCode::SUCCESS
Definition: StatusCode.h:30
OutputStream::clearItems
void clearItems(Items &itms)
Clear item list.
Definition: OutputStream.cpp:312
OutputStream::hasInput
virtual bool hasInput() const
Tell if the instance has been configured with input items or not.
Definition: OutputStream.cpp:561
OutputStream::decodeRequireAlgs
StatusCode decodeRequireAlgs()
Decode list of Algorithms that this stream requires.
Definition: OutputStream.cpp:449
StatusCode::FAILURE
Definition: StatusCode.h:29
OutputStream::m_events
int m_events
Number of events written to this output stream.
Definition: OutputStream.h:95
CommonMessagingBase::info
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
Definition: CommonMessaging.h:123
IDataProviderSvc::addPreLoadItem
virtual StatusCode addPreLoadItem(const DataStoreItem &item)=0
Add an item to the preload list.
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:74
OutputStream::m_output
Gaudi::Property< std::string > m_output
Definition: OutputStream.h:51
OutputStream::m_outputName
Gaudi::Property< std::string > m_outputName
Definition: OutputStream.h:52
OutputStream::m_optItemNames
Gaudi::Property< ItemNames > m_optItemNames
Definition: OutputStream.h:39
OutputStream::m_pDataProvider
SmartIF< IDataProviderSvc > m_pDataProvider
Keep reference to the data provider service.
Definition: OutputStream.h:79
OutputStream::m_doPreLoad
Gaudi::Property< bool > m_doPreLoad
Definition: OutputStream.h:47
ISvcLocator::service
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Definition: ISvcLocator.h:78
IIncidentSvc::fireIncident
virtual void fireIncident(const Incident &incident)=0
Fire an Incident.
OutputStream::connectConversionSvc
virtual StatusCode connectConversionSvc()
Definition: OutputStream.cpp:355
CommonMessagingBase::warning
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Definition: CommonMessaging.h:120
OutputStream::m_algDependentItems
AlgDependentItems m_algDependentItems
Items to be saved for specific algorithms.
Definition: OutputStream.h:91
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
OutputStream::m_itemList
Items m_itemList
Vector of items to be saved to this stream.
Definition: OutputStream.h:87
OutputStream::addItem
void addItem(Items &itms, const std::string &descriptor)
Add item to output streamer list.
Definition: OutputStream.cpp:331
OutputStream::m_algDependentItemList
Gaudi::Property< AlgDependentItemNames > m_algDependentItemList
Definition: OutputStream.h:41
OutputStream::m_pDataManager
SmartIF< IDataManagerSvc > m_pDataManager
Keep reference to the data manager service.
Definition: OutputStream.h:81
OutputStream::m_incidentSvc
SmartIF< IIncidentSvc > m_incidentSvc
Reference to the incident service.
Definition: OutputStream.h:72
Algorithm::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
The standard service locator.
Definition: Algorithm.cpp:787
OutputStream::decodeVetoAlgs
StatusCode decodeVetoAlgs()
Decode list of Algorithms that this stream is vetoed by.
Definition: OutputStream.cpp:464
Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:78
OutputStream::m_storeName
Gaudi::Property< std::string > m_storeName
Definition: OutputStream.h:53
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:126
Incident
Base class for all Incidents (computing events).
Definition: Incident.h:17
OutputStream::m_doPreLoadOpt
Gaudi::Property< bool > m_doPreLoadOpt
Definition: OutputStream.h:49
ON_DEBUG
#define ON_DEBUG
Definition: OutputStream.cpp:27
OutputStream::decodeAlgorithm
Algorithm * decodeAlgorithm(const std::string &theName)
Decode a single algorithm name.
Definition: OutputStream.cpp:479
StatusCode::ignore
void ignore() const
Definition: StatusCode.h:106
CommonMessagingBase::fatal
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
Definition: CommonMessaging.h:111
OutputStream::m_itemNames
Gaudi::Property< ItemNames > m_itemNames
Definition: OutputStream.h:38
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
OutputStream::decodeAcceptAlgs
StatusCode decodeAcceptAlgs()
Decode list of Algorithms that this stream accepts.
Definition: OutputStream.cpp:434
OutputStream::m_fireIncidents
bool m_fireIncidents
should I fire incidents for writing opening/closing etc? in the baseclass, always fire the incidents ...
Definition: OutputStream.h:69
OutputStream::m_optItemList
Items m_optItemList
Vector of optional items to be saved to this stream.
Definition: OutputStream.h:89

bool OutputStream::isEventAccepted | ( |  | ) | const
| protected

Test whether this event should be output.

Definition at line 533 of file OutputStream.cpp.

534 {
535 auto passed = []( const Algorithm* alg ) { return alg->isExecuted() && alg->filterPassed(); };
536
537 // Loop over all Algorithms in the accept list to see
538 // whether any have been executed and have their filter
539 // passed flag set. Any match causes the event to be
540 // provisionally accepted.
541 bool result = m_acceptAlgs.empty() || std::any_of( std::begin( m_acceptAlgs ), std::end( m_acceptAlgs ), passed );
542
543 // Loop over all Algorithms in the required list to see
544 // whether all have been executed and have their filter
545 // passed flag set. Any mismatch causes the event to be
546 // rejected.
547 if ( result && !m_requireAlgs.empty() ) {
548 result = std::all_of( std::begin( m_requireAlgs ), std::end( m_requireAlgs ), passed );
549 }
550
551 // Loop over all Algorithms in the veto list to see
552 // whether any have been executed and have their filter
553 // passed flag set. Any match causes the event to be
554 // rejected.
555 if ( result && !m_vetoAlgs.empty() ) {
556 result = std::none_of( std::begin( m_vetoAlgs ), std::end( m_vetoAlgs ), passed );
557 }
558 return result;
559 }
std::vector::empty
T empty(T...args)
std::end
T end(T...args)
OutputStream::m_requireAlgs
std::vector< Algorithm * > m_requireAlgs
Vector of Algorithms that this stream requires.
Definition: OutputStream.h:100
OutputStream::m_acceptAlgs
std::vector< Algorithm * > m_acceptAlgs
Vector of Algorithms that this stream accepts.
Definition: OutputStream.h:98
Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:78
std::begin
T begin(T...args)
std::any_of
T any_of(T...args)
OutputStream::m_vetoAlgs
std::vector< Algorithm * > m_vetoAlgs
Vector of Algorithms that this stream is vetoed by.
Definition: OutputStream.h:102

void OutputStream::requireAlgsHandler | ( | Gaudi::Details::PropertyBase & | theProp | ) |
| protected

Handler for RequireAlgs Property.

Definition at line 456 of file OutputStream.cpp.

457 {
458 StatusCode sc = decodeAlgorithms( m_requireNames, m_requireAlgs );
459 if ( sc.isFailure() ) {
460 throw GaudiException( "Failure in OutputStream::decodeAlgorithms", "OutputStream::requireAlgsHandler", sc );
461 }
462 }
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:23
OutputStream::m_requireAlgs
std::vector< Algorithm * > m_requireAlgs
Vector of Algorithms that this stream requires.
Definition: OutputStream.h:100
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:84
OutputStream::decodeAlgorithms
StatusCode decodeAlgorithms(Gaudi::Property< std::vector< std::string >> &theNames, std::vector< Algorithm * > &theAlgs)
Decode specified list of Algorithms.
Definition: OutputStream.cpp:506
OutputStream::m_requireNames
Gaudi::Property< std::vector< std::string > > m_requireNames
Definition: OutputStream.h:59
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26

IDataSelector* OutputStream::selectedObjects | ( |  | ) |
| inline private

Return the list of selected objects.

Definition at line 159 of file OutputStream.h.

159 { return &m_objects; }
OutputStream::m_objects
IDataSelector m_objects
Collection of objects being selected.
Definition: OutputStream.h:93

void OutputStream::vetoAlgsHandler | ( | Gaudi::Details::PropertyBase & | theProp | ) |
| protected

Handler for VetoAlgs Property.

Definition at line 471 of file OutputStream.cpp.

472 {
473 StatusCode sc = decodeAlgorithms( m_vetoNames, m_vetoAlgs );
474 if ( sc.isFailure() ) {
475 throw GaudiException( "Failure in OutputStream::decodeAlgorithms", "OutputStream::vetoAlgsHandler", sc );
476 }
477 }
OutputStream::m_vetoNames
Gaudi::Property< std::vector< std::string > > m_vetoNames
Definition: OutputStream.h:61
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:23
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:84
OutputStream::decodeAlgorithms
StatusCode decodeAlgorithms(Gaudi::Property< std::vector< std::string >> &theNames, std::vector< Algorithm * > &theAlgs)
Decode specified list of Algorithms.
Definition: OutputStream.cpp:506
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
OutputStream::m_vetoAlgs
std::vector< Algorithm * > m_vetoAlgs
Vector of Algorithms that this stream is vetoed by.
Definition: OutputStream.h:102

StatusCode OutputStream::writeObjects | ( |  | ) |
| protected virtual

Select the different objects and write them to file.

Reimplemented in TagCollectionStream, and SequentialOutputStream.

Definition at line 162 of file OutputStream.cpp.

163 {
164 // Connect the output file to the service
165 StatusCode status = collectObjects();
166 if ( status.isSuccess() ) {
167 IDataSelector* sel = selectedObjects();
168 if ( sel->begin() != sel->end() ) {
169 status = m_pConversionSvc->connectOutput( m_outputName, m_outputType );
170 if ( status.isSuccess() ) {
171 // Now pass the collection to the persistency service
172 IOpaqueAddress* pAddress = nullptr;
173 for ( auto& j : *sel ) {
174 try {
175 const StatusCode iret = m_pConversionSvc->createRep( j, pAddress );
176 if ( !iret.isSuccess() ) {
177 status = iret;
178 continue;
179 }
180 IRegistry* pReg = j->registry();
181 pReg->setAddress( pAddress );
182 } catch ( const std::exception& excpt ) {
183 const std::string loc = ( j->registry() ? j->registry()->identifier() : "UnRegistered" );
184 fatal() << "std::exception during createRep for '" << loc << "' " << System::typeinfoName( typeid( *j ) )
185 << endmsg;
186 fatal() << excpt.what() << endmsg;
187 throw;
188 }
189 }
190 for ( auto& j : *sel ) {
191 try {
192 IRegistry* pReg = j->registry();
193 const StatusCode iret = m_pConversionSvc->fillRepRefs( pReg->address(), j );
194 if ( !iret.isSuccess() ) status = iret;
195 } catch ( const std::exception& excpt ) {
196 const std::string loc = ( j->registry() ? j->registry()->identifier() : "UnRegistered" );
197 fatal() << "std::exception during fillRepRefs for '" << loc << "'" << System::typeinfoName( typeid( *j ) )
198 << endmsg;
199 fatal() << excpt.what() << endmsg;
200 throw;
201 }
202 }
203 // Commit the data if there was no error; otherwise possibly discard
204 if ( status.isSuccess() ) {
205 status = m_pConversionSvc->commitOutput( m_outputName, true );
206 } else {
207 m_pConversionSvc->commitOutput( m_outputName, false ).ignore();
208 }
209 }
210 }
211 }
212 return status;
213 }
OutputStream::m_outputType
std::string m_outputType
Output type: NEW(NEW,CREATE,WRITE,RECREATE), UPDATE)
Definition: OutputStream.h:75
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:299
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:74
OutputStream::m_outputName
Gaudi::Property< std::string > m_outputName
Definition: OutputStream.h:52
IOTest.sel
sel
Definition: IOTest.py:84
std::vector::end
T end(T...args)
IConverter::createRep
virtual StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress)=0
Convert the transient object to the requested representation.
OutputStream::selectedObjects
IDataSelector * selectedObjects()
Return the list of selected objects.
Definition: OutputStream.h:159
std::string
STL class.
OutputStream::m_pConversionSvc
SmartIF< IConversionSvc > m_pConversionSvc
Keep reference to the data conversion service.
Definition: OutputStream.h:83
IConversionSvc::connectOutput
virtual StatusCode connectOutput(const std::string &outputFile)=0
Connect the output file to the service.
IConversionSvc::commitOutput
virtual StatusCode commitOutput(const std::string &outputFile, bool do_commit)=0
Commit pending output.
std::exception::what
T what(T...args)
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
IRegistry
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition: IRegistry.h:22
std::exception
STL class.
std::vector< DataObject * >
std::vector::begin
T begin(T...args)
IRegistry::setAddress
virtual void setAddress(IOpaqueAddress *pAddress)=0
Set/Update Opaque storage address.
IOpaqueAddress
Opaque address interface definition.
Definition: IOpaqueAddress.h:23
StatusCode::ignore
void ignore() const
Definition: StatusCode.h:106
CommonMessagingBase::fatal
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
Definition: CommonMessaging.h:111
IRegistry::address
virtual IOpaqueAddress * address() const =0
Retrieve opaque storage address.
OutputStream::collectObjects
virtual StatusCode collectObjects()
Collect all objects to be written to the output stream.
Definition: OutputStream.cpp:235
IConverter::fillRepRefs
virtual StatusCode fillRepRefs(IOpaqueAddress *pAddress, DataObject *pObject)=0
Resolve the references of the converted object.
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244

## Member Data Documentation

std::vector<Algorithm*> OutputStream::m_acceptAlgs
| protected

Vector of Algorithms that this stream accepts.

Definition at line 98 of file OutputStream.h.

Gaudi::Property<std::vector<std::string> > OutputStream::m_acceptNames
| protected

Initial value:
{
this, "AcceptAlgs", {}, "names of Algorithms that this stream accepts"}

Definition at line 57 of file OutputStream.h.

std::unique_ptr<OutputStreamAgent> OutputStream::m_agent
| protected

Keep reference of agent.

Definition at line 77 of file OutputStream.h.

Gaudi::Property<AlgDependentItemNames> OutputStream::m_algDependentItemList
| protected

Initial value:
{
this,
"AlgDependentItemList",
{},
"mapping between algorithm names, and a list of items for which, if the "
"algorithm in question accepted the event, they should be also stored"}

Definition at line 41 of file OutputStream.h.

AlgDependentItems OutputStream::m_algDependentItems
| protected

Items to be saved for specific algorithms.

Definition at line 91 of file OutputStream.h.

DataStoreItem* OutputStream::m_currentItem
| protected

Keep track of the current item.

Definition at line 85 of file OutputStream.h.

Gaudi::Property<bool> OutputStream::m_doPreLoad
| protected

Initial value:
{this, "Preload", true,
"flag indicating whether data pre-loading should be performed"}

Definition at line 47 of file OutputStream.h.

Gaudi::Property<bool> OutputStream::m_doPreLoadOpt
| protected

Initial value:
{this, "PreloadOptItems", false,
"flag indicating whether optional items should be preloaded"}

Definition at line 49 of file OutputStream.h.

int OutputStream::m_events
| protected

Number of events written to this output stream.

Definition at line 95 of file OutputStream.h.

bool OutputStream::m_fireIncidents = true
| protected

should I fire incidents for writing opening/closing etc? in the baseclass, always fire the incidents by default in e.g.

RecordStream this will be set to false, and configurable

Definition at line 69 of file OutputStream.h.

SmartIF<IIncidentSvc> OutputStream::m_incidentSvc
| protected

Reference to the incident service.

Definition at line 72 of file OutputStream.h.

Items OutputStream::m_itemList
| protected

Vector of items to be saved to this stream.

Definition at line 87 of file OutputStream.h.

Gaudi::Property<ItemNames> OutputStream::m_itemNames {this, "ItemList", {}, "vector of item names to be saved to this stream"}
| protected

Definition at line 38 of file OutputStream.h.

IDataSelector OutputStream::m_objects
| protected

Collection of objects being selected.

Definition at line 93 of file OutputStream.h.

Items OutputStream::m_optItemList
| protected

Vector of optional items to be saved to this stream.

Definition at line 89 of file OutputStream.h.

Gaudi::Property<ItemNames> OutputStream::m_optItemNames
| protected

Initial value:
{
this, "OptItemList", {}, "vector of optional item names to be saved to this stream"}

Definition at line 39 of file OutputStream.h.

Gaudi::Property<std::string> OutputStream::m_output {this, "Output", {}, "name of the output file specification"}
| protected

Definition at line 51 of file OutputStream.h.

Gaudi::Property<std::string> OutputStream::m_outputName {this, "OutputFile", {}, "name of the output file"}
| protected

Definition at line 52 of file OutputStream.h.

std::string OutputStream::m_outputType = "UPDATE"
| protected

Output type: NEW(NEW,CREATE,WRITE,RECREATE), UPDATE)

Definition at line 75 of file OutputStream.h.

SmartIF<IConversionSvc> OutputStream::m_pConversionSvc
| protected

Keep reference to the data conversion service.

Definition at line 83 of file OutputStream.h.

SmartIF<IDataManagerSvc> OutputStream::m_pDataManager
| protected

Keep reference to the data manager service.

Definition at line 81 of file OutputStream.h.

SmartIF<IDataProviderSvc> OutputStream::m_pDataProvider
| protected

Keep reference to the data provider service.

Definition at line 79 of file OutputStream.h.

Gaudi::Property<std::string> OutputStream::m_persName
| protected

Initial value:
{this, "EvtConversionSvc", "EventPersistencySvc",
"name of the persistency service capable to write data from the store"}

Definition at line 55 of file OutputStream.h.

std::vector<Algorithm*> OutputStream::m_requireAlgs
| protected

Vector of Algorithms that this stream requires.

Definition at line 100 of file OutputStream.h.

Gaudi::Property<std::vector<std::string> > OutputStream::m_requireNames
| protected

Initial value:
{
this, "RequireAlgs", {}, "names of Algorithms that this stream requires"}

Definition at line 59 of file OutputStream.h.

Gaudi::Property<std::string> OutputStream::m_storeName
| protected

Initial value:
{this, "EvtDataSvc", "EventDataSvc",
"name of the service managing the data store"}

Definition at line 53 of file OutputStream.h.

Gaudi::Property<bool> OutputStream::m_verifyItems
| protected

Initial value:
{this, "VerifyItems", true,
"flag to indicate that item consistency should be checked"}

Definition at line 63 of file OutputStream.h.

std::vector<Algorithm*> OutputStream::m_vetoAlgs
| protected

Vector of Algorithms that this stream is vetoed by.

Definition at line 102 of file OutputStream.h.

Gaudi::Property<std::vector<std::string> > OutputStream::m_vetoNames
| protected

Initial value:
{
this, "VetoAlgs", {}, "names of Algorithms that this stream is vetoed by"}

Definition at line 61 of file OutputStream.h.

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

- GaudiCommonSvc/src/PersistencySvc/OutputStream.h
- GaudiCommonSvc/src/PersistencySvc/OutputStream.cpp