ATLAS Offline Software
Public Member Functions | List of all members
DataModelCompatSvc Class Reference

Service for DataVector backwards compatibility. More...

#include <DataModelCompatSvc.h>

Inheritance diagram for DataModelCompatSvc:
Collaboration diagram for DataModelCompatSvc:

Public Member Functions

 DataModelCompatSvc (const std::string &name, ISvcLocator *svc)
 Constructor. More...
 
virtual StatusCode initialize ()
 Service initialization; called at the beginning of the job. More...
 
virtual void handle (const Incident &inc)
 Handle incidents. More...
 
virtual void debug (const char *msg)
 Log a debugging message. More...
 
virtual void error (const char *msg)
 Log an error message. More...
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Detailed Description

Service for DataVector backwards compatibility.

Definition at line 37 of file DataModelCompatSvc.h.

Constructor & Destructor Documentation

◆ DataModelCompatSvc()

DataModelCompatSvc::DataModelCompatSvc ( const std::string &  name,
ISvcLocator *  svc 
)

Constructor.

Parameters
nameThe service name.
svcThe service locator.

Definition at line 35 of file DataModelCompatSvc.cxx.

37  : AthService (name, svc)
38 {
39 }

Member Function Documentation

◆ debug()

void DataModelCompatSvc::debug ( const char *  msg)
virtual

Log a debugging message.

Parameters
msgThe message to log.

Implements RootUtils::ILogger.

Definition at line 90 of file DataModelCompatSvc.cxx.

91 {
93 }

◆ error()

void DataModelCompatSvc::error ( const char *  msg)
virtual

Log an error message.

Parameters
msgThe message to log.

Implements RootUtils::ILogger.

Definition at line 100 of file DataModelCompatSvc.cxx.

101 {
103 }

◆ handle()

void DataModelCompatSvc::handle ( const Incident &  inc)
virtual

Handle incidents.

Parameters
nameThe fired incident.

Definition at line 72 of file DataModelCompatSvc.cxx.

73 {
74  if (inc.type() == "BeginProcessing" || inc.type() == "BeginEvent")
75  {
76  static std::once_flag flag;
77  std::call_once(flag, [&]() {
78  // Do our initialization.
79  ATH_MSG_DEBUG("handling incident " << inc.type());
81  });
82  }
83 }

◆ initialize()

StatusCode DataModelCompatSvc::initialize ( )
virtual

Service initialization; called at the beginning of the job.

Definition at line 45 of file DataModelCompatSvc.cxx.

46 {
47  // We're going to want to scan all types, looking for @c DataVector
48  // instantiations. We can't do that, though, until the data file
49  // has been open and we've set up the proxies. So defer the real
50  // work until there's a BeginProcessing/BeginEvent incident.
51  IIncidentSvc* incsvc = 0;
52  ATH_MSG_DEBUG("running");
53  CHECK( service("IncidentSvc", incsvc) );
54  incsvc->addListener (this, "BeginProcessing");
55  incsvc->addListener (this, "BeginEvent");
56 
57  // This, however, we need to do before opening any files.
63 
64  return StatusCode::SUCCESS;
65 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< Service >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< Service >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< Service >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

The documentation for this class was generated from the following files:
AthService::AthService
AthService()
DataModelAthenaPool::CLHEPConverters::initialize
static void initialize()
Register all CLHEP converters.
Definition: CLHEPConverters.cxx:100
DataModelAthenaPool::DataVectorConvert::initialize
static void initialize(RootUtils::ILogger *logfn=0)
Scan all known DataVector classes and fix up the Root data for any that need conversion.
Definition: DataVectorConvert.cxx:469
DataModelAthenaPool::installPackedContainerConverters
void installPackedContainerConverters()
Install converters for supported instantiations.
Definition: PackedContainerConverter.cxx:136
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
RootConversions::VectorConverters::initialize
static void initialize()
Register all CLHEP converters.
Definition: VectorConverters.cxx:31
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
master.flag
bool flag
Definition: master.py:29
TConvertingStreamerInfo::Initialize
static void Initialize()
Set up conversions.
Definition: TConvertingStreamerInfo.cxx:39
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
TConvertingBranchElement::Initialize
static void Initialize()
Set up to allow for conversions in split mode.
Definition: TConvertingBranchElement.cxx:335
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
AthCommonMsg< Service >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24