ATLAS Offline Software
Loading...
Searching...
No Matches
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"
9
10#include <iostream>
11#include <stdexcept>
12
13InDetTrackCnv::InDetTrackCnv(ISvcLocator* svcloc):
14 InDetTrackCnvBase(svcloc)
15{
16}
17
18
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
32void
33InDetTrackCnv::readObjectFromPool( const std::string& token )
34{
35 static const pool::Guid p2_guid( "4E3778E2-1497-4F10-8746-AA02319FAC83" );
36 static const pool::Guid p1_guid( "8380F7AC-4A8F-4382-95A5-1234E43D3B08" );
37
38 // set the POOL token which will be used for reading from POOL
39 setToken( token );
40
41 // select the object type based on its GUID
42 if( compareClassGuid( p2_guid ) ) {
43 // read the object using the main TP converter
45 }else if( compareClassGuid( p1_guid ) ) {
47 }
48 else
49 throw std::runtime_error( "Unsupported version of InDetTrack_PERS (unknown GUID)" );
50}
51
52
T_AthenaPoolExtendingCnv< InDetTrack, InDetTrack_PERS > InDetTrackCnvBase
InDetTrackCnv_tlp1 m_TPConverter1
InDetTrackCnv_tlp2 m_TPConverter2
virtual void readObjectFromPool(const std::string &)
Read the persistent object from POOL.
virtual StatusCode initialize()
Gaudi Service Interface method implementations:
InDetTrackCnv(ISvcLocator *svcloc)
virtual bool compareClassGuid(const Guid &clid) const
virtual void setToken(const std::string &token) override