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