All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
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 // Destructor
26 //=============================================================================
28 
29 //=============================================================================
30 // Main execution
31 //=============================================================================
33 
34  if (msgLevel() <= MSG::DEBUG) debug() << "==> Execute" << endmsg;
35 
36  std::vector<std::string>::iterator itS;
37  for( itS=m_nodes.begin(); itS != m_nodes.end(); itS++ ) {
38  if (msgLevel() <= MSG::DEBUG) debug() << "Killing node " << *itS << endmsg;
39  eventSvc()->unlinkObject( *itS ).ignore();
40  }
41 
42  return StatusCode::SUCCESS;
43 }
44 //=============================================================================
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:26
std::vector< std::string > m_nodes
String property "Nodes".
Algorithm to kill nodes in the event data store.
#define DECLARE_COMPONENT(type)
Definition: PluginService.h:36
MSG::Level msgLevel() const
The current message service output level.
Definition: GaudiCommon.h:532
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
The useful base class for data processing algorithms.
MsgStream & debug() const
shortcut for the method msgStream ( MSG::DEBUG )
Definition: GaudiCommon.h:499
virtual StatusCode execute()
Algorithm execution.
virtual ~EventNodeKiller()
Destructor.
SmartIF< IDataProviderSvc > & eventSvc() const
The standard event data service.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244