The Gaudi Framework  v30r3 (a5ef0a68)
OutputStream.cpp
Go to the documentation of this file.
1 // Framework include files
11 #include "GaudiKernel/Incident.h"
12 
14 #include "GaudiKernel/DataObject.h"
16 #include "GaudiKernel/MsgStream.h"
17 #include "GaudiKernel/strcasecmp.h"
18 
19 #include "OutputStream.h"
20 #include "OutputStreamAgent.h"
21 
22 #include <set>
23 
24 // Define the algorithm factory for the standard output data writer
26 
27 #define ON_DEBUG if ( msgLevel( MSG::DEBUG ) )
28 
29 // Standard Constructor
31  : Algorithm( name, pSvcLocator ), m_agent{new OutputStreamAgent( this )}
32 {
33  // Associate action handlers with the AcceptAlgs, RequireAlgs and VetoAlgs.
34  m_acceptNames.declareUpdateHandler( &OutputStream::acceptAlgsHandler, this );
35  m_requireNames.declareUpdateHandler( &OutputStream::requireAlgsHandler, this );
36  m_vetoNames.declareUpdateHandler( &OutputStream::vetoAlgsHandler, this );
37 }
38 
39 // initialize data writer
41 {
42 
43  // Reset the number of events written
44  m_events = 0;
45  // Get access to the DataManagerSvc
47  if ( !m_pDataManager ) {
48  fatal() << "Unable to locate IDataManagerSvc interface" << endmsg;
49  return StatusCode::FAILURE;
50  }
51  // Get access to the IncidentService
52  m_incidentSvc = serviceLocator()->service( "IncidentSvc" );
53  if ( !m_incidentSvc ) {
54  warning() << "Error retrieving IncidentSvc." << endmsg;
55  return StatusCode::FAILURE;
56  }
57  // Get access to the assigned data service
59  if ( !m_pDataProvider ) {
60  fatal() << "Unable to locate IDataProviderSvc interface of " << m_storeName << endmsg;
61  return StatusCode::FAILURE;
62  }
63  if ( hasInput() ) {
65  if ( !status.isSuccess() ) {
66  fatal() << "Unable to connect to conversion service." << endmsg;
67  if ( m_outputName != "" && m_fireIncidents )
68  m_incidentSvc->fireIncident( Incident( m_outputName, IncidentType::FailOutputFile ) );
69  return status;
70  }
71  }
72 
73  // Clear the list with optional items
75  // Clear the item list
77 
78  // Take the new item list from the properties.
79  ON_DEBUG debug() << "ItemList : " << m_itemNames.value() << endmsg;
80  for ( const auto& i : m_itemNames ) addItem( m_itemList, i );
81 
82  // Take the new item list from the properties.
83  ON_DEBUG debug() << "OptItemList : " << m_optItemNames.value() << endmsg;
84  for ( const auto& i : m_optItemNames ) addItem( m_optItemList, i );
85 
86  // prepare the algorithm selected dependent locations
87  ON_DEBUG debug() << "AlgDependentItemList : " << m_algDependentItemList.value() << endmsg;
88  for ( const auto& a : m_algDependentItemList ) {
89  // Get the algorithm pointer
90  Algorithm* theAlgorithm = decodeAlgorithm( a.first );
91  if ( theAlgorithm ) {
92  // Get the item list for this alg
93  auto& items = m_algDependentItems[theAlgorithm];
94  // Clear the list for this alg
95  clearItems( items );
96  // fill the list again
97  for ( const auto& i : a.second ) addItem( items, i );
98  }
99  }
100 
101  // Take the item list to the data service preload list.
102  if ( m_doPreLoad ) {
103  for ( auto& j : m_itemList ) m_pDataProvider->addPreLoadItem( *j ).ignore();
104  // Not working: bad reference counting! pdataSvc->release();
105  }
106 
107  if ( m_doPreLoadOpt ) {
108  for ( auto& j : m_optItemList ) m_pDataProvider->addPreLoadItem( *j ).ignore();
109  }
110  info() << "Data source: " << m_storeName.value() << " output: " << m_output.value() << endmsg;
111 
112  // Decode the accept, required and veto Algorithms. The logic is the following:
113  // a. The event is accepted if all lists are empty.
114  // b. The event is provisionally accepted if any Algorithm in the accept list
115  // has been executed and has indicated that its filter is passed. This
116  // provisional acceptance can be overridden by the other lists.
117  // c. The event is rejected unless all Algorithms in the required list have
118  // been executed and have indicated that their filter passed.
119  // d. The event is rejected if any Algorithm in the veto list has been
120  // executed and has indicated that its filter has passed.
124  return StatusCode::SUCCESS;
125 }
126 
127 // terminate data writer
129 {
130  info() << "Events output: " << m_events << endmsg;
131  if ( m_fireIncidents ) m_incidentSvc->fireIncident( Incident( m_outputName, IncidentType::EndOutputFile ) );
138  return StatusCode::SUCCESS;
139 }
140 
141 // Work entry point
143 {
144  // Clear any previously existing item list
145  clearSelection();
146  // Test whether this event should be output
147  if ( isEventAccepted() ) {
148  const StatusCode sc = writeObjects();
149  clearSelection();
150  ++m_events;
151  if ( sc.isSuccess() && m_fireIncidents ) {
152  m_incidentSvc->fireIncident( Incident( m_outputName, IncidentType::WroteToOutputFile ) );
153  } else if ( m_fireIncidents ) {
154  m_incidentSvc->fireIncident( Incident( m_outputName, IncidentType::FailOutputFile ) );
155  }
156  return sc;
157  }
158  return StatusCode::SUCCESS;
159 }
160 
161 // Select the different objects and write them to file
163 {
164  // Connect the output file to the service
165  StatusCode status = collectObjects();
166  if ( status.isSuccess() ) {
168  if ( sel->begin() != sel->end() ) {
170  if ( status.isSuccess() ) {
171  // Now pass the collection to the persistency service
172  IOpaqueAddress* pAddress = nullptr;
173  for ( auto& j : *sel ) {
174  try {
175  const StatusCode iret = m_pConversionSvc->createRep( j, pAddress );
176  if ( !iret.isSuccess() ) {
177  status = iret;
178  continue;
179  }
180  IRegistry* pReg = j->registry();
181  pReg->setAddress( pAddress );
182  } catch ( const std::exception& excpt ) {
183  const std::string loc = ( j->registry() ? j->registry()->identifier() : "UnRegistered" );
184  fatal() << "std::exception during createRep for '" << loc << "' " << System::typeinfoName( typeid( *j ) )
185  << endmsg;
186  fatal() << excpt.what() << endmsg;
187  throw;
188  }
189  }
190  for ( auto& j : *sel ) {
191  try {
192  IRegistry* pReg = j->registry();
193  const StatusCode iret = m_pConversionSvc->fillRepRefs( pReg->address(), j );
194  if ( !iret.isSuccess() ) status = iret;
195  } catch ( const std::exception& excpt ) {
196  const std::string loc = ( j->registry() ? j->registry()->identifier() : "UnRegistered" );
197  fatal() << "std::exception during fillRepRefs for '" << loc << "'" << System::typeinfoName( typeid( *j ) )
198  << endmsg;
199  fatal() << excpt.what() << endmsg;
200  throw;
201  }
202  }
203  // Commit the data if there was no error; otherwise possibly discard
204  if ( status.isSuccess() ) {
205  status = m_pConversionSvc->commitOutput( m_outputName, true );
206  } else {
208  }
209  }
210  }
211  }
212  return status;
213 }
214 
215 // Place holder to create configurable data store agent
217 {
218  if ( level < m_currentItem->depth() ) {
219  if ( dir->object() ) {
220  /*
221  std::cout << "Analysing ("
222  << dir->name()
223  << ") Object:"
224  << ((dir->object()==0) ? "UNLOADED" : "LOADED")
225  << std::endl;
226  */
227  m_objects.push_back( dir->object() );
228  return true;
229  }
230  }
231  return false;
232 }
233 
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;
244  if ( iret.isSuccess() ) {
245  iret = m_pDataManager->traverseSubTree( obj, m_agent.get() );
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;
258  if ( iret.isSuccess() ) {
259  iret = m_pDataManager->traverseSubTree( obj, m_agent.get() );
260  }
261  if ( !iret.isSuccess() ) {
262  ON_DEBUG
263  debug() << "Ignore request to write non-mandatory object(s) " << m_currentItem->path() << endmsg;
264  }
265  }
266 
267  // Collect objects dependent on particular algorithms
268  for ( const auto& iAlgItems : m_algDependentItems ) {
269  Algorithm* alg = iAlgItems.first;
270  const Items& items = iAlgItems.second;
271  if ( alg->isExecuted() && alg->filterPassed() ) {
272  ON_DEBUG
273  debug() << "Algorithm '" << alg->name() << "' fired. Adding " << items << endmsg;
274  for ( const auto& i : items ) {
275  DataObject* obj = nullptr;
276  m_currentItem = i;
278  if ( iret.isSuccess() ) {
279  iret = m_pDataManager->traverseSubTree( obj, m_agent.get() );
280  if ( !iret.isSuccess() ) status = iret;
281  } else {
282  error() << "Cannot write mandatory (algorithm dependent) object(s) (Not found) " << m_currentItem->path()
283  << endmsg;
284  status = iret;
285  }
286  }
287  }
288  }
289 
290  if ( status.isSuccess() ) {
291  // Remove duplicates from the list of objects, preserving the order in the list
292  std::set<DataObject*> unique;
293  std::vector<DataObject*> tmp; // temporary vector with the reduced list
294  tmp.reserve( m_objects.size() );
295  for ( auto& o : m_objects ) {
296  if ( !unique.count( o ) ) {
297  // if the pointer is not in the set, add it to both the set and the temporary vector
298  unique.insert( o );
299  tmp.push_back( o );
300  }
301  }
302  m_objects.swap( tmp ); // swap the data of the two vectors
303  }
304 
305  return status;
306 }
307 
308 // Clear collected object list
310 
311 // Remove all items from the output streamer list;
313 {
314  for ( auto& i : itms ) delete i;
315  itms.clear();
316 }
317 
318 // Find single item identified by its path (exact match)
320 {
321  auto matchPath = [&]( const DataStoreItem* i ) { return i->path() == path; };
322  auto i = std::find_if( m_itemList.begin(), m_itemList.end(), matchPath );
323  if ( i == m_itemList.end() ) {
324  i = std::find_if( m_optItemList.begin(), m_optItemList.end(), matchPath );
325  if ( i == m_optItemList.end() ) return nullptr;
326  }
327  return *i;
328 }
329 
330 // Add item to output streamer list
331 void OutputStream::addItem( Items& itms, const std::string& descriptor )
332 {
333  int level = 0;
334  auto sep = descriptor.rfind( "#" );
335  std::string obj_path = descriptor.substr( 0, sep );
336  if ( sep != std::string::npos ) {
337  std::string slevel = descriptor.substr( sep + 1 );
338  level = ( slevel == "*" ) ? 9999999 : std::stoi( slevel );
339  }
340  if ( m_verifyItems ) {
341  size_t idx = obj_path.find( "/", 1 );
342  while ( idx != std::string::npos ) {
343  std::string sub_item = obj_path.substr( 0, idx );
344  if ( !findItem( sub_item ) ) addItem( itms, sub_item + "#1" );
345  idx = obj_path.find( "/", idx + 1 );
346  }
347  }
348  itms.push_back( new DataStoreItem( obj_path, level ) );
349  const auto& item = itms.back();
350  ON_DEBUG
351  debug() << "Adding OutputStream item " << item->path() << " with " << item->depth() << " level(s)." << endmsg;
352 }
353 
354 // Connect to proper conversion service
356 {
357  StatusCode status = StatusCode( StatusCode::FAILURE, true );
358  // Get output file from input
359  std::string dbType, svc, shr;
360  for ( auto attrib : Gaudi::Utils::AttribStringParser( m_output ) ) {
361  const std::string& tag = attrib.tag;
362  const std::string& val = attrib.value;
363  switch (::toupper( tag[0] ) ) {
364  case 'D':
365  m_outputName = val;
366  break;
367  case 'T':
368  dbType = val;
369  break;
370  case 'S':
371  switch (::toupper( tag[1] ) ) {
372  case 'V':
373  svc = val;
374  break;
375  case 'H':
376  shr = "YES";
377  break;
378  }
379  break;
380  case 'O': // OPT='<NEW<CREATE,WRITE,RECREATE>, UPDATE>'
381  switch (::toupper( val[0] ) ) {
382  case 'R':
383  if (::strncasecmp( val.c_str(), "RECREATE", 3 ) == 0 )
384  m_outputType = "RECREATE";
385  else if (::strncasecmp( val.c_str(), "READ", 3 ) == 0 )
386  m_outputType = "READ";
387  break;
388  case 'C':
389  case 'N':
390  case 'W':
391  m_outputType = "NEW";
392  break;
393  case 'U':
394  m_outputType = "UPDATE";
395  break;
396  default:
397  m_outputType = "???";
398  break;
399  }
400  break;
401  default:
402  break;
403  }
404  }
405  if ( !shr.empty() ) m_outputType += "|SHARED";
406  // Get access to the default Persistency service
407  // The default service is the same for input as for output.
408  // If this is not desired, then a specialized OutputStream must overwrite
409  // this value.
410  if ( !dbType.empty() || !svc.empty() ) {
411  std::string typ = !dbType.empty() ? dbType : svc;
412  auto ipers = serviceLocator()->service<IPersistencySvc>( m_persName );
413  if ( !ipers ) {
414  fatal() << "Unable to locate IPersistencySvc interface of " << m_persName << endmsg;
415  return StatusCode::FAILURE;
416  }
417  IConversionSvc* cnvSvc = nullptr;
418  status = ipers->getService( typ, cnvSvc );
419  if ( !status.isSuccess() ) {
420  fatal() << "Unable to locate IConversionSvc interface of database type " << typ << endmsg;
421  return status;
422  }
423  // Increase reference count and keep service.
424  m_pConversionSvc = cnvSvc;
425  } else {
426  fatal() << "Unable to locate IConversionSvc interface (Unknown technology) " << endmsg
427  << "You either have to specify a technology name or a service name!" << endmsg
428  << "Please correct the job option \"" << name() << ".Output\" !" << endmsg;
429  return StatusCode::FAILURE;
430  }
431  return StatusCode::SUCCESS;
432 }
433 
435 {
436  ON_DEBUG
437  debug() << "AcceptAlgs : " << m_acceptNames.value() << endmsg;
439 }
440 
442 {
444  if ( sc.isFailure() ) {
445  throw GaudiException( "Failure in OutputStream::decodeAlgorithms", "OutputStream::acceptAlgsHandler", sc );
446  }
447 }
448 
450 {
451  ON_DEBUG
452  debug() << "RequireAlgs : " << m_requireNames.value() << endmsg;
454 }
455 
457 {
459  if ( sc.isFailure() ) {
460  throw GaudiException( "Failure in OutputStream::decodeAlgorithms", "OutputStream::requireAlgsHandler", sc );
461  }
462 }
463 
465 {
466  ON_DEBUG
467  debug() << "VetoAlgs : " << m_vetoNames.value() << endmsg;
469 }
470 
472 {
474  if ( sc.isFailure() ) {
475  throw GaudiException( "Failure in OutputStream::decodeAlgorithms", "OutputStream::vetoAlgsHandler", sc );
476  }
477 }
478 
480 {
481  Algorithm* theAlgorithm = nullptr;
482 
483  auto theAlgMgr = serviceLocator()->as<IAlgManager>();
484  if ( theAlgMgr ) {
485  // Check whether the supplied name corresponds to an existing
486  // Algorithm object.
487  SmartIF<IAlgorithm>& theIAlg = theAlgMgr->algorithm( theName );
488  if ( theIAlg ) {
489  try {
490  theAlgorithm = dynamic_cast<Algorithm*>( theIAlg.get() );
491  } catch ( ... ) {
492  // do nothing
493  }
494  }
495  } else {
496  fatal() << "Can't locate ApplicationMgr!!!" << endmsg;
497  }
498 
499  if ( !theAlgorithm ) {
500  warning() << "Failed to decode Algorithm name " << theName << endmsg;
501  }
502 
503  return theAlgorithm;
504 }
505 
507  std::vector<Algorithm*>& theAlgs )
508 {
509  // Reset the list of Algorithms
510  theAlgs.clear();
511 
513 
514  // Build the list of Algorithms from the names list
515  for ( const auto& it : theNames.value() ) {
516 
517  Algorithm* theAlgorithm = decodeAlgorithm( it );
518  if ( theAlgorithm ) {
519  // Check that the specified algorithm doesn't already exist in the list
520  if ( std::find( std::begin( theAlgs ), std::end( theAlgs ), theAlgorithm ) == std::end( theAlgs ) ) {
521  theAlgorithm->addRef();
522  theAlgs.push_back( theAlgorithm );
523  }
524  } else {
525  info() << it << " doesn't exist - ignored" << endmsg;
526  }
527  }
528  result = StatusCode::SUCCESS;
529 
530  return result;
531 }
532 
534 {
535  auto passed = []( const Algorithm* alg ) { return alg->isExecuted() && alg->filterPassed(); };
536 
537  // Loop over all Algorithms in the accept list to see
538  // whether any have been executed and have their filter
539  // passed flag set. Any match causes the event to be
540  // provisionally accepted.
541  bool result = m_acceptAlgs.empty() || std::any_of( std::begin( m_acceptAlgs ), std::end( m_acceptAlgs ), passed );
542 
543  // Loop over all Algorithms in the required list to see
544  // whether all have been executed and have their filter
545  // passed flag set. Any mismatch causes the event to be
546  // rejected.
547  if ( result && !m_requireAlgs.empty() ) {
548  result = std::all_of( std::begin( m_requireAlgs ), std::end( m_requireAlgs ), passed );
549  }
550 
551  // Loop over all Algorithms in the veto list to see
552  // whether any have been executed and have their filter
553  // passed flag set. Any match causes the event to be
554  // rejected.
555  if ( result && !m_vetoAlgs.empty() ) {
556  result = std::none_of( std::begin( m_vetoAlgs ), std::end( m_vetoAlgs ), passed );
557  }
558  return result;
559 }
560 
562 {
563  return !( m_itemNames.empty() && m_optItemNames.empty() && m_algDependentItemList.empty() );
564 }
Gaudi::Property< std::vector< std::string > > m_acceptNames
Definition: OutputStream.h:57
Parse attribute strings allowing iteration over the various attributes.
bool isEventAccepted() const
Test whether this event should be output.
constexpr static const auto FAILURE
Definition: StatusCode.h:88
void clearItems(Items &itms)
Clear item list.
virtual bool hasInput() const
Tell if the instance has been configured with input items or not.
T empty(T...args)
Gaudi::Property< std::vector< std::string > > m_vetoNames
Definition: OutputStream.h:61
Define general base for Gaudi exception.
StatusCode decodeRequireAlgs()
Decode list of Algorithms that this stream requires.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
IDataSelector m_objects
Collection of objects being selected.
Definition: OutputStream.h:93
StatusCode finalize() override
Terminate OutputStream.
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:765
int m_events
Number of events written to this output stream.
Definition: OutputStream.h:95
Implementation of property with value of concrete type.
Definition: Property.h:381
bool isExecuted() const override
Has this algorithm been executed since the last reset?
Definition: Algorithm.cpp:775
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
virtual StatusCode addPreLoadItem(const DataStoreItem &item)=0
Add an item to the preload list.
std::string m_outputType
Output type: NEW(NEW,CREATE,WRITE,RECREATE), UPDATE)
Definition: OutputStream.h:75
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:332
Gaudi::Property< bool > m_verifyItems
Definition: OutputStream.h:63
DataStoreItem * m_currentItem
Keep track of the current item.
Definition: OutputStream.h:85
bool isSuccess() const
Definition: StatusCode.h:287
Gaudi::Property< std::string > m_output
Definition: OutputStream.h:51
T rfind(T...args)
Gaudi::Property< std::string > m_outputName
Definition: OutputStream.h:52
sel
Definition: IOTest.py:95
The IAlgManager is the interface implemented by the Algorithm Factory in the Application Manager to s...
Definition: IAlgManager.h:27
T end(T...args)
Gaudi::Property< ItemNames > m_optItemNames
Definition: OutputStream.h:39
virtual StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress)=0
Convert the transient object to the requested representation.
std::vector< Algorithm * > m_requireAlgs
Vector of Algorithms that this stream requires.
Definition: OutputStream.h:100
IDataSelector * selectedObjects()
Return the list of selected objects.
Definition: OutputStream.h:159
SmartIF< IFace > as()
Definition: ISvcLocator.h:109
SmartIF< IDataProviderSvc > m_pDataProvider
Keep reference to the data provider service.
Definition: OutputStream.h:79
Description of the DataStoreItem class.
Definition: DataStoreItem.h:17
Gaudi::Property< bool > m_doPreLoad
Definition: OutputStream.h:47
bool isFailure() const
Definition: StatusCode.h:139
std::unique_ptr< OutputStreamAgent > m_agent
Keep reference of agent.
Definition: OutputStream.h:77
const std::string & path() const
Accessor: Retrieve load path.
Definition: DataStoreItem.h:58
A small to stream Data I/O.
Definition: OutputStream.h:29
std::vector< Algorithm * > m_acceptAlgs
Vector of Algorithms that this stream accepts.
Definition: OutputStream.h:98
STL class.
#define DECLARE_COMPONENT(type)
StatusCode decodeAlgorithms(Gaudi::Property< std::vector< std::string >> &theNames, std::vector< Algorithm * > &theAlgs)
Decode specified list of Algorithms.
virtual bool collect(IRegistry *dir, int level)
Store agent&#39;s classback.
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:82
DataStoreItem * findItem(const std::string &path)
Find single item identified by its path (exact match)
virtual StatusCode traverseSubTree(boost::string_ref sub_path, IDataStoreAgent *pAgent)=0
Analyse by traversing all data objects below the sub tree identified by its full path name...
void requireAlgsHandler(Gaudi::Details::PropertyBase &theProp)
Handler for RequireAlgs Property.
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Definition: ISvcLocator.h:79
virtual StatusCode writeObjects()
Select the different objects and write them to file.
T push_back(T...args)
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
SmartIF< IConversionSvc > m_pConversionSvc
Keep reference to the data conversion service.
Definition: OutputStream.h:83
virtual StatusCode connectOutput(const std::string &outputFile)=0
Connect the output file to the service.
StatusCode initialize() override
Initialize OutputStream.
virtual void fireIncident(const Incident &incident)=0
Fire an Incident.
virtual StatusCode connectConversionSvc()
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
AlgDependentItems m_algDependentItems
Items to be saved for specific algorithms.
Definition: OutputStream.h:91
virtual StatusCode commitOutput(const std::string &outputFile, bool do_commit)=0
Commit pending output.
T what(T...args)
Gaudi::Property< std::vector< std::string > > m_requireNames
Definition: OutputStream.h:59
void vetoAlgsHandler(Gaudi::Details::PropertyBase &theProp)
Handler for VetoAlgs Property.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:51
Items m_itemList
Vector of items to be saved to this stream.
Definition: OutputStream.h:87
void addItem(Items &itms, const std::string &descriptor)
Add item to output streamer list.
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition: IRegistry.h:22
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
Definition: Property.h:32
Gaudi::Property< AlgDependentItemNames > m_algDependentItemList
Definition: OutputStream.h:41
SmartIF< IDataManagerSvc > m_pDataManager
Keep reference to the data manager service.
Definition: OutputStream.h:81
virtual StatusCode retrieveObject(IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.
T clear(T...args)
void clearSelection()
Clear list of selected objects.
SmartIF< IIncidentSvc > m_incidentSvc
Reference to the incident service.
Definition: OutputStream.h:72
STL class.
SmartIF< ISvcLocator > & serviceLocator() const override
The standard service locator.
Definition: Algorithm.cpp:834
StatusCode decodeVetoAlgs()
Decode list of Algorithms that this stream is vetoed by.
constexpr static const auto SUCCESS
Definition: StatusCode.h:87
virtual DataObject * object() const =0
Retrieve object behind the link.
T count(T...args)
void acceptAlgsHandler(Gaudi::Details::PropertyBase &theProp)
Handler for AcceptAlgs Property.
StatusCode execute() override
Working entry point.
T get(T...args)
T insert(T...args)
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:78
T find_if(T...args)
T size(T...args)
STL class.
Gaudi::Property< std::string > m_storeName
Definition: OutputStream.h:53
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
T begin(T...args)
virtual void setAddress(IOpaqueAddress *pAddress)=0
Set/Update Opaque storage address.
T any_of(T...args)
const StatusCode & ignore() const
Ignore/check StatusCode.
Definition: StatusCode.h:165
bool filterPassed() const override
Did this algorithm pass or fail its filter criterion for the last event?
Definition: Algorithm.cpp:789
T c_str(T...args)
Base class for all Incidents (computing events).
Definition: Incident.h:17
T back(T...args)
Gaudi::Property< bool > m_doPreLoadOpt
Definition: OutputStream.h:49
#define ON_DEBUG
Algorithm * decodeAlgorithm(const std::string &theName)
Decode a single algorithm name.
T substr(T...args)
OutputStream(const std::string &name, ISvcLocator *pSvcLocator)
Standard algorithm Constructor.
Data persistency service interface.
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
Definition: SmartIF.h:92
Opaque address interface definition.
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
Gaudi::Property< std::string > m_persName
Definition: OutputStream.h:55
std::vector< Algorithm * > m_vetoAlgs
Vector of Algorithms that this stream is vetoed by.
Definition: OutputStream.h:102
virtual IOpaqueAddress * address() const =0
Retrieve opaque storage address.
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30
Gaudi::Property< ItemNames > m_itemNames
Definition: OutputStream.h:38
virtual StatusCode collectObjects()
Collect all objects to be written to the output stream.
virtual StatusCode fillRepRefs(IOpaqueAddress *pAddress, DataObject *pObject)=0
Resolve the references of the converted object.
T stoi(T...args)
void toupper(std::string &s)
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209
StatusCode decodeAcceptAlgs()
Decode list of Algorithms that this stream accepts.
bool m_fireIncidents
should I fire incidents for writing opening/closing etc? in the baseclass, always fire the incidents ...
Definition: OutputStream.h:69
T reserve(T...args)
Items m_optItemList
Vector of optional items to be saved to this stream.
Definition: OutputStream.h:89