ATLAS Offline Software
Loading...
Searching...
No Matches
JetGlobalEventSetup.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7 // Gaudi includes
8#include "GaudiKernel/IIncidentSvc.h"
9#include "GaudiKernel/ServiceHandle.h"
10
13
15
17 // Constructor
19 JetGlobalEventSetup::JetGlobalEventSetup( const std::string& name, ISvcLocator* pSvcLocator) :
20 AthAlgorithm(name,pSvcLocator)
21 {
22 }
23
25 // Initialize tool
28 {
29
30 msg(MSG::INFO) << "initialize()" << endmsg;
31
32 // Get handle on IncidentSvc
33 ServiceHandle<IIncidentSvc> incidentSvc("IncidentSvc", name());
34 CHECK(incidentSvc.retrieve());
35
36 // Register listener for BeginRun
37 incidentSvc->addListener(this, "StoreCleared");
38
39 return StatusCode::SUCCESS;
40 }
41
42
44 // Handle incidents
46 void JetGlobalEventSetup::handle(const Incident& inc)
47 {
48
49 if (inc.type()=="StoreCleared") {
50 ATH_MSG(DEBUG) << " got store cleared event" << endmsg;
51 const StoreClearedIncident* sci
52 = dynamic_cast<const StoreClearedIncident*> (&inc);
53 if (sci && sci->store() == &*evtStore()) {
54 ATH_MSG_DEBUG( " got store cleared event" );
57 //JetMomentMapManager::s_instance.clear();
58 }
59 }
60 }
61
#define endmsg
#define ATH_MSG(lvl)
#define ATH_MSG_DEBUG(x)
Helpers for checking error return status codes and reporting errors.
#define CHECK(...)
Evaluate an expression and check for errors.
Incident sent after a store is cleared.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
MsgStream & msg() const
virtual StatusCode initialize()
virtual void handle(const Incident &)
Implementation of IIncidentListener::handle.
JetGlobalEventSetup(const std::string &name, ISvcLocator *pSvcLocator)
static OrphanJetMomentMap instance
Incident sent after a store is cleared.
const StoreGateSvc * store() const
Return the store that was cleared.
#define DEBUG
Definition page_access.h:11