ATLAS Offline Software
JobIDSvc.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "JobIDSvc.h"
6 
7 #include <uuid/uuid.h>
8 
9 JobIDSvc::JobIDSvc(const std::string& name, ISvcLocator* svc) :
10  base_class(name, svc)
11 {}
12 
14 {
15  ATH_MSG_INFO("Initializing " << name());
16 
17  uuid_generate(m_JobID);
18  return StatusCode::SUCCESS;
19 }
20 
22 {
23  return const_cast<PJobID_t>(m_JobID);
24 }
25 
26 std::string JobIDSvc::toString() const
27 {
28  return reinterpret_cast<const char*>(m_JobID);
29 }
PJobID_t
const unsigned char * PJobID_t
Definition: IJobIDSvc.h:21
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
JobIDSvc::initialize
virtual StatusCode initialize() override
Gaudi Service Implementation.
Definition: JobIDSvc.cxx:13
JobIDSvc::getJobID
virtual PJobID_t getJobID() const override
Get current JobID.
Definition: JobIDSvc.cxx:21
JobIDSvc::JobIDSvc
JobIDSvc(const std::string &name, ISvcLocator *svc)
Definition: JobIDSvc.cxx:9
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
JobIDSvc::m_JobID
JobID_t m_JobID
Definition: JobIDSvc.h:34
JobIDSvc::toString
virtual std::string toString() const override
Get current JobID as string.
Definition: JobIDSvc.cxx:26
JobIDSvc.h