ATLAS Offline Software
Loading...
Searching...
No Matches
CTP_DecisionCnv.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5
6// Gaudi/Athena include(s):
7#include "GaudiKernel/MsgStream.h"
8
9// Local include(s):
10#include "CTP_DecisionCnv.h"
11
12// AnalysisTrigger include(s):
14
16
17 MsgStream log( this->msgSvc(), "CTP_DecisionCnv" );
18 CTP_Decision_PERS* persObj = m_converter.createPersistent( transObj, log );
19 return persObj;
20
21}
22
24
25 static const pool::Guid p2_guid( "08922DA9-6E47-4D3A-9FEC-0B4440644B50" );
26 static const pool::Guid p1_guid( "1F421F32-8FBD-47B7-82ED-5354B9BE96D8" );
27 static const pool::Guid p0_guid( "2A450F66-8A30-42E1-91CB-BE1CEE3C772F" );
28
29 if( this->compareClassGuid( p2_guid ) ) {
30
31 std::unique_ptr< CTP_Decision_p2 > pers_ref( this->poolReadObject< CTP_Decision_p2 >() );
32 MsgStream log( this->msgSvc(), "CTP_DecisionCnv" );
33 return m_converter.createTransient( pers_ref.get(), log );
34
35 } else if( this->compareClassGuid( p1_guid ) ) {
36
37 std::unique_ptr< CTP_Decision_p1 > pers_ref( this->poolReadObject< CTP_Decision_p1 >() );
38 MsgStream log( this->msgSvc(), "CTP_DecisionCnv" );
39 return m_converter_p1.createTransient( pers_ref.get(), log );
40
41 } else if( this->compareClassGuid( p0_guid ) ) {
42
43 return this->poolReadObject< CTP_Decision >();
44
45 }
46
47 throw std::runtime_error( "Unsupported persistent version of CTP_Decision" );
48 return 0;
49
50}
CTP_Decision_p2 CTP_Decision_PERS
virtual CTP_Decision * createTransient()
virtual CTP_Decision_PERS * createPersistent(CTP_Decision *transObj)
CTP_DecisionCnv_p1 m_converter_p1
CTP_DecisionCnv_p2 m_converter
Legacy data class representing the LVL1 CTP trigger decision.
virtual bool compareClassGuid(const Guid &clid) const