The Gaudi Framework  v36r1 (3e2fb5a8)
OutputStream Class Reference

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

#include </builds/gaudi/Gaudi/GaudiCommonSvc/src/PersistencySvc/OutputStream.h>

Inheritance diagram for OutputStream:
Collaboration diagram for OutputStream:

Public Types

typedef std::vector< DataStoreItem * > Items
 
typedef std::vector< std::stringItemNames
 
typedef std::map< Gaudi::Algorithm *, ItemsAlgDependentItems
 
typedef std::map< std::string, ItemNamesAlgDependentItemNames
 
- Public Types inherited from Gaudi::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

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 Gaudi::details::LegacyAlgorithmAdapter
 LegacyAlgorithmAdapter (std::string name, ISvcLocator *svcloc, std::string version=PACKAGE_VERSION)
 
const EventContextgetContext () const
 
bool isExecuted () const
 Has this algorithm been executed since the last reset? More...
 
void setExecuted (bool state) const
 Set the executed flag to the specified state. More...
 
bool filterPassed () const
 Did this algorithm pass or fail its filter criterion for the last event? More...
 
void setFilterPassed (bool state) const
 Set the filter passed flag to the specified state. More...
 
- Public Member Functions inherited from Gaudi::Algorithm
 Algorithm (std::string name, ISvcLocator *svcloc, 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...
 
const std::stringname () const override
 The identifying name of the algorithm object. More...
 
const Gaudi::StringKeynameKey () const override
 
const std::stringtype () const override
 The type of the algorithm object. More...
 
void setType (std::string type) override
 
const std::stringversion () 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 isEnabled () const override
 Is this algorithm enabled or disabled? More...
 
bool isSequence () const override
 Are we a Sequence? More...
 
unsigned int errorCount () const
 Get the number of failures of the algorithm. More...
 
template<class T >
StatusCode service (std::string_view 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 (std::string_view svcType, std::string_view svcName, T *&psvc) const
 Access a service by name and type, creating it if it doesn't already exist. More...
 
SmartIF< IServiceservice (std::string_view 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 (std::string_view 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< IDataProviderSvc > & detSvc () const
 The standard detector data service. More...
 
SmartIF< IConversionSvc > & detCnvSvc () const
 The standard detector data persistency conversion service. More...
 
SmartIF< IDataProviderSvc > & eventSvc () const
 The standard event data service. More...
 
SmartIF< IDataProviderSvc > & evtSvc () const
 shortcut for method eventSvc More...
 
SmartIF< IConversionSvc > & eventCnvSvc () const
 The standard event data persistency conversion service. More...
 
SmartIF< IHistogramSvc > & histoSvc () const
 The standard histogram service. More...
 
SmartIF< INTupleSvc > & ntupleSvc () const
 The standard N tuple service. More...
 
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 setProperties ()
 
template<class T >
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, ToolHandle< T > &hndl, const std::string &doc="none")
 
template<class T >
Gaudi::Details::PropertyBasedeclareProperty (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...
 
void acceptDHVisitor (IDataHandleVisitor *) const override
 
void registerTool (IAlgTool *tool) const
 
void deregisterTool (IAlgTool *tool) const
 
template<class T >
StatusCode declareTool (ToolHandle< T > &handle, bool createIf=true)
 
template<class T >
StatusCode declareTool (ToolHandle< T > &handle, std::string toolTypeAndName, bool createIf=true)
 
template<class T >
void addToolsArray (ToolHandleArray< T > &hndlArr)
 
const std::vector< IAlgTool * > & tools () const
 
bool isBlocking () const
 
void setBlocking (bool value)
 
unsigned int cardinality () const override
 Return the cardinality. More...
 
const std::vector< std::string > & neededResources () const override
 
AlgExecStateexecState (const EventContext &ctx) const override
 reference to AlgExecState of Alg More...
 
std::ostreamtoControlFlowExpression (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 DataObjIDCollextraInputDeps () const override
 
virtual const DataObjIDCollextraOutputDeps () const override
 
void declare (Gaudi::DataHandle &handle) override
 
void renounce (Gaudi::DataHandle &handle) override
 
bool renounceInput (const DataObjID &id) override
 
const DataObjIDCollinputDataObjs () const override
 
const DataObjIDColloutputDataObjs () 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::stringgetInterfaceNames () const override
 Implementation of IInterface::getInterfaceNames. More...
 
- Public Member Functions inherited from PropertyHolder< CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > > >
 PropertyHolder ()=default
 
Gaudi::Details::PropertyBasedeclareProperty (Gaudi::Details::PropertyBase &prop)
 Declare a property. More...
 
Gaudi::Details::PropertyBasedeclareProperty (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::PropertyBasedeclareProperty (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::PropertyBasedeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="")
 Declare a remote property. More...
 
StatusCode setProperty (const std::string &name, const Gaudi::Details::PropertyBase &p) override
 set the property from another property with a different name More...
 
StatusCode setProperty (const std::string &s) override
 set the property from the formatted string More...
 
StatusCode setProperty (const Gaudi::Details::PropertyBase &p)
 Set the property from a property. More...
 
virtual StatusCode setProperty (const std::string &name, const Gaudi::Details::PropertyBase &p)=0
 Set the property from a property with a different name. More...
 
virtual StatusCode setProperty (const std::string &s)=0
 Set the property by string. More...
 
StatusCode setProperty (const std::string &name, const char *v)
 Special case for string literals. More...
 
StatusCode setProperty (const std::string &name, const std::string &v)
 Special case for std::string. More...
 
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value More...
 
StatusCode setPropertyRepr (const std::string &n, const std::string &r) override
 set the property from name and value string representation More...
 
StatusCode getProperty (Gaudi::Details::PropertyBase *p) const override
 get the property More...
 
const Gaudi::Details::PropertyBasegetProperty (std::string_view name) const override
 get the property by name More...
 
StatusCode getProperty (std::string_view 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 (std::string_view name) const override
 Return true if we have a property with the given name. More...
 
Gaudi::Details::PropertyBaseproperty (std::string_view name) const
 \fixme property and bindPropertiesTo should be protected More...
 
void bindPropertiesTo (Gaudi::Interfaces::IOptionsSvc &optsSvc)
 
 PropertyHolder (const PropertyHolder &)=delete
 
PropertyHolderoperator= (const PropertyHolder &)=delete
 
- Public Member Functions inherited from CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > >
MSG::Level msgLevel () const
 get the cached level (originally extracted from the embedded MsgStream) More...
 
bool msgLevel (MSG::Level lvl) const
 get the output level from the embedded MsgStream More...
 

Protected Member Functions

Gaudi::AlgorithmdecodeAlgorithm (const std::string &theName)
 Decode a single algorithm name. More...
 
void decodeAlgorithms (Gaudi::Property< std::vector< std::string >> &theNames, std::vector< Gaudi::Algorithm * > &theAlgs)
 Decode specified list of Algorithms. More...
 
bool isEventAccepted () const
 Test whether this event should be output. More...
 
DataStoreItemfindItem (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 Gaudi::details::LegacyAlgorithmAdapter
bool isReEntrant () const override
 
- Protected Member Functions inherited from Gaudi::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...
 
bool isReEntrant () const override
 
- 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 CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > >
MSG::Level setUpMessaging () const
 Set up local caches. More...
 
MSG::Level resetMessaging ()
 Reinitialize internal states. More...
 
void updateMsgStreamOutputLevel (int level)
 Update the output level of the cached MsgStream. More...
 

Protected Attributes

Gaudi::Property< ItemNamesm_itemNames {this, "ItemList", {}, "vector of item names to be saved to this stream"}
 
Gaudi::Property< ItemNamesm_optItemNames
 
Gaudi::Property< AlgDependentItemNamesm_algDependentItemList
 
Gaudi::Property< bool > m_doPreLoad
 
Gaudi::Property< bool > m_doPreLoadOpt
 
Gaudi::Property< std::stringm_output {this, "Output", {}, "name of the output file specification"}
 
Gaudi::Property< std::stringm_outputName {this, "OutputFile", {}, "name of the output file"}
 
Gaudi::Property< std::stringm_storeName
 
Gaudi::Property< std::stringm_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< IIncidentSvcm_incidentSvc
 Reference to the incident service. More...
 
std::string m_outputType = "UPDATE"
 Output type: NEW(NEW,CREATE,WRITE,RECREATE), UPDATE) More...
 
SmartIF< IDataProviderSvcm_pDataProvider
 Keep reference to the data provider service. More...
 
SmartIF< IDataManagerSvcm_pDataManager
 Keep reference to the data manager service. More...
 
SmartIF< IConversionSvcm_pConversionSvc
 Keep reference to the data conversion service. More...
 
DataStoreItemm_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< Gaudi::Algorithm * > m_acceptAlgs
 Vector of Algorithms that this stream accepts. More...
 
std::vector< Gaudi::Algorithm * > m_requireAlgs
 Vector of Algorithms that this stream requires. More...
 
std::vector< Gaudi::Algorithm * > m_vetoAlgs
 Vector of Algorithms that this stream is vetoed by. More...
 
- Protected Attributes inherited from Gaudi::Algorithm
std::unique_ptr< IDataHandleVisitorm_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...
 
IDataSelectorselectedObjects ()
 Return the list of selected objects. More...
 
StatusCode collectFromSubTree (DataObject *)
 

Additional Inherited Members

- Public Attributes inherited from Gaudi::Algorithm
friend AlgorithmManager
 

Detailed Description

A small to stream Data I/O.

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

Definition at line 38 of file OutputStream.h.

Member Typedef Documentation

◆ AlgDependentItemNames

◆ AlgDependentItems

◆ ItemNames

Definition at line 41 of file OutputStream.h.

◆ Items

Definition at line 40 of file OutputStream.h.

Member Function Documentation

◆ addItem()

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

Add item to output streamer list.

Definition at line 327 of file OutputStream.cpp.

327  {
328  int level = 0;
329  auto sep = descriptor.rfind( "#" );
330  std::string obj_path = descriptor.substr( 0, sep );
331  if ( sep != std::string::npos ) {
332  std::string slevel = descriptor.substr( sep + 1 );
333  level = ( slevel == "*" ) ? 9999999 : std::stoi( slevel );
334  }
335  if ( m_verifyItems ) {
336  size_t idx = obj_path.find( "/", 1 );
337  while ( idx != std::string::npos ) {
338  std::string sub_item = obj_path.substr( 0, idx );
339  if ( !findItem( sub_item ) ) addItem( itms, sub_item + "#1" );
340  idx = obj_path.find( "/", idx + 1 );
341  }
342  }
343  itms.push_back( new DataStoreItem( obj_path, level ) );
344  const auto& item = itms.back();
345  ON_DEBUG
346  debug() << "Adding OutputStream item " << item->path() << " with " << item->depth() << " level(s)." << endmsg;
347 }

◆ clearItems()

void OutputStream::clearItems ( Items itms)
private

Clear item list.

Definition at line 310 of file OutputStream.cpp.

310  {
311  for ( auto& i : itms ) delete i;
312  itms.clear();
313 }

◆ clearSelection()

void OutputStream::clearSelection ( )

Clear list of selected objects.

Definition at line 307 of file OutputStream.cpp.

307 { m_objects.clear(); }

◆ collect()

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

Store agent's classback.

Definition at line 218 of file OutputStream.cpp.

218  {
219  if ( level < m_currentItem->depth() ) {
220  if ( dir->object() ) {
221  /*
222  std::cout << "Analysing ("
223  << dir->name()
224  << ") Object:"
225  << ((dir->object()==0) ? "UNLOADED" : "LOADED")
226  << std::endl;
227  */
228  m_objects.push_back( dir->object() );
229  return true;
230  }
231  }
232  return false;
233 }

◆ collectFromSubTree()

StatusCode OutputStream::collectFromSubTree ( DataObject pObj)
private

Definition at line 502 of file OutputStream.cpp.

502  {
503  return m_pDataManager->traverseSubTree( pObj,
504  [this]( IRegistry* r, int level ) { return this->collect( r, level ); } );
505 }

◆ collectObjects()

StatusCode OutputStream::collectObjects ( )
virtual

Collect all objects to be written to the output stream.

Reimplemented in InputCopyStream, and CopyInputStream.

Definition at line 236 of file OutputStream.cpp.

236  {
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 = collectFromSubTree( obj );
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() ) iret = collectFromSubTree( obj );
259  if ( !iret.isSuccess() ) {
260  ON_DEBUG
261  debug() << "Ignore request to write non-mandatory object(s) " << m_currentItem->path() << endmsg;
262  }
263  }
264 
265  // Collect objects dependent on particular algorithms
266  for ( const auto& iAlgItems : m_algDependentItems ) {
267  auto alg = iAlgItems.first;
268  const Items& items = iAlgItems.second;
269  if ( passed( alg ) ) {
270  ON_DEBUG
271  debug() << "Algorithm '" << alg->name() << "' fired. Adding " << items << endmsg;
272  for ( const auto& i : items ) {
273  DataObject* obj = nullptr;
274  m_currentItem = i;
275  StatusCode iret = m_pDataProvider->retrieveObject( m_currentItem->path(), obj );
276  if ( iret.isSuccess() ) {
277  iret = collectFromSubTree( obj );
278  if ( !iret.isSuccess() ) status = iret;
279  } else {
280  error() << "Cannot write mandatory (algorithm dependent) object(s) (Not found) " << m_currentItem->path()
281  << endmsg;
282  status = iret;
283  }
284  }
285  }
286  }
287 
288  if ( status.isSuccess() ) {
289  // Remove duplicates from the list of objects, preserving the order in the list
291  std::vector<DataObject*> tmp; // temporary vector with the reduced list
292  tmp.reserve( m_objects.size() );
293  for ( auto& o : m_objects ) {
294  if ( !unique.count( o ) ) {
295  // if the pointer is not in the set, add it to both the set and the temporary vector
296  unique.insert( o );
297  tmp.push_back( o );
298  }
299  }
300  m_objects.swap( tmp ); // swap the data of the two vectors
301  }
302 
303  return status;
304 }

◆ connectConversionSvc()

StatusCode OutputStream::connectConversionSvc ( )
virtual

Definition at line 350 of file OutputStream.cpp.

350  {
352  // Get output file from input
353  std::string dbType, svc, shr;
354  for ( auto attrib : Gaudi::Utils::AttribStringParser( m_output ) ) {
355  const std::string& tag = attrib.tag;
356  const std::string& val = attrib.value;
357  switch ( ::toupper( tag[0] ) ) {
358  case 'D':
359  m_outputName = val;
360  break;
361  case 'T':
362  dbType = val;
363  break;
364  case 'S':
365  switch ( ::toupper( tag[1] ) ) {
366  case 'V':
367  svc = val;
368  break;
369  case 'H':
370  shr = "YES";
371  break;
372  }
373  break;
374  case 'O': // OPT='<NEW<CREATE,WRITE,RECREATE>, UPDATE>'
375  switch ( ::toupper( val[0] ) ) {
376  case 'R':
377  if ( ::strncasecmp( val.c_str(), "RECREATE", 3 ) == 0 )
378  m_outputType = "RECREATE";
379  else if ( ::strncasecmp( val.c_str(), "READ", 3 ) == 0 )
380  m_outputType = "READ";
381  break;
382  case 'C':
383  case 'N':
384  case 'W':
385  m_outputType = "NEW";
386  break;
387  case 'U':
388  m_outputType = "UPDATE";
389  break;
390  default:
391  m_outputType = "???";
392  break;
393  }
394  break;
395  default:
396  break;
397  }
398  }
399  if ( !shr.empty() ) m_outputType += "|SHARED";
400  // Get access to the default Persistency service
401  // The default service is the same for input as for output.
402  // If this is not desired, then a specialized OutputStream must overwrite
403  // this value.
404  if ( !dbType.empty() || !svc.empty() ) {
405  std::string typ = !dbType.empty() ? dbType : svc;
406  auto ipers = serviceLocator()->service<IPersistencySvc>( m_persName );
407  if ( !ipers ) {
408  fatal() << "Unable to locate IPersistencySvc interface of " << m_persName << endmsg;
409  return StatusCode::FAILURE;
410  }
411  IConversionSvc* cnvSvc = nullptr;
412  status = ipers->getService( typ, cnvSvc );
413  if ( !status.isSuccess() ) {
414  fatal() << "Unable to locate IConversionSvc interface of database type " << typ << endmsg;
415  return status;
416  }
417  // Increase reference count and keep service.
418  m_pConversionSvc = cnvSvc;
419  } else {
420  fatal() << "Unable to locate IConversionSvc interface (Unknown technology) " << endmsg
421  << "You either have to specify a technology name or a service name!" << endmsg
422  << "Please correct the job option \"" << name() << ".Output\" !" << endmsg;
423  return StatusCode::FAILURE;
424  }
425  return StatusCode::SUCCESS;
426 }

◆ decodeAlgorithm()

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

Decode a single algorithm name.

Definition at line 428 of file OutputStream.cpp.

428  {
429  Gaudi::Algorithm* theAlgorithm = nullptr;
430 
431  auto theAlgMgr = serviceLocator()->as<IAlgManager>();
432  if ( theAlgMgr ) {
433  // Check whether the supplied name corresponds to an existing
434  // Algorithm object.
435  SmartIF<IAlgorithm>& theIAlg = theAlgMgr->algorithm( theName );
436  if ( theIAlg ) {
437  try {
438  theAlgorithm = dynamic_cast<Gaudi::Algorithm*>( theIAlg.get() );
439  } catch ( ... ) {
440  // do nothing
441  }
442  }
443  } else {
444  fatal() << "Can't locate ApplicationMgr!!!" << endmsg;
445  }
446 
447  if ( !theAlgorithm ) { warning() << "Failed to decode Algorithm name " << theName << endmsg; }
448 
449  return theAlgorithm;
450 }

◆ decodeAlgorithms()

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

Decode specified list of Algorithms.

Definition at line 452 of file OutputStream.cpp.

453  {
454  // Reset the list of Algorithms
455  theAlgs.clear();
456 
457  // Build the list of Algorithms from the names list
458  for ( const auto& it : theNames.value() ) {
459 
460  auto theAlgorithm = decodeAlgorithm( it );
461  if ( theAlgorithm ) {
462  // Check that the specified algorithm doesn't already exist in the list
463  if ( std::find( std::begin( theAlgs ), std::end( theAlgs ), theAlgorithm ) == std::end( theAlgs ) ) {
464  theAlgorithm->addRef();
465  theAlgs.push_back( theAlgorithm );
466  }
467  } else {
468  info() << it << " doesn't exist - ignored" << endmsg;
469  }
470  }
471 }

◆ execute()

StatusCode OutputStream::execute ( )
overridevirtual

Working entry point.

Implements Algorithm.

Reimplemented in SequentialOutputStream, RecordStream, and RunRecordStream.

Definition at line 146 of file OutputStream.cpp.

146  {
147  // Clear any previously existing item list
148  clearSelection();
149  // Test whether this event should be output
150  if ( isEventAccepted() ) {
151  const StatusCode sc = writeObjects();
152  clearSelection();
153  ++m_events;
154  if ( sc.isSuccess() && m_fireIncidents ) {
155  m_incidentSvc->fireIncident( Incident( m_outputName, IncidentType::WroteToOutputFile ) );
156  } else if ( m_fireIncidents ) {
157  m_incidentSvc->fireIncident( Incident( m_outputName, IncidentType::FailOutputFile ) );
158  }
159  return sc;
160  }
161  return StatusCode::SUCCESS;
162 }

◆ finalize()

StatusCode OutputStream::finalize ( )
override

Terminate OutputStream.

Definition at line 133 of file OutputStream.cpp.

133  {
134  info() << "Events output: " << m_events << endmsg;
135  if ( m_fireIncidents ) m_incidentSvc->fireIncident( Incident( m_outputName, IncidentType::EndOutputFile ) );
142  return StatusCode::SUCCESS;
143 }

◆ findItem()

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

Find single item identified by its path (exact match)

Definition at line 316 of file OutputStream.cpp.

316  {
317  auto matchPath = [&]( const DataStoreItem* i ) { return i->path() == path; };
318  auto i = std::find_if( m_itemList.begin(), m_itemList.end(), matchPath );
319  if ( i == m_itemList.end() ) {
320  i = std::find_if( m_optItemList.begin(), m_optItemList.end(), matchPath );
321  if ( i == m_optItemList.end() ) return nullptr;
322  }
323  return *i;
324 }

◆ hasInput()

bool OutputStream::hasInput ( ) const
protectedvirtual

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

Reimplemented in InputCopyStream, and CopyInputStream.

Definition at line 498 of file OutputStream.cpp.

498  {
499  return !( m_itemNames.empty() && m_optItemNames.empty() && m_algDependentItemList.empty() );
500 }

◆ initialize()

StatusCode OutputStream::initialize ( )
override

Initialize OutputStream.

Definition at line 46 of file OutputStream.cpp.

46  {
47 
48  // Reset the number of events written
49  m_events = 0;
50  // Get access to the DataManagerSvc
52  if ( !m_pDataManager ) {
53  fatal() << "Unable to locate IDataManagerSvc interface" << endmsg;
54  return StatusCode::FAILURE;
55  }
56  // Get access to the IncidentService
57  m_incidentSvc = serviceLocator()->service( "IncidentSvc" );
58  if ( !m_incidentSvc ) {
59  warning() << "Error retrieving IncidentSvc." << endmsg;
60  return StatusCode::FAILURE;
61  }
62  // Get access to the assigned data service
64  if ( !m_pDataProvider ) {
65  fatal() << "Unable to locate IDataProviderSvc interface of " << m_storeName << endmsg;
66  return StatusCode::FAILURE;
67  }
68  if ( hasInput() ) {
70  if ( !status.isSuccess() ) {
71  fatal() << "Unable to connect to conversion service." << endmsg;
72  if ( m_outputName != "" && m_fireIncidents )
73  m_incidentSvc->fireIncident( Incident( m_outputName, IncidentType::FailOutputFile ) );
74  return status;
75  }
76  }
77 
78  // Clear the list with optional items
80  // Clear the item list
82 
83  // Take the new item list from the properties.
84  ON_DEBUG debug() << "ItemList : " << m_itemNames.value() << endmsg;
85  for ( const auto& i : m_itemNames ) addItem( m_itemList, i );
86 
87  // Take the new item list from the properties.
88  ON_DEBUG debug() << "OptItemList : " << m_optItemNames.value() << endmsg;
89  for ( const auto& i : m_optItemNames ) addItem( m_optItemList, i );
90 
91  // prepare the algorithm selected dependent locations
92  ON_DEBUG debug() << "AlgDependentItemList : " << m_algDependentItemList.value() << endmsg;
93  for ( const auto& a : m_algDependentItemList ) {
94  // Get the algorithm pointer
95  auto theAlgorithm = decodeAlgorithm( a.first );
96  if ( theAlgorithm ) {
97  // Get the item list for this alg
98  auto& items = m_algDependentItems[theAlgorithm];
99  // Clear the list for this alg
100  clearItems( items );
101  // fill the list again
102  for ( const auto& i : a.second ) addItem( items, i );
103  }
104  }
105 
106  // Take the item list to the data service preload list.
107  if ( m_doPreLoad ) {
108  for ( auto& j : m_itemList ) m_pDataProvider->addPreLoadItem( *j ).ignore();
109  // Not working: bad reference counting! pdataSvc->release();
110  }
111 
112  if ( m_doPreLoadOpt ) {
113  for ( auto& j : m_optItemList ) m_pDataProvider->addPreLoadItem( *j ).ignore();
114  }
115  info() << "Data source: " << m_storeName.value() << " output: " << m_output.value() << endmsg;
116 
117  // Decode the accept, required and veto Algorithms. The logic is the following:
118  // a. The event is accepted if all lists are empty.
119  // b. The event is provisionally accepted if any Algorithm in the accept list
120  // has been executed and has indicated that its filter is passed. This
121  // provisional acceptance can be overridden by the other lists.
122  // c. The event is rejected unless all Algorithms in the required list have
123  // been executed and have indicated that their filter passed.
124  // d. The event is rejected if any Algorithm in the veto list has been
125  // executed and has indicated that its filter has passed.
129  return StatusCode::SUCCESS;
130 }

◆ isEventAccepted()

bool OutputStream::isEventAccepted ( ) const
protected

Test whether this event should be output.

Definition at line 473 of file OutputStream.cpp.

473  {
474  // Loop over all Algorithms in the accept list to see
475  // whether any have been executed and have their filter
476  // passed flag set. Any match causes the event to be
477  // provisionally accepted.
478  bool result = m_acceptAlgs.empty() || std::any_of( std::begin( m_acceptAlgs ), std::end( m_acceptAlgs ), passed );
479 
480  // Loop over all Algorithms in the required list to see
481  // whether all have been executed and have their filter
482  // passed flag set. Any mismatch causes the event to be
483  // rejected.
484  if ( result && !m_requireAlgs.empty() ) {
485  result = std::all_of( std::begin( m_requireAlgs ), std::end( m_requireAlgs ), passed );
486  }
487 
488  // Loop over all Algorithms in the veto list to see
489  // whether any have been executed and have their filter
490  // passed flag set. Any match causes the event to be
491  // rejected.
492  if ( result && !m_vetoAlgs.empty() ) {
493  result = std::none_of( std::begin( m_vetoAlgs ), std::end( m_vetoAlgs ), passed );
494  }
495  return result;
496 }

◆ selectedObjects()

IDataSelector* OutputStream::selectedObjects ( )
inlineprivate

Return the list of selected objects.

Definition at line 163 of file OutputStream.h.

163 { return &m_objects; }

◆ writeObjects()

StatusCode OutputStream::writeObjects ( )
protectedvirtual

Select the different objects and write them to file.

Reimplemented in TagCollectionStream, and SequentialOutputStream.

Definition at line 165 of file OutputStream.cpp.

165  {
166  // Connect the output file to the service
167  StatusCode status = collectObjects();
168  if ( status.isSuccess() ) {
170  if ( sel->begin() != sel->end() ) {
171  status = m_pConversionSvc->connectOutput( m_outputName, m_outputType );
172  if ( status.isSuccess() ) {
173  // Now pass the collection to the persistency service
174  IOpaqueAddress* pAddress = nullptr;
175  for ( auto& j : *sel ) {
176  try {
177  const StatusCode iret = m_pConversionSvc->createRep( j, pAddress );
178  if ( !iret.isSuccess() ) {
179  status = iret;
180  continue;
181  }
182  IRegistry* pReg = j->registry();
183  pReg->setAddress( pAddress );
184  } catch ( const std::exception& excpt ) {
185  const std::string loc = ( j->registry() ? j->registry()->identifier() : "UnRegistered" );
186  fatal() << "std::exception during createRep for '" << loc << "' " << System::typeinfoName( typeid( *j ) )
187  << endmsg;
188  fatal() << excpt.what() << endmsg;
189  throw;
190  }
191  }
192  for ( auto& j : *sel ) {
193  try {
194  IRegistry* pReg = j->registry();
195  const StatusCode iret = m_pConversionSvc->fillRepRefs( pReg->address(), j );
196  if ( !iret.isSuccess() ) status = iret;
197  } catch ( const std::exception& excpt ) {
198  const std::string loc = ( j->registry() ? j->registry()->identifier() : "UnRegistered" );
199  fatal() << "std::exception during fillRepRefs for '" << loc << "'" << System::typeinfoName( typeid( *j ) )
200  << endmsg;
201  fatal() << excpt.what() << endmsg;
202  throw;
203  }
204  }
205  // Commit the data if there was no error; otherwise possibly discard
206  if ( status.isSuccess() ) {
207  status = m_pConversionSvc->commitOutput( m_outputName, true );
208  } else {
209  m_pConversionSvc->commitOutput( m_outputName, false ).ignore();
210  }
211  }
212  }
213  }
214  return status;
215 }

Member Data Documentation

◆ m_acceptAlgs

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

Vector of Algorithms that this stream accepts.

Definition at line 120 of file OutputStream.h.

◆ m_acceptNames

Gaudi::Property<std::vector<std::string> > OutputStream::m_acceptNames
protected
Initial value:
{
this,
"AcceptAlgs",
{},
[this]( auto& ) { this->decodeAlgorithms( this->m_acceptNames, this->m_acceptAlgs ); },
"names of Algorithms that this stream accepts"}

Definition at line 69 of file OutputStream.h.

◆ m_algDependentItemList

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

◆ m_algDependentItems

AlgDependentItems OutputStream::m_algDependentItems
protected

Items to be saved for specific algorithms.

Definition at line 113 of file OutputStream.h.

◆ m_currentItem

DataStoreItem* OutputStream::m_currentItem
protected

Keep track of the current item.

Definition at line 107 of file OutputStream.h.

◆ m_doPreLoad

Gaudi::Property<bool> OutputStream::m_doPreLoad
protected
Initial value:
{this, "Preload", true,
"flag indicating whether data pre-loading should be performed"}

Definition at line 59 of file OutputStream.h.

◆ m_doPreLoadOpt

Gaudi::Property<bool> OutputStream::m_doPreLoadOpt
protected
Initial value:
{this, "PreloadOptItems", false,
"flag indicating whether optional items should be preloaded"}

Definition at line 61 of file OutputStream.h.

◆ m_events

int OutputStream::m_events
protected

Number of events written to this output stream.

Definition at line 117 of file OutputStream.h.

◆ m_fireIncidents

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

◆ m_incidentSvc

SmartIF<IIncidentSvc> OutputStream::m_incidentSvc
protected

Reference to the incident service.

Definition at line 96 of file OutputStream.h.

◆ m_itemList

Items OutputStream::m_itemList
protected

Vector of items to be saved to this stream.

Definition at line 109 of file OutputStream.h.

◆ m_itemNames

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

Definition at line 50 of file OutputStream.h.

◆ m_objects

IDataSelector OutputStream::m_objects
protected

Collection of objects being selected.

Definition at line 115 of file OutputStream.h.

◆ m_optItemList

Items OutputStream::m_optItemList
protected

Vector of optional items to be saved to this stream.

Definition at line 111 of file OutputStream.h.

◆ m_optItemNames

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

◆ m_output

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

Definition at line 63 of file OutputStream.h.

◆ m_outputName

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

Definition at line 64 of file OutputStream.h.

◆ m_outputType

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

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

Definition at line 99 of file OutputStream.h.

◆ m_pConversionSvc

SmartIF<IConversionSvc> OutputStream::m_pConversionSvc
protected

Keep reference to the data conversion service.

Definition at line 105 of file OutputStream.h.

◆ m_pDataManager

SmartIF<IDataManagerSvc> OutputStream::m_pDataManager
protected

Keep reference to the data manager service.

Definition at line 103 of file OutputStream.h.

◆ m_pDataProvider

SmartIF<IDataProviderSvc> OutputStream::m_pDataProvider
protected

Keep reference to the data provider service.

Definition at line 101 of file OutputStream.h.

◆ m_persName

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

◆ m_requireAlgs

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

Vector of Algorithms that this stream requires.

Definition at line 122 of file OutputStream.h.

◆ m_requireNames

Gaudi::Property<std::vector<std::string> > OutputStream::m_requireNames
protected
Initial value:
{
this,
"RequireAlgs",
{},
[this]( auto& ) { this->decodeAlgorithms( this->m_requireNames, this->m_requireAlgs ); },
"names of Algorithms that this stream requires"}

Definition at line 75 of file OutputStream.h.

◆ m_storeName

Gaudi::Property<std::string> OutputStream::m_storeName
protected
Initial value:
{this, "EvtDataSvc", "EventDataSvc",
"name of the service managing the data store"}

Definition at line 65 of file OutputStream.h.

◆ m_verifyItems

Gaudi::Property<bool> OutputStream::m_verifyItems
protected
Initial value:
{this, "VerifyItems", true,
"flag to indicate that item consistency should be checked"}

Definition at line 87 of file OutputStream.h.

◆ m_vetoAlgs

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

Vector of Algorithms that this stream is vetoed by.

Definition at line 124 of file OutputStream.h.

◆ m_vetoNames

Gaudi::Property<std::vector<std::string> > OutputStream::m_vetoNames
protected
Initial value:
{
this,
"VetoAlgs",
{},
[this]( auto& ) { this->decodeAlgorithms( this->m_vetoNames, this->m_vetoAlgs ); },
"names of Algorithms that this stream is vetoed by"}

Definition at line 81 of file OutputStream.h.


The documentation for this class was generated from the following files:
OutputStream::collectObjects
virtual StatusCode collectObjects()
Collect all objects to be written to the output stream.
Definition: OutputStream.cpp:236
OutputStream::m_verifyItems
Gaudi::Property< bool > m_verifyItems
Definition: OutputStream.h:87
OutputStream::m_requireAlgs
std::vector< Gaudi::Algorithm * > m_requireAlgs
Vector of Algorithms that this stream requires.
Definition: OutputStream.h:122
OutputStream::m_currentItem
DataStoreItem * m_currentItem
Keep track of the current item.
Definition: OutputStream.h:107
OutputStream::clearItems
void clearItems(Items &itms)
Clear item list.
Definition: OutputStream.cpp:310
std::string
STL class.
OutputStream::m_vetoNames
Gaudi::Property< std::vector< std::string > > m_vetoNames
Definition: OutputStream.h:81
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:93
std::exception
STL class.
OutputStream::m_optItemList
Items m_optItemList
Vector of optional items to be saved to this stream.
Definition: OutputStream.h:111
Gaudi::Algorithm::name
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:542
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:355
OutputStream::m_outputType
std::string m_outputType
Output type: NEW(NEW,CREATE,WRITE,RECREATE), UPDATE)
Definition: OutputStream.h:99
OutputStream::m_events
int m_events
Number of events written to this output stream.
Definition: OutputStream.h:117
std::vector::reserve
T reserve(T... args)
OutputStream::m_optItemNames
Gaudi::Property< ItemNames > m_optItemNames
Definition: OutputStream.h:51
IOpaqueAddress
Definition: IOpaqueAddress.h:33
std::vector< DataObject * >
SmartIF::reset
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
Definition: SmartIF.h:96
std::string::find
T find(T... args)
std::vector::size
T size(T... args)
OutputStream::m_output
Gaudi::Property< std::string > m_output
Definition: OutputStream.h:63
Gaudi::Algorithm::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
The standard service locator.
Definition: Algorithm.cpp:586
ON_DEBUG
#define ON_DEBUG
Definition: OutputStream.cpp:36
IRegistry
Definition: IRegistry.h:32
OutputStream::selectedObjects
IDataSelector * selectedObjects()
Return the list of selected objects.
Definition: OutputStream.h:163
std::any_of
T any_of(T... args)
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:308
OutputStream::m_doPreLoad
Gaudi::Property< bool > m_doPreLoad
Definition: OutputStream.h:59
OutputStream::m_pConversionSvc
SmartIF< IConversionSvc > m_pConversionSvc
Keep reference to the data conversion service.
Definition: OutputStream.h:105
OutputStream::m_outputName
Gaudi::Property< std::string > m_outputName
Definition: OutputStream.h:64
std::vector::clear
T clear(T... args)
basic.alg
alg
Definition: basic.py:15
std::vector::push_back
T push_back(T... args)
OutputStream::m_vetoAlgs
std::vector< Gaudi::Algorithm * > m_vetoAlgs
Vector of Algorithms that this stream is vetoed by.
Definition: OutputStream.h:124
OutputStream::m_requireNames
Gaudi::Property< std::vector< std::string > > m_requireNames
Definition: OutputStream.h:75
IAlgManager
Definition: IAlgManager.h:37
std::stoi
T stoi(T... args)
OutputStream::collect
virtual bool collect(IRegistry *dir, int level)
Store agent's classback.
Definition: OutputStream.cpp:218
OutputStream::findItem
DataStoreItem * findItem(const std::string &path)
Find single item identified by its path (exact match)
Definition: OutputStream.cpp:316
OutputStream::connectConversionSvc
virtual StatusCode connectConversionSvc()
Definition: OutputStream.cpp:350
OutputStream::m_pDataProvider
SmartIF< IDataProviderSvc > m_pDataProvider
Keep reference to the data provider service.
Definition: OutputStream.h:101
StatusCode
Definition: StatusCode.h:65
OutputStream::m_algDependentItems
AlgDependentItems m_algDependentItems
Items to be saved for specific algorithms.
Definition: OutputStream.h:113
HistoDumpEx.r
r
Definition: HistoDumpEx.py:20
toupper
void toupper(std::string &s)
Definition: StatusCodeSvc.cpp:17
DataStoreItem
Definition: DataStoreItem.h:27
OutputStream::clearSelection
void clearSelection()
Clear list of selected objects.
Definition: OutputStream.cpp:307
Gaudi::Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:90
std::string::c_str
T c_str(T... args)
OutputStream::Items
std::vector< DataStoreItem * > Items
Definition: OutputStream.h:40
OutputStream::addItem
void addItem(Items &itms, const std::string &descriptor)
Add item to output streamer list.
Definition: OutputStream.cpp:327
Gaudi::Property::value
const ValueType & value() const
Backward compatibility (.
Definition: Property.h:240
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:943
OutputStream::hasInput
virtual bool hasInput() const
Tell if the instance has been configured with input items or not.
Definition: OutputStream.cpp:498
OutputStream::writeObjects
virtual StatusCode writeObjects()
Select the different objects and write them to file.
Definition: OutputStream.cpp:165
OutputStream::m_algDependentItemList
Gaudi::Property< AlgDependentItemNames > m_algDependentItemList
Definition: OutputStream.h:53
OutputStream::m_pDataManager
SmartIF< IDataManagerSvc > m_pDataManager
Keep reference to the data manager service.
Definition: OutputStream.h:103
SmartIF< IAlgorithm >
IRegistry::setAddress
virtual void setAddress(IOpaqueAddress *pAddress)=0
Set/Update Opaque storage address.
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:203
OutputStream::m_incidentSvc
SmartIF< IIncidentSvc > m_incidentSvc
Reference to the incident service.
Definition: OutputStream.h:96
Gaudi::Property::useUpdateHandler
bool useUpdateHandler() override
manual trigger for callback for update
Definition: Property.h:161
gaudirun.level
level
Definition: gaudirun.py:346
IOTest.sel
sel
Definition: IOTest.py:104
OutputStream::m_itemList
Items m_itemList
Vector of items to be saved to this stream.
Definition: OutputStream.h:109
std::vector::swap
T swap(T... args)
SmartIF::as
SmartIF< IFace > as() const
return a new SmartIF instance to another interface
Definition: SmartIF.h:117
OutputStream::m_storeName
Gaudi::Property< std::string > m_storeName
Definition: OutputStream.h:65
std::string::substr
T substr(T... args)
IRegistry::address
virtual IOpaqueAddress * address() const =0
Retrieve opaque storage address.
IPersistencySvc
Definition: IPersistencySvc.h:29
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:100
SmartIF::get
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:86
std::begin
T begin(T... args)
OutputStream::m_doPreLoadOpt
Gaudi::Property< bool > m_doPreLoadOpt
Definition: OutputStream.h:61
IRegistry::object
virtual DataObject * object() const =0
Retrieve object behind the link.
OutputStream::decodeAlgorithm
Gaudi::Algorithm * decodeAlgorithm(const std::string &theName)
Decode a single algorithm name.
Definition: OutputStream.cpp:428
DataObject
Definition: DataObject.h:40
OutputStream::isEventAccepted
bool isEventAccepted() const
Test whether this event should be output.
Definition: OutputStream.cpp:473
std::string::empty
T empty(T... args)
std::unique
T unique(T... args)
DataStoreItem::path
const std::string & path() const
Accessor: Retrieve load path.
Definition: DataStoreItem.h:66
std::end
T end(T... args)
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:101
OutputStream::decodeAlgorithms
void decodeAlgorithms(Gaudi::Property< std::vector< std::string >> &theNames, std::vector< Gaudi::Algorithm * > &theAlgs)
Decode specified list of Algorithms.
Definition: OutputStream.cpp:452
OutputStream::m_itemNames
Gaudi::Property< ItemNames > m_itemNames
Definition: OutputStream.h:50
Incident
Definition: Incident.h:27
Gaudi::Utils::AttribStringParser
Parse attribute strings allowing iteration over the various attributes.
Definition: AttribStringParser.h:40
std::set
STL class.
std::string::rfind
T rfind(T... args)
OutputStream::collectFromSubTree
StatusCode collectFromSubTree(DataObject *)
Definition: OutputStream.cpp:502
OutputStream::m_objects
IDataSelector m_objects
Collection of objects being selected.
Definition: OutputStream.h:115
std::exception::what
T what(T... args)
OutputStream::m_acceptAlgs
std::vector< Gaudi::Algorithm * > m_acceptAlgs
Vector of Algorithms that this stream accepts.
Definition: OutputStream.h:120
OutputStream::m_persName
Gaudi::Property< std::string > m_persName
Definition: OutputStream.h:67
OutputStream::m_acceptNames
Gaudi::Property< std::vector< std::string > > m_acceptNames
Definition: OutputStream.h:69
GaudiPython.Pythonizations.items
items
Definition: Pythonizations.py:526
IConversionSvc
Definition: IConversionSvc.h:47