| The Gaudi Framework v27r1

- 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 CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > >
using | base_class = CommonMessaging

## 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...
| ~Algorithm () override=default
| Destructor. 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 () 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...
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
| Obsoleted name, kept due to the backwards compatibility. More...
SmartIF< IDataProviderSvc > & | detSvc () const
| The standard detector data service. More...
SmartIF< IDataProviderSvc > & | detDataService () const
| Obsoleted name, kept due to the backwards compatibility. More...
SmartIF< IConversionSvc > & | detCnvSvc () const
| The standard detector data persistency conversion service. More...
SmartIF< IConversionSvc > & | detDataCnvService () const
| Obsoleted name, kept due to the backwards compatibility. More...
SmartIF< IDataProviderSvc > & | eventSvc () const
| The standard event data service. More...
SmartIF< IDataProviderSvc > & | evtSvc () const
| shortcut for method eventSvc More...
SmartIF< IDataProviderSvc > & | eventDataService () const
| Obsoleted name, kept due to the backwards compatibility. More...
SmartIF< IConversionSvc > & | eventCnvSvc () const
| The standard event data persistency conversion service. More...
SmartIF< IConversionSvc > & | eventDataCnvService () const
| Obsoleted name, kept due to the backwards compatibility. More...
SmartIF< IHistogramSvc > & | histoSvc () const
| The standard histogram service. More...
SmartIF< IHistogramSvc > & | histogramDataService () const
| Obsoleted name, kept due to the backwards compatibility. More...
SmartIF< INTupleSvc > & | ntupleSvc () const
| The standard N tuple service. More...
SmartIF< INTupleSvc > & | ntupleService () const
| Obsoleted name, kept due to the backwards compatibility. More...
SmartIF< IRndmGenSvc > & | randSvc () const
| AIDA-based NTuple service Returns a pointer to the AIDATuple 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
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 | setProperty (const Property &p) override
| Implementation of IProperty::setProperty. More...
StatusCode | setProperty (const std::string &s) override
| Implementation of IProperty::setProperty. More...
StatusCode | setProperty (const std::string &n, const std::string &v) override
| Implementation of IProperty::setProperty. More...
StatusCode | getProperty (Property *p) const override
| Implementation of IProperty::getProperty. More...
const Property & | getProperty (const std::string &name) const override
| Implementation of IProperty::getProperty. More...
StatusCode | getProperty (const std::string &n, std::string &v) const override
| Implementation of IProperty::getProperty. More...
const std::vector< Property * > & | getProperties () const override
| Implementation of IProperty::getProperties. More...
bool | hasProperty (const std::string &name) const override
| Implementation of IProperty::hasProperty. More...
PropertyMgr * | getPropertyMgr ()
StatusCode | setProperties ()
| Set the algorithm's properties. More...
template<class T >
Property * | declareProperty (const std::string &name, T &property, const std::string &doc="none") const
| Declare the named property. More...
Property * | declareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const
| Declare remote named properties. More...
template<class T >
Property * | declareProperty (const std::string &name, ToolHandle< T > &hndl, const std::string &doc="none") const
template<class T >
Property * | declareProperty (const std::string &name, ToolHandleArray< T > &hndlArr, const std::string &doc="none") const
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...
template<class TYPE >
StatusCode | setProperty (const std::string &name, const TYPE &value)
| set the property form the value More...
EventContext * | getContext () const
| get the context More...
void | setContext (EventContext *context)
| set the context More...
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override
virtual const DataObjIDColl & | extraInputDeps () const override
virtual const DataObjIDColl & | extraOutputDeps () const override
virtual void | acceptDHVisitor (IDataHandleVisitor *) const override
const DataObjIDColl & | inputDataObjs () const
const DataObjIDColl & | outputDataObjs () const
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 | 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
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...

## Protected Member Functions
StatusCode | decodeAcceptAlgs ()
| Decode list of Algorithms that this stream accepts. More...
void | acceptAlgsHandler (Property &theProp)
| Handler for AcceptAlgs Property. More...
StatusCode | decodeRequireAlgs ()
| Decode list of Algorithms that this stream requires. More...
void | requireAlgsHandler (Property &theProp)
| Handler for RequireAlgs Property. More...
StatusCode | decodeVetoAlgs ()
| Decode list of Algorithms that this stream is vetoed by. More...
void | vetoAlgsHandler (Property &theProp)
| Handler for VetoAlgs Property. More...
Algorithm * | decodeAlgorithm (const std::string &theName)
| Decode a single algorithm name. More...
StatusCode | decodeAlgorithms (StringArrayProperty &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
virtual void | declareInput (Gaudi::DataHandle *im) override
virtual void | declareOutput (Gaudi::DataHandle *im) override
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 CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > >
void | updateMsgStreamOutputLevel (int level)
| Update the output level of the cached MsgStream. More...

## Protected Attributes
SmartIF< IIncidentSvc > | m_incidentSvc
| Reference to the incident service. More...
bool | m_doPreLoad
| Flag indicating whether data pre-loading should be performed. More...
bool | m_doPreLoadOpt
| Flag indicating whether optional items should be preloaded. More...
bool | m_verifyItems
| Flag to indicate that item consistency should be checked. More...
std::string | m_storeName
| Name of the service managing the data store. More...
std::string | m_persName
| Name of the persistency service capable to write data from the store. More...
std::string | m_output
| Name of the output file specification. More...
std::string | m_outputName
| Name of the output file. More...
std::string | m_outputType
| 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...
ItemNames | m_itemNames
| Vector of item names. More...
Items | m_itemList
| Vector of items to be saved to this stream. More...
ItemNames | m_optItemNames
| Vector of item names. More...
Items | m_optItemList
| Vector of optional items to be saved to this stream. More...
AlgDependentItemNames | m_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. 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...
StringArrayProperty | m_acceptNames
| Vector of names of Algorithms that this stream accepts. More...
StringArrayProperty | m_requireNames
| Vector of names of Algorithms that this stream requires. More...
StringArrayProperty | m_vetoNames
| Vector of names of Algorithms that this stream is vetoed by. 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...
bool | m_fireIncidents
| should I fire incidents for writing opening/closing etc? More...
Protected Attributes inherited from Algorithm
EventContext * | m_event_context
| Event specific data for multiple event processing. More...
SmartIF< PropertyMgr > | m_propertyMgr
| For management of properties. More...
std::unique_ptr< IDataHandleVisitor > | m_updateDataHandles
| Hook for for derived classes to provide a custom visitor for data handles. More...

## 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 34 of file OutputStream.h.

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

Definition at line 33 of file OutputStream.h.

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

Definition at line 32 of file OutputStream.h.

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

Definition at line 31 of file OutputStream.h.

## Constructor & Destructor Documentation

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

Standard algorithm Constructor.

in the baseclass, always fire the incidents by default in e.g. RecordStream this will be set to false, and configurable

in the baseclass, always fire the incidents by default in RecordStream this will be set to false, and configurable

Definition at line 30 of file OutputStream.cpp.

31 : Algorithm(name, pSvcLocator),
32 m_agent { new OutputStreamAgent(this) }
33 {
34 m_doPreLoad = true;
35 m_doPreLoadOpt = false;
36 m_verifyItems = true;
37 m_outputType = "UPDATE";
38 m_storeName = "EventDataSvc";
39 m_persName = "EventPersistencySvc";
42 m_fireIncidents = true;
43 declareProperty("ItemList", m_itemNames);
44 declareProperty("OptItemList", m_optItemNames);
45 declareProperty("AlgDependentItemList", m_algDependentItemList);
46 declareProperty("Preload", m_doPreLoad);
47 declareProperty("PreloadOptItems", m_doPreLoadOpt);
48 declareProperty("Output", m_output);
49 declareProperty("OutputFile", m_outputName);
50 declareProperty("EvtDataSvc", m_storeName);
51 declareProperty("EvtConversionSvc", m_persName);
52 declareProperty("AcceptAlgs", m_acceptNames);
53 declareProperty("RequireAlgs", m_requireNames);
54 declareProperty("VetoAlgs", m_vetoNames);
55 declareProperty("VerifyItems", m_verifyItems);
58
59 // Associate action handlers with the AcceptAlgs, RequireAlgs and VetoAlgs.
60 m_acceptNames.declareUpdateHandler ( &OutputStream::acceptAlgsHandler , this );
61 m_requireNames.declareUpdateHandler( &OutputStream::requireAlgsHandler, this );
62 m_vetoNames.declareUpdateHandler ( &OutputStream::vetoAlgsHandler , this );
63
64 //setProperty( "OutputLevel", 2 );
65
66 }
OutputStream::m_acceptNames
StringArrayProperty m_acceptNames
Vector of names of Algorithms that this stream accepts.
Definition: OutputStream.h:82
OutputStream::m_storeName
std::string m_storeName
Name of the service managing the data store.
Definition: OutputStream.h:45
Property::declareUpdateHandler
virtual Property & declareUpdateHandler(std::function< void(Property &)> fun)
set new callback for update
Definition: Property.cpp:72
OutputStream::m_outputType
std::string m_outputType
Output type: NEW(NEW,CREATE,WRITE,RECREATE), UPDATE)
Definition: OutputStream.h:53
OutputStream::m_vetoNames
StringArrayProperty m_vetoNames
Vector of names of Algorithms that this stream is vetoed by.
Definition: OutputStream.h:86
Algorithm::declareProperty
Property * declareProperty(const std::string &name, T &property, const std::string &doc="none") const
Declare the named property.
Definition: Algorithm.h:426
OutputStream::m_outputName
std::string m_outputName
Name of the output file.
Definition: OutputStream.h:51
OutputStream::requireAlgsHandler
void requireAlgsHandler(Property &theProp)
Handler for RequireAlgs Property.
Definition: OutputStream.cpp:520
OutputStream::m_persName
std::string m_persName
Name of the persistency service capable to write data from the store.
Definition: OutputStream.h:47
OutputStreamAgent
Definition: OutputStreamAgent.h:30
OutputStream::m_algDependentItemList
AlgDependentItemNames m_algDependentItemList
Mapping between algorithm names, and a list of items for which, if the algorithm in question accepted...
Definition: OutputStream.h:74
OutputStream::m_agent
std::unique_ptr< OutputStreamAgent > m_agent
Keep reference of agent.
Definition: OutputStream.h:55
OutputStream::m_verifyItems
bool m_verifyItems
Flag to indicate that item consistency should be checked.
Definition: OutputStream.h:43
OutputStream::m_doPreLoad
bool m_doPreLoad
Flag indicating whether data pre-loading should be performed.
Definition: OutputStream.h:39
OutputStream::m_doPreLoadOpt
bool m_doPreLoadOpt
Flag indicating whether optional items should be preloaded.
Definition: OutputStream.h:41
Algorithm::Algorithm
Algorithm(const std::string &name, ISvcLocator *svcloc, const std::string &version=PACKAGE_VERSION)
Constructor.
Definition: Algorithm.cpp:43
OutputStream::m_itemNames
ItemNames m_itemNames
Vector of item names.
Definition: OutputStream.h:65
OutputStream::m_optItemNames
ItemNames m_optItemNames
Vector of item names.
Definition: OutputStream.h:69
OutputStream::acceptAlgsHandler
void acceptAlgsHandler(Property &theProp)
Handler for AcceptAlgs Property.
Definition: OutputStream.cpp:506
OutputStream::m_requireNames
StringArrayProperty m_requireNames
Vector of names of Algorithms that this stream requires.
Definition: OutputStream.h:84
OutputStream::m_output
std::string m_output
Name of the output file specification.
Definition: OutputStream.h:49
OutputStream::vetoAlgsHandler
void vetoAlgsHandler(Property &theProp)
Handler for VetoAlgs Property.
Definition: OutputStream.cpp:534
OutputStream::m_fireIncidents
bool m_fireIncidents
should I fire incidents for writing opening/closing etc?
Definition: OutputStream.h:125

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

Standard Destructor.

## Member Function Documentation

void OutputStream::acceptAlgsHandler | ( | Property & | theProp | ) |
| protected

Handler for AcceptAlgs Property.

Definition at line 506 of file OutputStream.cpp.

506 {
507 StatusCode sc = decodeAlgorithms( m_acceptNames, m_acceptAlgs );
508 if (sc.isFailure()) {
509 throw GaudiException("Failure in OutputStream::decodeAlgorithms",
510 "OutputStream::acceptAlgsHandler",sc);
511 }
512 }
OutputStream::m_acceptNames
StringArrayProperty m_acceptNames
Vector of names of Algorithms that this stream accepts.
Definition: OutputStream.h:82
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:23
merge_files.sc
int sc
Definition: merge_files.py:167
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:86
OutputStream::m_acceptAlgs
std::vector< Algorithm * > m_acceptAlgs
Vector of Algorithms that this stream accepts.
Definition: OutputStream.h:88
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
OutputStream::decodeAlgorithms
StatusCode decodeAlgorithms(StringArrayProperty &theNames, std::vector< Algorithm * > &theAlgs)
Decode specified list of Algorithms.
Definition: OutputStream.cpp:577

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

Add item to output streamer list.

Definition at line 398 of file OutputStream.cpp.

398 {
399 int level = 0;
400 auto sep = descriptor.rfind("#");
401 std::string obj_path = descriptor.substr(0,sep);
402 if ( sep != std::string::npos ) {
403 std::string slevel = descriptor.substr(sep+1);
404 level = ( slevel == "*" ) ? 9999999 : std::stoi(slevel);
405 }
406 if ( m_verifyItems ) {
407 size_t idx = obj_path.find("/",1);
408 while(idx != std::string::npos) {
409 std::string sub_item = obj_path.substr(0,idx);
410 if ( !findItem(sub_item) ) addItem(itms, sub_item+"#1");
411 idx = obj_path.find("/",idx+1);
412 }
413 }
414 itms.push_back( new DataStoreItem(obj_path, level) );
415 const auto& item = itms.back();
416 ON_DEBUG
417 debug() << "Adding OutputStream item " << item->path()
418 << " with " << item->depth()
419 << " level(s)." << endmsg;
420 }
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:387
OutputStream::m_verifyItems
bool m_verifyItems
Flag to indicate that item consistency should be checked.
Definition: OutputStream.h:43
OutputStream::addItem
void addItem(Items &itms, const std::string &descriptor)
Add item to output streamer list.
Definition: OutputStream.cpp:398
std::string::find
T find(T...args)
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:127
ana.item
tuple item
print s1,s2
Definition: ana.py:146
ON_DEBUG
#define ON_DEBUG
Definition: OutputStream.cpp:27
std::string::substr
T substr(T...args)
gaudirun.level
level
Definition: gaudirun.py:261
ana.itms
list itms
Definition: ana.py:135
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 380 of file OutputStream.cpp.

380 {
381 for ( auto& i : itms ) delete i;
382 itms.clear();
383 }
ana.itms
list itms
Definition: ana.py:135
ana.i
list i
Definition: ana.py:128

void OutputStream::clearSelection | ( |  | ) |

Clear list of selected objects.

Definition at line 375 of file OutputStream.cpp.

375 {
376 m_objects.clear();
377 }
OutputStream::m_objects
IDataSelector m_objects
Collection of objects being selected.
Definition: OutputStream.h:78
std::vector::clear
T clear(T...args)

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

Store agent's classback.

Definition at line 274 of file OutputStream.cpp.

274 {
275 if ( level < m_currentItem->depth() ) {
276 if ( dir->object() ) {
277 /*
278 std::cout << "Analysing ("
279 << dir->name()
280 << ") Object:"
281 << ((dir->object()==0) ? "UNLOADED" : "LOADED")
282 << std::endl;
283 */
284 m_objects.push_back(dir->object());
285 return true;
286 }
287 }
288 return false;
289 }
OutputStream::m_objects
IDataSelector m_objects
Collection of objects being selected.
Definition: OutputStream.h:78
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 292 of file OutputStream.cpp.

292 {
293 StatusCode status = StatusCode::SUCCESS;
294
295 // Traverse the tree and collect the requested objects
296 for ( auto& i : m_itemList) {
297 DataObject* obj = nullptr;
298 m_currentItem = i;
299 StatusCode iret = m_pDataProvider->retrieveObject(m_currentItem->path(), obj);
300 if ( iret.isSuccess() ) {
301 iret = m_pDataManager->traverseSubTree(obj, m_agent.get());
302 if ( !iret.isSuccess() ) status = iret;
303 }
304 else {
305 error() << "Cannot write mandatory object(s) (Not found) "
306 << m_currentItem->path() << endmsg;
307 status = iret;
308 }
309 }
310
311 // Traverse the tree and collect the requested objects (tolerate missing items here)
312 for ( auto& i : m_optItemList ) {
313 DataObject* obj = nullptr;
314 m_currentItem = i;
315 StatusCode iret = m_pDataProvider->retrieveObject(m_currentItem->path(), obj);
316 if ( iret.isSuccess() ) {
317 iret = m_pDataManager->traverseSubTree(obj, m_agent.get());
318 }
319 if ( !iret.isSuccess() ) {
320 ON_DEBUG
321 debug() << "Ignore request to write non-mandatory object(s) "
322 << m_currentItem->path() << endmsg;
323 }
324 }
325
326 // Collect objects dependent on particular algorithms
327 for ( const auto& iAlgItems : m_algDependentItems )
328 {
329 Algorithm * alg = iAlgItems.first;
330 const Items& items = iAlgItems.second;
331 if ( alg->isExecuted() && alg->filterPassed() )
332 {
333 ON_DEBUG
334 debug() << "Algorithm '" << alg->name() << "' fired. Adding " << items << endmsg;
335 for ( const auto& i : items )
336 {
337 DataObject* obj = nullptr;
338 m_currentItem = i;
339 StatusCode iret = m_pDataProvider->retrieveObject(m_currentItem->path(),obj);
340 if ( iret.isSuccess() )
341 {
342 iret = m_pDataManager->traverseSubTree(obj,m_agent.get());
343 if ( !iret.isSuccess() ) status = iret;
344 }
345 else
346 {
347 error() << "Cannot write mandatory (algorithm dependent) object(s) (Not found) "
348 << m_currentItem->path() << endmsg;
349 status = iret;
350 }
351 }
352 }
353 }
354
355 if (status.isSuccess())
356 {
357 // Remove duplicates from the list of objects, preserving the order in the list
358 std::set<DataObject*> unique;
359 std::vector<DataObject*> tmp; // temporary vector with the reduced list
360 tmp.reserve(m_objects.size());
361 for (auto& o : m_objects ) {
362 if (!unique.count(o)) {
363 // if the pointer is not in the set, add it to both the set and the temporary vector
364 unique.insert(o);
365 tmp.push_back(o);
366 }
367 }
368 m_objects.swap(tmp); // swap the data of the two vectors
369 }
370
371 return status;
372 }
OutputStream::m_objects
IDataSelector m_objects
Collection of objects being selected.
Definition: OutputStream.h:78
OutputStream::m_currentItem
DataStoreItem * m_currentItem
Keep track of the current item.
Definition: OutputStream.h:63
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:76
Algorithm::filterPassed
bool filterPassed() const override
Did this algorithm pass or fail its filter criterion for the last event?
Definition: Algorithm.cpp:857
OutputStream::m_pDataProvider
SmartIF< IDataProviderSvc > m_pDataProvider
Keep reference to the data provider service.
Definition: OutputStream.h:57
std::unique
T unique(T...args)
OutputStream::m_agent
std::unique_ptr< OutputStreamAgent > m_agent
Keep reference of agent.
Definition: OutputStream.h:55
DataStoreItem::path
const std::string & path() const
Accessor: Retrieve load path.
Definition: DataStoreItem.h:65
Algorithm::name
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:820
std::vector::push_back
T push_back(T...args)
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:118
OutputStream::m_algDependentItems
AlgDependentItems m_algDependentItems
Items to be saved for specific algorithms.
Definition: OutputStream.h:76
OutputStream::Items
std::vector< DataStoreItem * > Items
Definition: OutputStream.h:31
StatusCode::SUCCESS
Definition: StatusCode.h:30
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
Algorithm::isExecuted
bool isExecuted() const override
Has this algorithm been executed since the last reset?
Definition: Algorithm.cpp:840
OutputStream::m_itemList
Items m_itemList
Vector of items to be saved to this stream.
Definition: OutputStream.h:67
OutputStream::m_pDataManager
SmartIF< IDataManagerSvc > m_pDataManager
Keep reference to the data manager service.
Definition: OutputStream.h:59
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:74
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:127
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
ana.i
list i
Definition: ana.py:128
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:71
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 423 of file OutputStream.cpp.

423 {
424 StatusCode status = StatusCode(StatusCode::FAILURE, true);
425 // Get output file from input
426 std::string dbType, svc, shr;
427 for(auto attrib: Gaudi::Utils::AttribStringParser(m_output)) {
428 const std::string& tag = attrib.tag;
429 const std::string& val = attrib.value;
430 switch( ::toupper(tag[0]) ) {
431 case 'D':
432 m_outputName = val;
433 break;
434 case 'T':
435 dbType = val;
436 break;
437 case 'S':
438 switch( ::toupper(tag[1]) ) {
439 case 'V': svc = val; break;
440 case 'H': shr = "YES"; break;
441 }
442 break;
443 case 'O': // OPT='<NEW<CREATE,WRITE,RECREATE>, UPDATE>'
444 switch( ::toupper(val[0]) ) {
445 case 'R':
446 if ( ::strncasecmp(val.c_str(),"RECREATE",3)==0 )
447 m_outputType = "RECREATE";
448 else if ( ::strncasecmp(val.c_str(),"READ",3)==0 )
449 m_outputType = "READ";
450 break;
451 case 'C':
452 case 'N':
453 case 'W':
454 m_outputType = "NEW";
455 break;
456 case 'U':
457 m_outputType = "UPDATE";
458 break;
459 default:
460 m_outputType = "???";
461 break;
462 }
463 break;
464 default:
465 break;
466 }
467 }
468 if ( !shr.empty() ) m_outputType += "|SHARED";
469 // Get access to the default Persistency service
470 // The default service is the same for input as for output.
471 // If this is not desired, then a specialized OutputStream must overwrite
472 // this value.
473 if ( !dbType.empty() || !svc.empty() ) {
474 std::string typ = !dbType.empty() ? dbType : svc;
475 auto ipers = serviceLocator()->service<IPersistencySvc>(m_persName);
476 if( !ipers ) {
477 fatal() << "Unable to locate IPersistencySvc interface of " << m_persName << endmsg;
478 return StatusCode::FAILURE;
479 }
480 IConversionSvc *cnvSvc = nullptr;
481 status = ipers->getService(typ, cnvSvc);
482 if( !status.isSuccess() ) {
483 fatal() << "Unable to locate IConversionSvc interface of database type " << typ << endmsg;
484 return status;
485 }
486 // Increase reference count and keep service.
487 m_pConversionSvc = cnvSvc;
488 }
489 else
490 {
491 fatal()
492 << "Unable to locate IConversionSvc interface (Unknown technology) " << endmsg
493 << "You either have to specify a technology name or a service name!" << endmsg
494 << "Please correct the job option \"" << name() << ".Output\" !" << endmsg;
495 return StatusCode::FAILURE;
496 }
497 return StatusCode::SUCCESS;
498 }
Gaudi::Utils::AttribStringParser
Parse attribute strings allowing iteration over the various attributes.
Definition: AttribStringParser.h:30
std::string::empty
T empty(T...args)
IConversionSvc
Definition: IConversionSvc.h:37
OutputStream::m_outputType
std::string m_outputType
Output type: NEW(NEW,CREATE,WRITE,RECREATE), UPDATE)
Definition: OutputStream.h:53
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:76
Algorithm::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
The standard service locator.
Definition: Algorithm.cpp:929
OutputStream::m_outputName
std::string m_outputName
Name of the output file.
Definition: OutputStream.h:51
OutputStream::m_persName
std::string m_persName
Name of the persistency service capable to write data from the store.
Definition: OutputStream.h:47
std::string
STL class.
Algorithm::name
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:820
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:61
StatusCode::FAILURE
Definition: StatusCode.h:29
StatusCode::SUCCESS
Definition: StatusCode.h:30
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
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:112
OutputStream::m_output
std::string m_output
Name of the output file specification.
Definition: OutputStream.h:49
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 500 of file OutputStream.cpp.

500 {
501 ON_DEBUG
502 debug() << "AcceptAlgs : " << m_acceptNames.value() << endmsg;
503 return decodeAlgorithms( m_acceptNames, m_acceptAlgs );
504 }
OutputStream::m_acceptNames
StringArrayProperty m_acceptNames
Vector of names of Algorithms that this stream accepts.
Definition: OutputStream.h:82
OutputStream::m_acceptAlgs
std::vector< Algorithm * > m_acceptAlgs
Vector of Algorithms that this stream accepts.
Definition: OutputStream.h:88
PropertyWithValue::value
const TYPE & value() const
explicit conversion
Definition: Property.h:341
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:127
OutputStream::decodeAlgorithms
StatusCode decodeAlgorithms(StringArrayProperty &theNames, std::vector< Algorithm * > &theAlgs)
Decode specified list of Algorithms.
Definition: OutputStream.cpp:577
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 542 of file OutputStream.cpp.

543 {
544 Algorithm * theAlgorithm = nullptr;
545
546 auto theAlgMgr = serviceLocator()->as<IAlgManager>();
547 if ( theAlgMgr )
548 {
549 // Check whether the supplied name corresponds to an existing
550 // Algorithm object.
551 SmartIF<IAlgorithm> &theIAlg = theAlgMgr->algorithm(theName);
552 if ( theIAlg )
553 {
554 try
555 {
556 theAlgorithm = dynamic_cast<Algorithm*>(theIAlg.get());
557 }
558 catch(...)
559 {
560 // do nothing
561 }
562 }
563 }
564 else
565 {
566 fatal() << "Can't locate ApplicationMgr!!!" << endmsg;
567 }
568
569 if ( !theAlgorithm )
570 {
571 warning() << "Failed to decode Algorithm name " << theName << endmsg;
572 }
573
574 return theAlgorithm;
575 }
SmartIF< IAlgorithm >
Algorithm::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
The standard service locator.
Definition: Algorithm.cpp:929
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:121
Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:74
CommonMessagingBase::fatal
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
Definition: CommonMessaging.h:112
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244

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

Decode specified list of Algorithms.

Definition at line 577 of file OutputStream.cpp.

579 {
580 // Reset the list of Algorithms
581 theAlgs.clear( );
582
583 StatusCode result = StatusCode::SUCCESS;
584
585 // Build the list of Algorithms from the names list
586 for ( const auto& it : theNames.value() )
587 {
588
589 Algorithm * theAlgorithm = decodeAlgorithm( it );
590 if ( theAlgorithm )
591 {
592 // Check that the specified algorithm doesn't already exist in the list
593 if ( std::find( std::begin(theAlgs), std::end(theAlgs), theAlgorithm ) == std::end(theAlgs) ) {
594 theAlgorithm->addRef();
595 theAlgs.push_back( theAlgorithm );
596 }
597 }
598 else
599 {
600 info() << it << " doesn't exist - ignored" << endmsg;
601 }
602
603 }
604 result = StatusCode::SUCCESS;
605
606 return result;
607 }
CommonMessagingBase::info
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
Definition: CommonMessaging.h:124
std::end
T end(T...args)
std::vector::push_back
T push_back(T...args)
StatusCode::SUCCESS
Definition: StatusCode.h:30
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
std::vector::clear
T clear(T...args)
PropertyWithValue::value
const TYPE & value() const
explicit conversion
Definition: Property.h:341
Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:74
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:542
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 514 of file OutputStream.cpp.

514 {
515 ON_DEBUG
516 debug() << "RequireAlgs : " << m_requireNames.value() << endmsg;
517 return decodeAlgorithms( m_requireNames, m_requireAlgs );
518 }
OutputStream::m_requireAlgs
std::vector< Algorithm * > m_requireAlgs
Vector of Algorithms that this stream requires.
Definition: OutputStream.h:90
PropertyWithValue::value
const TYPE & value() const
explicit conversion
Definition: Property.h:341
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:127
OutputStream::decodeAlgorithms
StatusCode decodeAlgorithms(StringArrayProperty &theNames, std::vector< Algorithm * > &theAlgs)
Decode specified list of Algorithms.
Definition: OutputStream.cpp:577
OutputStream::m_requireNames
StringArrayProperty m_requireNames
Vector of names of Algorithms that this stream requires.
Definition: OutputStream.h:84
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 528 of file OutputStream.cpp.

528 {
529 ON_DEBUG
530 debug() << "VetoAlgs : " << m_vetoNames.value() << endmsg;
531 return decodeAlgorithms( m_vetoNames, m_vetoAlgs );
532 }
OutputStream::m_vetoNames
StringArrayProperty m_vetoNames
Vector of names of Algorithms that this stream is vetoed by.
Definition: OutputStream.h:86
PropertyWithValue::value
const TYPE & value() const
explicit conversion
Definition: Property.h:341
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:127
OutputStream::decodeAlgorithms
StatusCode decodeAlgorithms(StringArrayProperty &theNames, std::vector< Algorithm * > &theAlgs)
Decode specified list of Algorithms.
Definition: OutputStream.cpp:577
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:92
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 173 of file OutputStream.cpp.

174 {
175 // Clear any previously existing item list
176 clearSelection();
177 // Test whether this event should be output
178 if ( isEventAccepted() )
179 {
180 const StatusCode sc = writeObjects();
181 clearSelection();
182 ++m_events;
183 if ( sc.isSuccess() && m_fireIncidents )
184 {
185 m_incidentSvc->fireIncident(Incident(m_outputName,
186 IncidentType::WroteToOutputFile));
187 }
188 else if ( m_fireIncidents )
189 {
190 m_incidentSvc->fireIncident(Incident(m_outputName,
191 IncidentType::FailOutputFile));
192 }
193 return sc;
194 }
195 return StatusCode::SUCCESS;
196 }
OutputStream::isEventAccepted
bool isEventAccepted() const
Test whether this event should be output.
Definition: OutputStream.cpp:609
OutputStream::m_events
int m_events
Number of events written to this output stream.
Definition: OutputStream.h:80
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:76
OutputStream::m_outputName
std::string m_outputName
Name of the output file.
Definition: OutputStream.h:51
merge_files.sc
int sc
Definition: merge_files.py:167
OutputStream::writeObjects
virtual StatusCode writeObjects()
Select the different objects and write them to file.
Definition: OutputStream.cpp:199
IIncidentSvc::fireIncident
virtual void fireIncident(const Incident &incident)=0
Fire an Incident.
StatusCode::SUCCESS
Definition: StatusCode.h:30
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:375
OutputStream::m_incidentSvc
SmartIF< IIncidentSvc > m_incidentSvc
Reference to the incident service.
Definition: OutputStream.h:37
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?
Definition: OutputStream.h:125

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

Terminate OutputStream.

Definition at line 159 of file OutputStream.cpp.

159 {
160 info() << "Events output: " << m_events << endmsg;
161 if(m_fireIncidents) m_incidentSvc->fireIncident(Incident(m_outputName,
162 IncidentType::EndOutputFile));
163 m_incidentSvc.reset();
164 m_pDataProvider.reset();
165 m_pDataManager.reset();
166 m_pConversionSvc.reset();
167 clearItems(m_optItemList);
168 clearItems(m_itemList);
169 return StatusCode::SUCCESS;
170 }
OutputStream::clearItems
void clearItems(Items &itms)
Clear item list.
Definition: OutputStream.cpp:380
OutputStream::m_events
int m_events
Number of events written to this output stream.
Definition: OutputStream.h:80
CommonMessagingBase::info
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
Definition: CommonMessaging.h:124
OutputStream::m_outputName
std::string m_outputName
Name of the output file.
Definition: OutputStream.h:51
OutputStream::m_pDataProvider
SmartIF< IDataProviderSvc > m_pDataProvider
Keep reference to the data provider service.
Definition: OutputStream.h:57
OutputStream::m_pConversionSvc
SmartIF< IConversionSvc > m_pConversionSvc
Keep reference to the data conversion service.
Definition: OutputStream.h:61
IIncidentSvc::fireIncident
virtual void fireIncident(const Incident &incident)=0
Fire an Incident.
StatusCode::SUCCESS
Definition: StatusCode.h:30
OutputStream::m_itemList
Items m_itemList
Vector of items to be saved to this stream.
Definition: OutputStream.h:67
OutputStream::m_pDataManager
SmartIF< IDataManagerSvc > m_pDataManager
Keep reference to the data manager service.
Definition: OutputStream.h:59
OutputStream::m_incidentSvc
SmartIF< IIncidentSvc > m_incidentSvc
Reference to the incident service.
Definition: OutputStream.h:37
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?
Definition: OutputStream.h:125
OutputStream::m_optItemList
Items m_optItemList
Vector of optional items to be saved to this stream.
Definition: OutputStream.h:71

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

Find single item identified by its path (exact match)

Definition at line 387 of file OutputStream.cpp.

387 {
388 auto matchPath = [&](const DataStoreItem* i) { return i->path() == path; } ;
389 auto i = std::find_if( m_itemList.begin(), m_itemList.end(), matchPath );
390 if (i == m_itemList.end()) {
391 i = std::find_if( m_optItemList.begin(), m_optItemList.end(), matchPath );
392 if (i == m_optItemList.end()) return nullptr;
393 }
394 return *i;
395 }
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:67
Gaudi::Utils::Histos::path
GAUDI_API std::string path(const AIDA::IBaseHistogram *aida)
get the path in THS for AIDA histogram
Definition: HistoTableFormat.cpp:191
std::find_if
T find_if(T...args)
std::vector::begin
T begin(T...args)
ana.i
list i
Definition: ana.py:128
OutputStream::m_optItemList
Items m_optItemList
Vector of optional items to be saved to this stream.
Definition: OutputStream.h:71

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

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

Reimplemented in InputCopyStream.

Definition at line 638 of file OutputStream.cpp.

638 {
639 return !(m_itemNames.empty() && m_optItemNames.empty() &&
640 m_algDependentItemList.empty());
641 }
std::vector::empty
T empty(T...args)
OutputStream::m_algDependentItemList
AlgDependentItemNames m_algDependentItemList
Mapping between algorithm names, and a list of items for which, if the algorithm in question accepted...
Definition: OutputStream.h:74
OutputStream::m_itemNames
ItemNames m_itemNames
Vector of item names.
Definition: OutputStream.h:65
OutputStream::m_optItemNames
ItemNames m_optItemNames
Vector of item names.
Definition: OutputStream.h:69

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

Initialize OutputStream.

Definition at line 70 of file OutputStream.cpp.

70 {
71
72 // Reset the number of events written
73 m_events = 0;
74 // Get access to the DataManagerSvc
75 m_pDataManager = serviceLocator()->service(m_storeName);
76 if( !m_pDataManager ) {
77 fatal() << "Unable to locate IDataManagerSvc interface" << endmsg;
78 return StatusCode::FAILURE;
79 }
80 // Get access to the IncidentService
81 m_incidentSvc = serviceLocator()->service("IncidentSvc");
82 if( !m_incidentSvc ) {
83 warning() << "Error retrieving IncidentSvc." << endmsg;
84 return StatusCode::FAILURE;
85 }
86 // Get access to the assigned data service
87 m_pDataProvider = serviceLocator()->service(m_storeName);
88 if( !m_pDataProvider ) {
89 fatal() << "Unable to locate IDataProviderSvc interface of " << m_storeName << endmsg;
90 return StatusCode::FAILURE;
91 }
92 if ( hasInput() ) {
93 StatusCode status = connectConversionSvc();
94 if( !status.isSuccess() ) {
95 fatal() << "Unable to connect to conversion service." << endmsg;
96 if(m_outputName!="" && m_fireIncidents) m_incidentSvc->fireIncident(Incident(m_outputName,
97 IncidentType::FailOutputFile));
98 return status;
99 }
100 }
101
102 // Clear the list with optional items
103 clearItems(m_optItemList);
104 // Clear the item list
105 clearItems(m_itemList);
106
107 // Take the new item list from the properties.
108 ON_DEBUG debug() << "ItemList : " << m_itemNames << endmsg;
109 for( const auto& i : m_itemNames ) addItem( m_itemList, i );
110
111 // Take the new item list from the properties.
112 ON_DEBUG debug() << "OptItemList : " << m_optItemNames << endmsg;
113 for( const auto& i : m_optItemNames ) addItem( m_optItemList, i );
114
115 // prepare the algorithm selected dependent locations
116 ON_DEBUG debug() << "AlgDependentItemList : " << m_algDependentItemList << endmsg;
117 for ( const auto& a : m_algDependentItemList )
118 {
119 // Get the algorithm pointer
120 Algorithm * theAlgorithm = decodeAlgorithm( a.first );
121 if ( theAlgorithm )
122 {
123 // Get the item list for this alg
124 auto& items = m_algDependentItems[theAlgorithm];
125 // Clear the list for this alg
126 clearItems( items );
127 // fill the list again
128 for ( const auto& i : a.second ) addItem( items, i );
129 }
130 }
131
132 // Take the item list to the data service preload list.
133 if ( m_doPreLoad ) {
134 for(auto& j : m_itemList) m_pDataProvider->addPreLoadItem( *j ).ignore();
135 // Not working: bad reference counting! pdataSvc->release();
136 }
137
138 if ( m_doPreLoadOpt ) {
139 for(auto& j : m_optItemList) m_pDataProvider->addPreLoadItem( *j ).ignore();
140 }
141 info() << "Data source: " << m_storeName << " output: " << m_output << endmsg;
142
143 // Decode the accept, required and veto Algorithms. The logic is the following:
144 // a. The event is accepted if all lists are empty.
145 // b. The event is provisionally accepted if any Algorithm in the accept list
146 // has been executed and has indicated that its filter is passed. This
147 // provisional acceptance can be overridden by the other lists.
148 // c. The event is rejected unless all Algorithms in the required list have
149 // been executed and have indicated that their filter passed.
150 // d. The event is rejected if any Algorithm in the veto list has been
151 // executed and has indicated that its filter has passed.
152 decodeAcceptAlgs ().ignore();
153 decodeRequireAlgs().ignore();
154 decodeVetoAlgs ().ignore();
155 return StatusCode::SUCCESS;
156 }
OutputStream::clearItems
void clearItems(Items &itms)
Clear item list.
Definition: OutputStream.cpp:380
OutputStream::hasInput
virtual bool hasInput() const
Tell if the instance has been configured with input items or not.
Definition: OutputStream.cpp:638
OutputStream::decodeRequireAlgs
StatusCode decodeRequireAlgs()
Decode list of Algorithms that this stream requires.
Definition: OutputStream.cpp:514
OutputStream::m_storeName
std::string m_storeName
Name of the service managing the data store.
Definition: OutputStream.h:45
OutputStream::m_events
int m_events
Number of events written to this output stream.
Definition: OutputStream.h:80
CommonMessagingBase::info
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
Definition: CommonMessaging.h:124
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:76
Algorithm::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
The standard service locator.
Definition: Algorithm.cpp:929
OutputStream::m_outputName
std::string m_outputName
Name of the output file.
Definition: OutputStream.h:51
OutputStream::m_pDataProvider
SmartIF< IDataProviderSvc > m_pDataProvider
Keep reference to the data provider service.
Definition: OutputStream.h:57
OutputStream::m_algDependentItemList
AlgDependentItemNames m_algDependentItemList
Mapping between algorithm names, and a list of items for which, if the algorithm in question accepted...
Definition: OutputStream.h:74
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:423
CommonMessagingBase::warning
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Definition: CommonMessaging.h:121
OutputStream::m_algDependentItems
AlgDependentItems m_algDependentItems
Items to be saved for specific algorithms.
Definition: OutputStream.h:76
StatusCode::FAILURE
Definition: StatusCode.h:29
StatusCode::SUCCESS
Definition: StatusCode.h:30
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:67
OutputStream::m_doPreLoad
bool m_doPreLoad
Flag indicating whether data pre-loading should be performed.
Definition: OutputStream.h:39
OutputStream::addItem
void addItem(Items &itms, const std::string &descriptor)
Add item to output streamer list.
Definition: OutputStream.cpp:398
OutputStream::m_doPreLoadOpt
bool m_doPreLoadOpt
Flag indicating whether optional items should be preloaded.
Definition: OutputStream.h:41
OutputStream::m_pDataManager
SmartIF< IDataManagerSvc > m_pDataManager
Keep reference to the data manager service.
Definition: OutputStream.h:59
OutputStream::m_incidentSvc
SmartIF< IIncidentSvc > m_incidentSvc
Reference to the incident service.
Definition: OutputStream.h:37
OutputStream::decodeVetoAlgs
StatusCode decodeVetoAlgs()
Decode list of Algorithms that this stream is vetoed by.
Definition: OutputStream.cpp:528
Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:74
OutputStream::m_itemNames
ItemNames m_itemNames
Vector of item names.
Definition: OutputStream.h:65
OutputStream::m_optItemNames
ItemNames m_optItemNames
Vector of item names.
Definition: OutputStream.h:69
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:127
Incident
Base class for all Incidents (computing events).
Definition: Incident.h:17
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:542
StatusCode::ignore
void ignore() const
Definition: StatusCode.h:108
CommonMessagingBase::fatal
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
Definition: CommonMessaging.h:112
OutputStream::m_output
std::string m_output
Name of the output file specification.
Definition: OutputStream.h:49
ana.i
list i
Definition: ana.py:128
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:500
OutputStream::m_fireIncidents
bool m_fireIncidents
should I fire incidents for writing opening/closing etc?
Definition: OutputStream.h:125
OutputStream::m_optItemList
Items m_optItemList
Vector of optional items to be saved to this stream.
Definition: OutputStream.h:71

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

Test whether this event should be output.

Definition at line 609 of file OutputStream.cpp.

609 {
610 auto passed = [](const Algorithm* alg) { return alg->isExecuted()
611 && alg->filterPassed(); };
612
613 // Loop over all Algorithms in the accept list to see
614 // whether any have been executed and have their filter
615 // passed flag set. Any match causes the event to be
616 // provisionally accepted.
617 bool result = m_acceptAlgs.empty() ||
618 std::any_of( std::begin(m_acceptAlgs), std::end(m_acceptAlgs), passed);
619
620 // Loop over all Algorithms in the required list to see
621 // whether all have been executed and have their filter
622 // passed flag set. Any mismatch causes the event to be
623 // rejected.
624 if ( result && !m_requireAlgs.empty() ) {
625 result = std::all_of( std::begin(m_requireAlgs), std::end(m_requireAlgs), passed);
626 }
627
628 // Loop over all Algorithms in the veto list to see
629 // whether any have been executed and have their filter
630 // passed flag set. Any match causes the event to be
631 // rejected.
632 if ( result && !m_vetoAlgs.empty() ) {
633 result = std::none_of( std::begin(m_vetoAlgs), std::end(m_vetoAlgs), passed);
634 }
635 return result;
636 }
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:90
OutputStream::m_acceptAlgs
std::vector< Algorithm * > m_acceptAlgs
Vector of Algorithms that this stream accepts.
Definition: OutputStream.h:88
Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:74
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:92

void OutputStream::requireAlgsHandler | ( | Property & | theProp | ) |
| protected

Handler for RequireAlgs Property.

Definition at line 520 of file OutputStream.cpp.

520 {
521 StatusCode sc = decodeAlgorithms( m_requireNames, m_requireAlgs );
522 if (sc.isFailure()) {
523 throw GaudiException("Failure in OutputStream::decodeAlgorithms",
524 "OutputStream::requireAlgsHandler",sc);
525 }
526 }
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:90
merge_files.sc
int sc
Definition: merge_files.py:167
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:86
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
OutputStream::decodeAlgorithms
StatusCode decodeAlgorithms(StringArrayProperty &theNames, std::vector< Algorithm * > &theAlgs)
Decode specified list of Algorithms.
Definition: OutputStream.cpp:577
OutputStream::m_requireNames
StringArrayProperty m_requireNames
Vector of names of Algorithms that this stream requires.
Definition: OutputStream.h:84

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

Return the list of selected objects.

Definition at line 152 of file OutputStream.h.

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

void OutputStream::vetoAlgsHandler | ( | Property & | theProp | ) |
| protected

Handler for VetoAlgs Property.

Definition at line 534 of file OutputStream.cpp.

534 {
535 StatusCode sc = decodeAlgorithms( m_vetoNames, m_vetoAlgs );
536 if (sc.isFailure()) {
537 throw GaudiException("Failure in OutputStream::decodeAlgorithms",
538 "OutputStream::vetoAlgsHandler",sc);
539 }
540 }
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:23
OutputStream::m_vetoNames
StringArrayProperty m_vetoNames
Vector of names of Algorithms that this stream is vetoed by.
Definition: OutputStream.h:86
merge_files.sc
int sc
Definition: merge_files.py:167
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:86
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
OutputStream::decodeAlgorithms
StatusCode decodeAlgorithms(StringArrayProperty &theNames, std::vector< Algorithm * > &theAlgs)
Decode specified list of Algorithms.
Definition: OutputStream.cpp:577
OutputStream::m_vetoAlgs
std::vector< Algorithm * > m_vetoAlgs
Vector of Algorithms that this stream is vetoed by.
Definition: OutputStream.h:92

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

Select the different objects and write them to file.

Reimplemented in TagCollectionStream, and SequentialOutputStream.

Definition at line 199 of file OutputStream.cpp.

200 {
201 // Connect the output file to the service
202 StatusCode status = collectObjects();
203 if ( status.isSuccess() )
204 {
205 IDataSelector* sel = selectedObjects();
206 if ( sel->begin() != sel->end() )
207 {
208 status = m_pConversionSvc->connectOutput(m_outputName, m_outputType);
209 if ( status.isSuccess() )
210 {
211 // Now pass the collection to the persistency service
212 IOpaqueAddress* pAddress = nullptr;
213 for ( auto& j : *sel )
214 {
215 try
216 {
217 const StatusCode iret = m_pConversionSvc->createRep( j, pAddress );
218 if ( !iret.isSuccess() )
219 {
220 status = iret;
221 continue;
222 }
223 IRegistry* pReg = j->registry();
224 pReg->setAddress(pAddress);
225 }
226 catch ( const std::exception & excpt )
227 {
228 const std::string loc = ( j->registry() ?
229 j->registry()->identifier() : "UnRegistered" );
230 fatal()
231 << "std::exception during createRep for '" << loc << "' "
232 << System::typeinfoName( typeid(*j) )
233 << endmsg;
234 fatal() << excpt.what() << endmsg;
235 throw;
236 }
237 }
238 for ( auto& j : *sel )
239 {
240 try
241 {
242 IRegistry* pReg = j->registry();
243 const StatusCode iret = m_pConversionSvc->fillRepRefs( pReg->address(), j );
244 if ( !iret.isSuccess() ) status = iret;
245 }
246 catch ( const std::exception & excpt )
247 {
248 const std::string loc = ( j->registry() ?
249 j->registry()->identifier() : "UnRegistered" );
250 fatal()
251 << "std::exception during fillRepRefs for '" << loc << "'"
252 << System::typeinfoName( typeid(*j) )
253 << endmsg;
254 fatal() << excpt.what() << endmsg;
255 throw;
256 }
257 }
258 // Commit the data if there was no error; otherwise possibly discard
259 if ( status.isSuccess() )
260 {
261 status = m_pConversionSvc->commitOutput(m_outputName, true);
262 }
263 else
264 {
265 m_pConversionSvc->commitOutput(m_outputName, false).ignore();
266 }
267 }
268 }
269 }
270 return status;
271 }
OutputStream::m_outputType
std::string m_outputType
Output type: NEW(NEW,CREATE,WRITE,RECREATE), UPDATE)
Definition: OutputStream.h:53
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:297
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:76
OutputStream::m_outputName
std::string m_outputName
Name of the output file.
Definition: OutputStream.h:51
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:152
std::string
STL class.
OutputStream::m_pConversionSvc
SmartIF< IConversionSvc > m_pConversionSvc
Keep reference to the data conversion service.
Definition: OutputStream.h:61
IConversionSvc::connectOutput
virtual StatusCode connectOutput(const std::string &outputFile)=0
Connect the output file to the service.
read_lhcb_event_file.sel
tuple sel
Definition: read_lhcb_event_file.py:10
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.
IRegistry::address
virtual IOpaqueAddress * address() const =0
Retrieve opaque storage address.
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:108
CommonMessagingBase::fatal
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
Definition: CommonMessaging.h:112
OutputStream::collectObjects
virtual StatusCode collectObjects()
Collect all objects to be written to the output stream.
Definition: OutputStream.cpp:292
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 88 of file OutputStream.h.

StringArrayProperty OutputStream::m_acceptNames
| protected

Vector of names of Algorithms that this stream accepts.

Definition at line 82 of file OutputStream.h.

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

Keep reference of agent.

Definition at line 55 of file OutputStream.h.

AlgDependentItemNames OutputStream::m_algDependentItemList
| protected

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 74 of file OutputStream.h.

AlgDependentItems OutputStream::m_algDependentItems
| protected

Items to be saved for specific algorithms.

Definition at line 76 of file OutputStream.h.

DataStoreItem* OutputStream::m_currentItem
| protected

Keep track of the current item.

Definition at line 63 of file OutputStream.h.

bool OutputStream::m_doPreLoad
| protected

Flag indicating whether data pre-loading should be performed.

Definition at line 39 of file OutputStream.h.

bool OutputStream::m_doPreLoadOpt
| protected

Flag indicating whether optional items should be preloaded.

Definition at line 41 of file OutputStream.h.

int OutputStream::m_events
| protected

Number of events written to this output stream.

Definition at line 80 of file OutputStream.h.

bool OutputStream::m_fireIncidents
| protected

should I fire incidents for writing opening/closing etc?

Definition at line 125 of file OutputStream.h.

SmartIF<IIncidentSvc> OutputStream::m_incidentSvc
| protected

Reference to the incident service.

Definition at line 37 of file OutputStream.h.

Items OutputStream::m_itemList
| protected

Vector of items to be saved to this stream.

Definition at line 67 of file OutputStream.h.

ItemNames OutputStream::m_itemNames
| protected

Vector of item names.

Definition at line 65 of file OutputStream.h.

IDataSelector OutputStream::m_objects
| protected

Collection of objects being selected.

Definition at line 78 of file OutputStream.h.

Items OutputStream::m_optItemList
| protected

Vector of optional items to be saved to this stream.

Definition at line 71 of file OutputStream.h.

ItemNames OutputStream::m_optItemNames
| protected

Vector of item names.

Definition at line 69 of file OutputStream.h.

std::string OutputStream::m_output
| protected

Name of the output file specification.

Definition at line 49 of file OutputStream.h.

std::string OutputStream::m_outputName
| protected

Name of the output file.

Definition at line 51 of file OutputStream.h.

std::string OutputStream::m_outputType
| protected

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

Definition at line 53 of file OutputStream.h.

SmartIF<IConversionSvc> OutputStream::m_pConversionSvc
| protected

Keep reference to the data conversion service.

Definition at line 61 of file OutputStream.h.

SmartIF<IDataManagerSvc> OutputStream::m_pDataManager
| protected

Keep reference to the data manager service.

Definition at line 59 of file OutputStream.h.

SmartIF<IDataProviderSvc> OutputStream::m_pDataProvider
| protected

Keep reference to the data provider service.

Definition at line 57 of file OutputStream.h.

std::string OutputStream::m_persName
| protected

Name of the persistency service capable to write data from the store.

Definition at line 47 of file OutputStream.h.

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

Vector of Algorithms that this stream requires.

Definition at line 90 of file OutputStream.h.

StringArrayProperty OutputStream::m_requireNames
| protected

Vector of names of Algorithms that this stream requires.

Definition at line 84 of file OutputStream.h.

std::string OutputStream::m_storeName
| protected

Name of the service managing the data store.

Definition at line 45 of file OutputStream.h.

bool OutputStream::m_verifyItems
| protected

Flag to indicate that item consistency should be checked.

Definition at line 43 of file OutputStream.h.

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

Vector of Algorithms that this stream is vetoed by.

Definition at line 92 of file OutputStream.h.

StringArrayProperty OutputStream::m_vetoNames
| protected

Vector of names of Algorithms that this stream is vetoed by.

Definition at line 86 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