The Gaudi Framework  master (37c0b60a)
OutputStream.cpp
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2024 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 
46  return Algorithm::start().andThen( [this]() {
47  // Open the output file now to ensure it is always written even if empty
48  return m_pConversionSvc->connectOutput( m_outputName, m_outputType );
49  } );
50 }
51 
52 // initialize data writer
54  auto status = Algorithm::initialize();
55  if ( status.isFailure() ) return status;
56 
57  if ( m_output.empty() ) {
58  fatal() << "property Output not set. OutputStream instances require an output" << endmsg;
59  return StatusCode::FAILURE;
60  }
61 
62  // Reset the number of events written
63  m_events = 0;
64  // Get access to the DataManagerSvc
66  if ( !m_pDataManager ) {
67  fatal() << "Unable to locate IDataManagerSvc interface" << endmsg;
68  return StatusCode::FAILURE;
69  }
70  // Get access to the IncidentService
71  m_incidentSvc = serviceLocator()->service( "IncidentSvc" );
72  if ( !m_incidentSvc ) {
73  warning() << "Error retrieving IncidentSvc." << endmsg;
74  return StatusCode::FAILURE;
75  }
76  // Get access to the assigned data service
78  if ( !m_pDataProvider ) {
79  fatal() << "Unable to locate IDataProviderSvc interface of " << m_storeName << endmsg;
80  return StatusCode::FAILURE;
81  }
82  if ( hasInput() ) {
84  if ( !status.isSuccess() ) {
85  fatal() << "Unable to connect to conversion service." << endmsg;
86  if ( m_outputName != "" && m_fireIncidents )
87  m_incidentSvc->fireIncident( Incident( m_outputName, IncidentType::FailOutputFile ) );
88  return status;
89  }
90  }
91 
92  // Clear the list with optional items
94  // Clear the item list
96 
97  // Take the new item list from the properties.
98  ON_DEBUG debug() << "ItemList : " << m_itemNames.value() << endmsg;
99  for ( const auto& i : m_itemNames ) addItem( m_itemList, i );
100 
101  // Take the new item list from the properties.
102  ON_DEBUG debug() << "OptItemList : " << m_optItemNames.value() << endmsg;
103  for ( const auto& i : m_optItemNames ) addItem( m_optItemList, i );
104 
105  // prepare the algorithm selected dependent locations
106  ON_DEBUG debug() << "AlgDependentItemList : " << m_algDependentItemList.value() << endmsg;
107  for ( const auto& a : m_algDependentItemList ) {
108  // Get the algorithm pointer
109  auto theAlgorithm = decodeAlgorithm( a.first );
110  if ( theAlgorithm ) {
111  // Get the item list for this alg
112  auto& items = m_algDependentItems[theAlgorithm];
113  // Clear the list for this alg
114  clearItems( items );
115  // fill the list again
116  for ( const auto& i : a.second ) addItem( items, i );
117  }
118  }
119 
120  // Take the item list to the data service preload list.
121  if ( m_doPreLoad ) {
122  for ( auto& j : m_itemList ) m_pDataProvider->addPreLoadItem( *j ).ignore();
123  // Not working: bad reference counting! pdataSvc->release();
124  }
125 
126  if ( m_doPreLoadOpt ) {
127  for ( auto& j : m_optItemList ) m_pDataProvider->addPreLoadItem( *j ).ignore();
128  }
129  info() << "Data source: " << m_storeName.value() << " output: " << m_output.value() << endmsg;
130 
131  // Decode the accept, required and veto Algorithms. The logic is the following:
132  // a. The event is accepted if all lists are empty.
133  // b. The event is provisionally accepted if any Algorithm in the accept list
134  // has been executed and has indicated that its filter is passed. This
135  // provisional acceptance can be overridden by the other lists.
136  // c. The event is rejected unless all Algorithms in the required list have
137  // been executed and have indicated that their filter passed.
138  // d. The event is rejected if any Algorithm in the veto list has been
139  // executed and has indicated that its filter has passed.
143 
144  return StatusCode::SUCCESS;
145 }
146 
147 // terminate data writer
149  info() << "Events output: " << m_events << endmsg;
150  if ( m_fireIncidents ) m_incidentSvc->fireIncident( Incident( m_outputName, IncidentType::EndOutputFile ) );
157  return StatusCode::SUCCESS;
158 }
159 
160 // Work entry point
162  // Clear any previously existing item list
163  clearSelection();
164  // Test whether this event should be output
165  if ( isEventAccepted() ) {
166  const StatusCode sc = writeObjects();
167  clearSelection();
168  ++m_events;
169  if ( sc.isSuccess() && m_fireIncidents ) {
170  m_incidentSvc->fireIncident( Incident( m_outputName, IncidentType::WroteToOutputFile ) );
171  } else if ( m_fireIncidents ) {
172  m_incidentSvc->fireIncident( Incident( m_outputName, IncidentType::FailOutputFile ) );
173  }
174  return sc;
175  }
176  return StatusCode::SUCCESS;
177 }
178 
179 // Select the different objects and write them to file
181  // Connect the output file to the service
182  StatusCode status = collectObjects();
183  if ( status.isSuccess() ) {
185  if ( sel->begin() != sel->end() ) {
186  status = m_pConversionSvc->connectOutput( m_outputName, m_outputType );
187  if ( status.isSuccess() ) {
188  // Now pass the collection to the persistency service
189  IOpaqueAddress* pAddress = nullptr;
190  for ( auto& j : *sel ) {
191  try {
192  const StatusCode iret = m_pConversionSvc->createRep( j, pAddress );
193  if ( !iret.isSuccess() ) {
194  status = iret;
195  continue;
196  }
197  IRegistry* pReg = j->registry();
198  pReg->setAddress( pAddress );
199  } catch ( const std::exception& excpt ) {
200  const std::string loc = ( j->registry() ? j->registry()->identifier() : "UnRegistered" );
201  fatal() << "std::exception during createRep for '" << loc << "' " << System::typeinfoName( typeid( *j ) )
202  << endmsg;
203  fatal() << excpt.what() << endmsg;
204  throw;
205  }
206  }
207  for ( auto& j : *sel ) {
208  try {
209  IRegistry* pReg = j->registry();
210  const StatusCode iret = m_pConversionSvc->fillRepRefs( pReg->address(), j );
211  if ( !iret.isSuccess() ) status = iret;
212  } catch ( const std::exception& excpt ) {
213  const std::string loc = ( j->registry() ? j->registry()->identifier() : "UnRegistered" );
214  fatal() << "std::exception during fillRepRefs for '" << loc << "'" << System::typeinfoName( typeid( *j ) )
215  << endmsg;
216  fatal() << excpt.what() << endmsg;
217  throw;
218  }
219  }
220  // Commit the data if there was no error; otherwise possibly discard
221  if ( status.isSuccess() ) {
222  status = m_pConversionSvc->commitOutput( m_outputName, true );
223  } else {
224  m_pConversionSvc->commitOutput( m_outputName, false ).ignore();
225  }
226  }
227  }
228  }
229  return status;
230 }
231 
232 // Place holder to create configurable data store agent
234  if ( level < m_currentItem->depth() ) {
235  if ( dir->object() ) {
236  /*
237  std::cout << "Analysing ("
238  << dir->name()
239  << ") Object:"
240  << ((dir->object()==0) ? "UNLOADED" : "LOADED")
241  << std::endl;
242  */
243  m_objects.push_back( dir->object() );
244  return true;
245  }
246  }
247  return false;
248 }
249 
253 
254  // Traverse the tree and collect the requested objects
255  for ( auto& i : m_itemList ) {
256  DataObject* obj = nullptr;
257  m_currentItem = i;
258  StatusCode iret = m_pDataProvider->retrieveObject( m_currentItem->path(), obj );
259  if ( iret.isSuccess() ) {
260  iret = collectFromSubTree( obj );
261  if ( !iret.isSuccess() ) status = iret;
262  } else {
263  error() << "Cannot write mandatory object(s) (Not found) " << m_currentItem->path() << endmsg;
264  status = iret;
265  }
266  }
267 
268  // Traverse the tree and collect the requested objects (tolerate missing items here)
269  for ( auto& i : m_optItemList ) {
270  DataObject* obj = nullptr;
271  m_currentItem = i;
272  StatusCode iret = m_pDataProvider->retrieveObject( m_currentItem->path(), obj );
273  if ( iret.isSuccess() ) iret = collectFromSubTree( obj );
274  if ( !iret.isSuccess() ) {
275  ON_DEBUG
276  debug() << "Ignore request to write non-mandatory object(s) " << m_currentItem->path() << endmsg;
277  }
278  }
279 
280  // Collect objects dependent on particular algorithms
281  for ( const auto& iAlgItems : m_algDependentItems ) {
282  auto alg = iAlgItems.first;
283  const Items& items = iAlgItems.second;
284  if ( passed( alg ) ) {
285  ON_DEBUG
286  debug() << "Algorithm '" << alg->name() << "' fired. Adding " << items << endmsg;
287  for ( const auto& i : items ) {
288  DataObject* obj = nullptr;
289  m_currentItem = i;
290  StatusCode iret = m_pDataProvider->retrieveObject( m_currentItem->path(), obj );
291  if ( iret.isSuccess() ) {
292  iret = collectFromSubTree( obj );
293  if ( !iret.isSuccess() ) status = iret;
294  } else {
295  error() << "Cannot write mandatory (algorithm dependent) object(s) (Not found) " << m_currentItem->path()
296  << endmsg;
297  status = iret;
298  }
299  }
300  }
301  }
302 
303  if ( status.isSuccess() ) {
304  // Remove duplicates from the list of objects, preserving the order in the list
305  std::set<DataObject*> unique;
306  std::vector<DataObject*> tmp; // temporary vector with the reduced list
307  tmp.reserve( m_objects.size() );
308  for ( auto& o : m_objects ) {
309  if ( !unique.count( o ) ) {
310  // if the pointer is not in the set, add it to both the set and the temporary vector
311  unique.insert( o );
312  tmp.push_back( o );
313  }
314  }
315  m_objects.swap( tmp ); // swap the data of the two vectors
316  }
317 
318  return status;
319 }
320 
321 // Clear collected object list
323 
324 // Remove all items from the output streamer list;
326  for ( auto& i : itms ) delete i;
327  itms.clear();
328 }
329 
330 // Find single item identified by its path (exact match)
332  auto matchPath = [&]( const DataStoreItem* i ) { return i->path() == path; };
333  auto i = std::find_if( m_itemList.begin(), m_itemList.end(), matchPath );
334  if ( i == m_itemList.end() ) {
335  i = std::find_if( m_optItemList.begin(), m_optItemList.end(), matchPath );
336  if ( i == m_optItemList.end() ) return nullptr;
337  }
338  return *i;
339 }
340 
341 // Add item to output streamer list
342 void OutputStream::addItem( Items& itms, const std::string& descriptor ) {
343  int level = 0;
344  auto sep = descriptor.rfind( "#" );
345  std::string obj_path = descriptor.substr( 0, sep );
346  if ( sep != std::string::npos ) {
347  std::string slevel = descriptor.substr( sep + 1 );
348  level = ( slevel == "*" ) ? 9999999 : std::stoi( slevel );
349  }
350  if ( m_verifyItems ) {
351  size_t idx = obj_path.find( "/", 1 );
352  while ( idx != std::string::npos ) {
353  std::string sub_item = obj_path.substr( 0, idx );
354  if ( !findItem( sub_item ) ) addItem( itms, sub_item + "#1" );
355  idx = obj_path.find( "/", idx + 1 );
356  }
357  }
358  itms.push_back( new DataStoreItem( obj_path, level ) );
359  const auto& item = itms.back();
360  ON_DEBUG
361  debug() << "Adding OutputStream item " << item->path() << " with " << item->depth() << " level(s)." << endmsg;
362 }
363 
364 // Connect to proper conversion service
367  // Get output file from input
368  std::string dbType, svc, shr;
369  for ( auto attrib : Gaudi::Utils::AttribStringParser( m_output ) ) {
370  const std::string& tag = attrib.tag;
371  const std::string& val = attrib.value;
372  switch ( ::toupper( tag[0] ) ) {
373  case 'D':
374  m_outputName = val;
375  break;
376  case 'T':
377  dbType = val;
378  break;
379  case 'S':
380  switch ( ::toupper( tag[1] ) ) {
381  case 'V':
382  svc = val;
383  break;
384  case 'H':
385  shr = "YES";
386  break;
387  }
388  break;
389  case 'O': // OPT='<NEW<CREATE,WRITE,RECREATE>, UPDATE>'
390  switch ( ::toupper( val[0] ) ) {
391  case 'R':
392  if ( ::strncasecmp( val.c_str(), "RECREATE", 3 ) == 0 )
393  m_outputType = "RECREATE";
394  else if ( ::strncasecmp( val.c_str(), "READ", 3 ) == 0 )
395  m_outputType = "READ";
396  break;
397  case 'C':
398  case 'N':
399  case 'W':
400  m_outputType = "NEW";
401  break;
402  case 'U':
403  m_outputType = "UPDATE";
404  break;
405  default:
406  m_outputType = "???";
407  break;
408  }
409  break;
410  default:
411  break;
412  }
413  }
414  if ( !shr.empty() ) m_outputType += "|SHARED";
415  // Get access to the default Persistency service
416  // The default service is the same for input as for output.
417  // If this is not desired, then a specialized OutputStream must overwrite
418  // this value.
419  if ( !dbType.empty() || !svc.empty() ) {
420  std::string typ = !dbType.empty() ? dbType : svc;
421  auto ipers = serviceLocator()->service<IPersistencySvc>( m_persName );
422  if ( !ipers ) {
423  fatal() << "Unable to locate IPersistencySvc interface of " << m_persName << endmsg;
424  return StatusCode::FAILURE;
425  }
426  IConversionSvc* cnvSvc = nullptr;
427  status = ipers->getService( typ, cnvSvc );
428  if ( !status.isSuccess() ) {
429  fatal() << "Unable to locate IConversionSvc interface of database type " << typ << endmsg;
430  return status;
431  }
432  // Increase reference count and keep service.
433  m_pConversionSvc = cnvSvc;
434  } else {
435  fatal() << "Unable to locate IConversionSvc interface (Unknown technology) " << endmsg
436  << "You either have to specify a technology name or a service name!" << endmsg
437  << "Please correct the job option \"" << name() << ".Output\" !" << endmsg;
438  return StatusCode::FAILURE;
439  }
440  return StatusCode::SUCCESS;
441 }
442 
444  Gaudi::Algorithm* theAlgorithm = nullptr;
445 
446  auto theAlgMgr = serviceLocator()->as<IAlgManager>();
447  if ( theAlgMgr ) {
448  // Check whether the supplied name corresponds to an existing
449  // Algorithm object.
450  SmartIF<IAlgorithm>& theIAlg = theAlgMgr->algorithm( theName );
451  if ( theIAlg ) {
452  try {
453  theAlgorithm = dynamic_cast<Gaudi::Algorithm*>( theIAlg.get() );
454  } catch ( ... ) {
455  // do nothing
456  }
457  }
458  } else {
459  fatal() << "Can't locate ApplicationMgr!!!" << endmsg;
460  }
461 
462  if ( !theAlgorithm ) { warning() << "Failed to decode Algorithm name " << theName << endmsg; }
463 
464  return theAlgorithm;
465 }
466 
468  std::vector<Gaudi::Algorithm*>& theAlgs ) {
469  // Reset the list of Algorithms
470  theAlgs.clear();
471 
472  // Build the list of Algorithms from the names list
473  for ( const auto& it : theNames.value() ) {
474 
475  auto theAlgorithm = decodeAlgorithm( it );
476  if ( theAlgorithm ) {
477  // Check that the specified algorithm doesn't already exist in the list
478  if ( std::find( std::begin( theAlgs ), std::end( theAlgs ), theAlgorithm ) == std::end( theAlgs ) ) {
479  theAlgorithm->addRef();
480  theAlgs.push_back( theAlgorithm );
481  }
482  } else {
483  info() << it << " doesn't exist - ignored" << endmsg;
484  }
485  }
486 }
487 
489  // Loop over all Algorithms in the accept list to see
490  // whether any have been executed and have their filter
491  // passed flag set. Any match causes the event to be
492  // provisionally accepted.
493  bool result = m_acceptAlgs.empty() || std::any_of( std::begin( m_acceptAlgs ), std::end( m_acceptAlgs ), passed );
494 
495  // Loop over all Algorithms in the required list to see
496  // whether all have been executed and have their filter
497  // passed flag set. Any mismatch causes the event to be
498  // rejected.
499  if ( result && !m_requireAlgs.empty() ) {
500  result = std::all_of( std::begin( m_requireAlgs ), std::end( m_requireAlgs ), passed );
501  }
502 
503  // Loop over all Algorithms in the veto list to see
504  // whether any have been executed and have their filter
505  // passed flag set. Any match causes the event to be
506  // rejected.
507  if ( result && !m_vetoAlgs.empty() ) {
508  result = std::none_of( std::begin( m_vetoAlgs ), std::end( m_vetoAlgs ), passed );
509  }
510  return result;
511 }
512 
514  return !( m_itemNames.empty() && m_optItemNames.empty() && m_algDependentItemList.empty() );
515 }
516 
518  return m_pDataManager->traverseSubTree( pObj,
519  [this]( IRegistry* r, int level ) { return this->collect( r, level ); } );
520 }
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:251
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:325
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.
StatusCode::andThen
StatusCode andThen(F &&f, ARGS &&... args) const
Chain code blocks making the execution conditional a success result.
Definition: StatusCode.h:163
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
AtlasMCRecoFullPrecedenceDump.path
path
Definition: AtlasMCRecoFullPrecedenceDump.py:49
Gaudi::Algorithm::name
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:526
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
Gaudi::Algorithm::initialize
StatusCode initialize() override
the default (empty) implementation of IStateful::initialize() method
Definition: Algorithm.h:178
OutputStream::finalize
StatusCode finalize() override
Terminate OutputStream.
Definition: OutputStream.cpp:148
Gaudi::Algorithm::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
The standard service locator.
Definition: Algorithm.cpp:570
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:165
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:315
Gaudi::Algorithm::start
StatusCode start() override
the default (empty) implementation of IStateful::start() method
Definition: Algorithm.h:180
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)
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
ManySmallAlgs.alg
alg
Definition: ManySmallAlgs.py:81
IAlgManager
Definition: IAlgManager.h:37
std::stoi
T stoi(T... args)
OutputStream::initialize
StatusCode initialize() override
Initialize OutputStream.
Definition: OutputStream.cpp:53
OutputStream::collect
virtual bool collect(IRegistry *dir, int level)
Store agent's classback.
Definition: OutputStream.cpp:233
OutputStream::findItem
DataStoreItem * findItem(const std::string &path)
Find single item identified by its path (exact match)
Definition: OutputStream.cpp:331
OutputStream::connectConversionSvc
virtual StatusCode connectConversionSvc()
Definition: OutputStream.cpp:365
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
ProduceConsume.j
j
Definition: ProduceConsume.py:104
DataStoreItem
Definition: DataStoreItem.h:27
IOpaqueAddress.h
OutputStream::clearSelection
void clearSelection()
Clear list of selected objects.
Definition: OutputStream.cpp:322
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:342
Gaudi::Property::value
const ValueType & value() const
Definition: Property.h:237
OutputStream::hasInput
virtual bool hasInput() const
Tell if the instance has been configured with input items or not.
Definition: OutputStream.cpp:513
OutputStream::writeObjects
virtual StatusCode writeObjects()
Select the different objects and write them to file.
Definition: OutputStream.cpp:180
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:202
OutputStream::m_incidentSvc
SmartIF< IIncidentSvc > m_incidentSvc
Reference to the incident service.
Definition: OutputStream.h:96
OutputStream::start
StatusCode start() override
Start OutputStream.
Definition: OutputStream.cpp:45
Gaudi::Property::useUpdateHandler
bool useUpdateHandler() override
manual trigger for callback for update
Definition: Property.h:159
gaudirun.level
level
Definition: gaudirun.py:364
IRegistry.h
IOTest.sel
sel
Definition: IOTest.py:106
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:161
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:443
DataObject
Definition: DataObject.h:36
OutputStream::isEventAccepted
bool isEventAccepted() const
Test whether this event should be output.
Definition: OutputStream.cpp:488
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:467
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:37
IDataManagerSvc.h
std::string::rfind
T rfind(T... args)
OutputStream::collectFromSubTree
StatusCode collectFromSubTree(DataObject *)
Definition: OutputStream.cpp:517
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
IConversionSvc
Definition: IConversionSvc.h:47