Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v36r11 (bdb84f5f)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
OutputStream.cpp
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 // Framework include files
19 #include "GaudiKernel/IRegistry.h"
21 #include "GaudiKernel/Incident.h"
22 
24 #include "GaudiKernel/DataObject.h"
26 #include "GaudiKernel/MsgStream.h"
27 #include "GaudiKernel/strcasecmp.h"
28 
29 #include "OutputStream.h"
30 
31 #include <set>
32 
33 // Define the algorithm factory for the standard output data writer
35 
36 #define ON_DEBUG if ( msgLevel( MSG::DEBUG ) )
37 
38 namespace {
39  bool passed( const Gaudi::Algorithm* alg ) {
40  const auto& algState = alg->execState( Gaudi::Hive::currentContext() );
41  return algState.state() == AlgExecState::State::Done && algState.filterPassed();
42  }
43 } // namespace
44 
45 // initialize data writer
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 }
131 
132 // terminate data writer
134  info() << "Events output: " << m_events << endmsg;
135  if ( m_fireIncidents ) m_incidentSvc->fireIncident( Incident( m_outputName, IncidentType::EndOutputFile ) );
142  return StatusCode::SUCCESS;
143 }
144 
145 // Work entry point
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 }
163 
164 // Select the different objects and write them to file
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 }
216 
217 // Place holder to create configurable data store agent
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 }
234 
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
290  std::set<DataObject*> unique;
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 }
305 
306 // Clear collected object list
308 
309 // Remove all items from the output streamer list;
311  for ( auto& i : itms ) delete i;
312  itms.clear();
313 }
314 
315 // Find single item identified by its path (exact match)
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 }
325 
326 // Add item to output streamer list
327 void OutputStream::addItem( Items& itms, const std::string& descriptor ) {
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 }
348 
349 // Connect to proper conversion service
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 }
427 
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 }
451 
453  std::vector<Gaudi::Algorithm*>& theAlgs ) {
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 }
472 
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 }
497 
499  return !( m_itemNames.empty() && m_optItemNames.empty() && m_algDependentItemList.empty() );
500 }
501 
503  return m_pDataManager->traverseSubTree( pObj,
504  [this]( IRegistry* r, int level ) { return this->collect( r, level ); } );
505 }
OutputStream
A small to stream Data I/O.
Definition: OutputStream.h:38
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
toupper
void toupper(std::string &s)
Definition: ExceptionSvc.cpp:36
OutputStream::m_currentItem
DataStoreItem * m_currentItem
Keep track of the current item.
Definition: OutputStream.h:107
IAlgManager.h
OutputStream::clearItems
void clearItems(Items &itms)
Clear item list.
Definition: OutputStream.cpp:310
std::string
STL class.
DataStoreItem.h
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::Hive::currentContext
GAUDI_API const EventContext & currentContext()
Definition: ThreadLocalContext.cpp:30
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:314
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::find_if
T find_if(T... args)
strcasecmp.h
std::vector::size
T size(T... args)
IPersistencySvc.h
OutputStream::m_output
Gaudi::Property< std::string > m_output
Definition: OutputStream.h:63
OutputStream::finalize
StatusCode finalize() override
Terminate OutputStream.
Definition: OutputStream.cpp:133
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::vector::back
T back(T... args)
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:310
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
IDataProviderSvc.h
std::vector::clear
T clear(T... args)
basic.alg
alg
Definition: basic.py:15
IIncidentSvc.h
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::initialize
StatusCode initialize() override
Initialize OutputStream.
Definition: OutputStream.cpp:46
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
DataStoreItem
Definition: DataStoreItem.h:27
IOpaqueAddress.h
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::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
Definition: Property.h:239
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:961
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
AttribStringParser.h
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:364
IRegistry.h
IOTest.sel
sel
Definition: IOTest.py:109
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
DataObject.h
SmartIF::get
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:86
std::vector::begin
T begin(T... args)
DECLARE_COMPONENT
#define DECLARE_COMPONENT(type)
Definition: PluginServiceV1.h:46
OutputStream::m_doPreLoadOpt
Gaudi::Property< bool > m_doPreLoadOpt
Definition: OutputStream.h:61
OutputStream::execute
StatusCode execute() override
Working entry point.
Definition: OutputStream.cpp:146
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)
DataStoreItem::path
const std::string & path() const
Accessor: Retrieve load path.
Definition: DataStoreItem.h:66
OutputStream.h
std::vector::end
T end(T... args)
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:101
IConversionSvc.h
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
ISvcLocator.h
OutputStream::m_itemNames
Gaudi::Property< ItemNames > m_itemNames
Definition: OutputStream.h:50
Incident.h
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.
Gaudi::Property
Implementation of property with value of concrete type.
Definition: Property.h:39
IDataManagerSvc.h
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)
MsgStream.h
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:546
IConversionSvc
Definition: IConversionSvc.h:47