| The Gaudi Framework v27r1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

EventNodeKiller.cpp
Go to the documentation of this file.
1 // Include files
2 // local
3 #include "EventNodeKiller.h"
4
5 //-----------------------------------------------------------------------------
6 // Implementation file for class : EventNodeKiller
7 //
8 // 2005-07-14 : Marco Cattaneo
9 //-----------------------------------------------------------------------------
10
11 // Declaration of the Algorithm Factory
12 DECLARE_COMPONENT( EventNodeKiller )
13
14
15 //=============================================================================
16 // Standard constructor, initializes variables
17 //=============================================================================
18 EventNodeKiller::EventNodeKiller( const std::string& name,
19 ISvcLocator* pSvcLocator)
20 : GaudiAlgorithm ( name , pSvcLocator )
21 {
22 declareProperty( "Nodes", m_nodes );
23 }
24
25 //=============================================================================
26 // Main execution
27 //=============================================================================
28 StatusCode EventNodeKiller::execute() {
29
30 if (msgLevel(MSG::DEBUG)) debug() << "==> Execute" << endmsg;
31
32 for( auto& node : m_nodes ) {
33 if (msgLevel(MSG::DEBUG)) debug() << "Killing node " << node << endmsg;
34 eventSvc()->unlinkObject( node ).ignore();
35 }
36
37 return StatusCode::SUCCESS;
38 }
39 //=============================================================================
EventNodeKiller.h
ISvcLocator
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28
MSG::DEBUG
Definition: IMessageSvc.h:18
std
STL namespace.
EventNodeKiller::m_nodes
std::vector< std::string > m_nodes
String property "Nodes".
Definition: EventNodeKiller.h:27
EventNodeKiller
Algorithm to kill nodes in the event data store.
Definition: EventNodeKiller.h:17
DECLARE_COMPONENT
#define DECLARE_COMPONENT(type)
Definition: PluginService.h:36
StatusCode::SUCCESS
Definition: StatusCode.h:30
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
GaudiAlgorithm
The useful base class for data processing algorithms.
Definition: GaudiAlgorithm.h:93
Algorithm::eventSvc
SmartIF< IDataProviderSvc > & eventSvc() const
The standard event data service.
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:127
IDataProviderSvc::unlinkObject
virtual StatusCode unlinkObject(IRegistry *from, const std::string &objPath)=0
Remove a link to another object.
StatusCode::ignore
void ignore() const
Definition: StatusCode.h:108
CommonMessagingBase::msgLevel
MSG::Level msgLevel() const
get the output level from the embedded MsgStream
Definition: CommonMessaging.h:136
EventNodeKiller::execute
StatusCode execute() override
Algorithm execution.
Definition: EventNodeKiller.cpp:28
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244