ATLAS Offline Software
Loading...
Searching...
No Matches
RootDataBucketBranch.cxx
Go to the documentation of this file.
1
2
3/*
4 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5*/
6
7// RootDataBucketBranch.cxx
8// Implementation file for class RootDataBucketBranch
9// Author: S.Binet<binet@cern.ch>
11
12// AthenaRootComps includes
14
15// STL
16#include <stdexcept>
17#include <sstream>
18
19namespace Athena {
20
22{
23 //std::cerr << "::~DBB[" << m_clid << "," << name() << "]\n";
24}
25
26void*
28 bool /*isConst*/)
29{
30 // no conversion needed
31 if (allowMismatchCLID || clid == m_clid) {
32 return m_ptr;
33
34 } else {
35 std::ostringstream err;
36 err << "cannot convert from clid ["
37 << this->clID()
38 << "] to requested ["
39 << clid
40 << "]";
41 throw std::runtime_error(err.str());
42 }
43 return 0;
44}
45
46void*
47DataBucketBranch::cast(const std::type_info& /*tinfo*/,
49 bool /*isConst*/)
50{
51 return m_ptr;
52}
53
54} //> namespace Athena
uint32_t CLID
The Class ID type.
virtual const CLID & clID() const override
virtual ~DataBucketBranch() override
virtual void * cast(CLID clid, SG::IRegisterTransient *itr, bool isConst=true) override
Return the contents of the DataBucket, converted to type given by clid.
Interface for registering a transient object in t2p map.
Some weak symbol referencing magic... These are declared in AthenaKernel/getMessageSvc....