ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetEventCnv
InDetEventAthenaPool
src
InDetTrackCnv.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "GaudiKernel/MsgStream.h"
6
7
#include "
InDetTrackCnv.h
"
8
#include "
TrkTrack/TrackCollection.h
"
9
10
#include <iostream>
11
#include <stdexcept>
12
13
InDetTrackCnv::InDetTrackCnv
(ISvcLocator* svcloc):
14
InDetTrackCnvBase
(svcloc)
15
{
16
}
17
18
19
StatusCode
InDetTrackCnv::initialize
()
20
{
21
if
( !
InDetTrackCnvBase::initialize
().isSuccess() )
22
return
StatusCode::FAILURE;
23
24
25
// std::cout << " ------->>---- In InDetTrackCnv::initialize()" << std::endl;
26
27
return
StatusCode::SUCCESS;
28
}
29
30
31
// this method just reads the persistent object - no TP conversion here
32
void
33
InDetTrackCnv::readObjectFromPool
(
const
Token
* token )
34
{
35
static
const
Guid
p2_guid(
"4E3778E2-1497-4F10-8746-AA02319FAC83"
);
36
static
const
Guid
p1_guid(
"8380F7AC-4A8F-4382-95A5-1234E43D3B08"
);
37
38
// select the object type based on its GUID
39
if
(
compareClassGuid
(token, p2_guid ) ) {
40
// read the object using the main TP converter
41
poolReadObject< InDetTrack_PERS >
(
m_TPConverter2
, token );
42
}
else
if
(
compareClassGuid
(token, p1_guid ) ) {
43
poolReadObject< InDet::Track_tlp1 >
(
m_TPConverter1
, token );
44
}
45
else
46
throw
std::runtime_error(
"Unsupported version of InDetTrack_PERS (unknown GUID)"
);
47
}
InDetTrackCnv.h
InDetTrackCnvBase
T_AthenaPoolExtendingCnv< InDetTrack, InDetTrack_PERS > InDetTrackCnvBase
Definition
InDetTrackCnv.h:20
TrackCollection.h
Guid
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
Definition
Guid.h:25
InDetTrackCnv::m_TPConverter1
InDetTrackCnv_tlp1 m_TPConverter1
Definition
InDetTrackCnv.h:45
InDetTrackCnv::m_TPConverter2
InDetTrackCnv_tlp2 m_TPConverter2
Definition
InDetTrackCnv.h:46
InDetTrackCnv::initialize
virtual StatusCode initialize()
Gaudi Service Interface method implementations:
Definition
InDetTrackCnv.cxx:19
InDetTrackCnv::InDetTrackCnv
InDetTrackCnv(ISvcLocator *svcloc)
Definition
InDetTrackCnv.cxx:13
InDetTrackCnv::readObjectFromPool
virtual void readObjectFromPool(const Token *)
Read the persistent object from POOL.
Definition
InDetTrackCnv.cxx:33
T_AthenaPoolExtendingCnv< InDetTrack, InDetTrack_PERS >::compareClassGuid
virtual bool compareClassGuid(const Token *token, const Guid &clid) const
T_AthenaPoolExtendingCnv< InDetTrack, InDetTrack_PERS >::initialize
virtual StatusCode initialize()
T_AthenaPoolExtendingCnv< InDetTrack, InDetTrack_PERS >::poolReadObject
P * poolReadObject(const Token *token)
Token
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition
Token.h:22
Generated on
for ATLAS Offline Software by
1.17.0