Loading [MathJax]/extensions/tex2jax.js
Go to the documentation of this file.
36 #define ON_DEBUG if ( msgLevel( MSG::DEBUG ) )
41 return algState.state() == AlgExecState::State::Done && algState.filterPassed();
53 fatal() <<
"Unable to locate IDataManagerSvc interface" <<
endmsg;
59 warning() <<
"Error retrieving IncidentSvc." <<
endmsg;
65 fatal() <<
"Unable to locate IDataProviderSvc interface of " <<
m_storeName <<
endmsg;
71 fatal() <<
"Unable to connect to conversion service." <<
endmsg;
170 if (
sel->begin() !=
sel->end() ) {
175 for (
auto& j : *
sel ) {
185 const std::string loc = ( j->registry() ? j->registry()->identifier() :
"UnRegistered" );
186 fatal() <<
"std::exception during createRep for '" << loc <<
"' " <<
System::typeinfoName(
typeid( *j ) )
192 for (
auto& j : *
sel ) {
198 const std::string loc = ( j->registry() ? j->registry()->identifier() :
"UnRegistered" );
199 fatal() <<
"std::exception during fillRepRefs for '" << loc <<
"'" <<
System::typeinfoName(
typeid( *j ) )
219 if ( level < m_currentItem->depth() ) {
267 auto alg = iAlgItems.first;
269 if ( passed(
alg ) ) {
271 debug() <<
"Algorithm '" <<
alg->name() <<
"' fired. Adding " <<
items <<
endmsg;
272 for (
const auto& i :
items ) {
280 error() <<
"Cannot write mandatory (algorithm dependent) object(s) (Not found) " <<
m_currentItem->
path()
294 if ( !unique.count( o ) ) {
311 for (
auto& i : itms )
delete i;
329 auto sep = descriptor.
rfind(
"#" );
331 if ( sep != std::string::npos ) {
336 size_t idx = obj_path.
find(
"/", 1 );
337 while ( idx != std::string::npos ) {
340 idx = obj_path.
find(
"/", idx + 1 );
344 const auto& item = itms.
back();
346 debug() <<
"Adding OutputStream item " << item->path() <<
" with " << item->depth() <<
" level(s)." <<
endmsg;
357 switch ( ::
toupper( tag[0] ) ) {
365 switch ( ::
toupper( tag[1] ) ) {
375 switch ( ::
toupper( val[0] ) ) {
377 if ( ::strncasecmp( val.
c_str(),
"RECREATE", 3 ) == 0 )
379 else if ( ::strncasecmp( val.
c_str(),
"READ", 3 ) == 0 )
408 fatal() <<
"Unable to locate IPersistencySvc interface of " <<
m_persName <<
endmsg;
412 status = ipers->getService( typ, cnvSvc );
414 fatal() <<
"Unable to locate IConversionSvc interface of database type " << typ <<
endmsg;
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;
444 fatal() <<
"Can't locate ApplicationMgr!!!" <<
endmsg;
447 if ( !theAlgorithm ) { warning() <<
"Failed to decode Algorithm name " << theName <<
endmsg; }
458 for (
const auto& it : theNames.value() ) {
461 if ( theAlgorithm ) {
464 theAlgorithm->addRef();
468 info() << it <<
" doesn't exist - ignored" <<
endmsg;
A small to stream Data I/O.
virtual StatusCode collectObjects()
Collect all objects to be written to the output stream.
Gaudi::Property< bool > m_verifyItems
std::vector< Gaudi::Algorithm * > m_requireAlgs
Vector of Algorithms that this stream requires.
void toupper(std::string &s)
DataStoreItem * m_currentItem
Keep track of the current item.
void clearItems(Items &itms)
Clear item list.
Gaudi::Property< std::vector< std::string > > m_vetoNames
bool m_fireIncidents
should I fire incidents for writing opening/closing etc? in the baseclass, always fire the incidents ...
Items m_optItemList
Vector of optional items to be saved to this stream.
GAUDI_API const EventContext & currentContext()
const std::string & name() const override
The identifying name of the algorithm object.
std::string m_outputType
Output type: NEW(NEW,CREATE,WRITE,RECREATE), UPDATE)
int m_events
Number of events written to this output stream.
Gaudi::Property< ItemNames > m_optItemNames
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
Gaudi::Property< std::string > m_output
StatusCode finalize() override
Terminate OutputStream.
SmartIF< ISvcLocator > & serviceLocator() const override
The standard service locator.
IDataSelector * selectedObjects()
Return the list of selected objects.
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Gaudi::Property< bool > m_doPreLoad
SmartIF< IConversionSvc > m_pConversionSvc
Keep reference to the data conversion service.
Gaudi::Property< std::string > m_outputName
std::vector< Gaudi::Algorithm * > m_vetoAlgs
Vector of Algorithms that this stream is vetoed by.
Gaudi::Property< std::vector< std::string > > m_requireNames
StatusCode initialize() override
Initialize OutputStream.
virtual bool collect(IRegistry *dir, int level)
Store agent's classback.
DataStoreItem * findItem(const std::string &path)
Find single item identified by its path (exact match)
virtual StatusCode connectConversionSvc()
SmartIF< IDataProviderSvc > m_pDataProvider
Keep reference to the data provider service.
AlgDependentItems m_algDependentItems
Items to be saved for specific algorithms.
void clearSelection()
Clear list of selected objects.
Base class from which all concrete algorithm classes should be derived.
void addItem(Items &itms, const std::string &descriptor)
Add item to output streamer list.
const ValueType & value() const
Backward compatibility (.
virtual bool hasInput() const
Tell if the instance has been configured with input items or not.
virtual StatusCode writeObjects()
Select the different objects and write them to file.
Gaudi::Property< AlgDependentItemNames > m_algDependentItemList
SmartIF< IDataManagerSvc > m_pDataManager
Keep reference to the data manager service.
virtual void setAddress(IOpaqueAddress *pAddress)=0
Set/Update Opaque storage address.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
SmartIF< IIncidentSvc > m_incidentSvc
Reference to the incident service.
bool useUpdateHandler() override
manual trigger for callback for update
Items m_itemList
Vector of items to be saved to this stream.
SmartIF< IFace > as() const
return a new SmartIF instance to another interface
Gaudi::Property< std::string > m_storeName
virtual IOpaqueAddress * address() const =0
Retrieve opaque storage address.
constexpr static const auto SUCCESS
TYPE * get() const
Get interface pointer.
#define DECLARE_COMPONENT(type)
Gaudi::Property< bool > m_doPreLoadOpt
StatusCode execute() override
Working entry point.
virtual DataObject * object() const =0
Retrieve object behind the link.
Gaudi::Algorithm * decodeAlgorithm(const std::string &theName)
Decode a single algorithm name.
bool isEventAccepted() const
Test whether this event should be output.
const std::string & path() const
Accessor: Retrieve load path.
constexpr static const auto FAILURE
void decodeAlgorithms(Gaudi::Property< std::vector< std::string >> &theNames, std::vector< Gaudi::Algorithm * > &theAlgs)
Decode specified list of Algorithms.
Gaudi::Property< ItemNames > m_itemNames
Parse attribute strings allowing iteration over the various attributes.
Implementation of property with value of concrete type.
StatusCode collectFromSubTree(DataObject *)
IDataSelector m_objects
Collection of objects being selected.
std::vector< Gaudi::Algorithm * > m_acceptAlgs
Vector of Algorithms that this stream accepts.
Gaudi::Property< std::string > m_persName
Gaudi::Property< std::vector< std::string > > m_acceptNames