ATLAS Offline Software
Loading...
Searching...
No Matches
TrigElectronContainerCnv.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
7
8//create persistent
10{
11 MsgStream mlog(msgSvc(), "TrigElectronContainerConverter" );
12 mlog << MSG::DEBUG << "TrigElectronContainerCnv::createPersistent" << endmsg;
13
14 TrigElectronContainer_PERS *persObj = m_converter.createPersistent( transCont, mlog );
15
16 return persObj;
17}
18
19//create transient
21{
22 MsgStream mlog(msgSvc(), "TrigElectronContainerConverter" );
23 mlog << MSG::DEBUG << "TrigElectronContainerCnv::createTransient" << endmsg;
24
25 static const pool::Guid p3_guid("F2E0066A-3BC5-44F2-A18C-57C63481988D");
26 static const pool::Guid tlp2_guid("2EDB14B9-0B61-4014-90C2-20AEB7AAFEBE");
27 static const pool::Guid tlp1_guid("8831D2A9-F4B6-40BE-97C1-4BD7F9468267");
28 static const pool::Guid p0_guid2("2F97E0FB-7C93-4616-B322-1A01BF65D331");
29 static const pool::Guid p0_guid1("EA6EA1A5-16FC-4DBF-896E-D933B25E65E0");
30
31 if( compareClassGuid( p3_guid ) ){
32 std::unique_ptr< TrigElectronContainer_p3 > col_vect( poolReadObject< TrigElectronContainer_p3 >() );
33 // std::cout << "Reading IMFC p3" << std::endl;
34 return m_converter.createTransient( col_vect.get(), mlog ) ;
35
36 } else if ( compareClassGuid(tlp2_guid) ) {
37
38 std::unique_ptr< TrigElectronContainer_tlp2 > col_vect( poolReadObject< TrigElectronContainer_tlp2 >() );
39 return m_converter_tlp2.createTransient( col_vect.get(), mlog );
40
41 } else if ( compareClassGuid(tlp1_guid) ) {
42
43 std::unique_ptr< TrigElectronContainer_tlp1 > col_vect( poolReadObject< TrigElectronContainer_tlp1 >() );
44 return m_converter_tlp1.createTransient( col_vect.get(), mlog );
45
46 } else if ( compareClassGuid(p0_guid1) || compareClassGuid(p0_guid2) ) {
47
48 // old version from before TP separation, just return it
50
51 } else {
52
53 throw std::runtime_error("Unsupported persistent version of Data container");
54
55 }
56
57}
#define endmsg
TrigElectronContainer_p3 TrigElectronContainer_PERS
TrigElectronContainerCnv_tlp2 m_converter_tlp2
virtual TrigElectronContainer_PERS * createPersistent(TrigElectronContainer *transCont)
virtual TrigElectronContainer * createTransient()
TrigElectronContainerCnv_tlp1 m_converter_tlp1
TrigElectronContainerCnv_p3 m_converter