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 //=============================================================================
19  ISvcLocator* pSvcLocator)
20  : GaudiAlgorithm ( name , pSvcLocator )
21 {
22  declareProperty( "Nodes", m_nodes );
23 }
24 
25 //=============================================================================
26 // Main execution
27 //=============================================================================
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 //=============================================================================
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
STL namespace.
std::vector< std::string > m_nodes
String property "Nodes".
Algorithm to kill nodes in the event data store.
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
#define DECLARE_COMPONENT(type)
Definition: PluginService.h:36
The useful base class for data processing algorithms.
StatusCode execute() override
Algorithm execution.
MSG::Level msgLevel() const
get the output level from the embedded MsgStream