ATLAS Offline Software
Loading...
Searching...
No Matches
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.
virtual StatusCode initialize ()
 Service initialization; called at the beginning of the job.
virtual void handle (const Incident &inc)
 Handle incidents.
virtual void debug (const char *msg)
 Log a debugging message.
virtual void error (const char *msg)
 Log an error message.
MsgStream & msg () 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}
#define ATH_MSG_DEBUG(x)
MsgStream & msg() const

◆ 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}
#define ATH_MSG_ERROR(x)

◆ 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}
static void initialize(RootUtils::ILogger *logfn=0)
Scan all known DataVector classes and fix up the Root data for any that need conversion.
bool flag
Definition master.py:29

◆ 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 SmartIF<IIncidentSvc> incsvc{service("IncidentSvc")};
52 ATH_MSG_DEBUG("running");
53 CHECK( incsvc.isValid() );
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}
#define CHECK(...)
Evaluate an expression and check for errors.
static void initialize()
Register all CLHEP converters.
static void initialize()
Register all CLHEP converters.
static void Initialize()
Set up to allow for conversions in split mode.
static void Initialize()
Set up conversions.
void installPackedContainerConverters()
Install converters for supported instantiations.

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ 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: