ATLAS Offline Software
Loading...
Searching...
No Matches
TrigRoiDescriptorCnv.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5// #ifndef XAOD_ANALYSIS
6
14
15
21
31
32//create persistent
34{
35 MsgStream mlog(msgSvc(), "TrigRoiDescriptorConverter" );
36
37 TrigRoiDescriptor_PERS *persObj = m_TPConverters->p3.createPersistent( transObj, mlog );
38
39 return persObj;
40}
41
42//createTransient
44{
45 MsgStream mlog(msgSvc(), "TrigRoiDescriptorConverter" );
46
47 static const pool::Guid p3_guid("28F5BCC8-1F3D-47B1-8286-087F1B298F0A");
48 static const pool::Guid p2_guid("D53CE59B-99A8-4B25-87D5-C08D1AF4BA8A");
49 static const pool::Guid p1_guid("391FFE21-5D82-471E-9FFC-B77150142B8F");
50 static const pool::Guid p0_guid("B2C86E23-8421-4F34-8014-AE4A7E4BA0A7");
51
52 TrigRoiDescriptor *trans_obj(0);
53
54 if( compareClassGuid(p3_guid) ) {
55
56 std::unique_ptr< TrigRoiDescriptor_p3 > col_vect( this->poolReadObject< TrigRoiDescriptor_p3 >() );
57 trans_obj = m_TPConverters->p3.createTransient( col_vect.get(), mlog );
58
59 }
60 else if( compareClassGuid(p2_guid) ) {
61
62 std::unique_ptr< TrigRoiDescriptor_p2 > col_vect( this->poolReadObject< TrigRoiDescriptor_p2 >() );
63 trans_obj = m_TPConverters->p2.createTransient( col_vect.get(), mlog );
64
65 }
66 else if( compareClassGuid(p1_guid) ) {
67
68 std::unique_ptr< TrigRoiDescriptor_p1 > col_vect( this->poolReadObject< TrigRoiDescriptor_p1 >() );
69 trans_obj = m_TPConverters->p1.createTransient( col_vect.get(), mlog );
70
71 }
72 else if( compareClassGuid(p0_guid) ) {
73
74 // old version from before TP separation, just return it
75 trans_obj = this->poolReadObject<TrigRoiDescriptor>();
76
77 } else {
78
79 throw std::runtime_error("Unsupported persistent version of Data container");
80 }
81
82 return trans_obj;
83
84}
85
86// #endif
TrigRoiDescriptor_p3 TrigRoiDescriptor_PERS
Compatibility for old converter classes that don't get passed the key.
TrigRoiDescriptorCnv(ISvcLocator *svcloc)
TrigRoiDescriptor_PERS * createPersistent(TrigRoiDescriptor *transObj)
TrigRoiDescriptorCnv_tp * m_TPConverters
TrigRoiDescriptor * createTransient()
nope - should be used for standalone also, perhaps need to protect the class def bits ifndef XAOD_ANA...
TrigRoiDescriptorCnv_p3 p3
TrigRoiDescriptorCnv_p1 p1
TrigRoiDescriptorCnv_p2 p2