ATLAS Offline Software
Loading...
Searching...
No Matches
LumiBlockCollectionCnv.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
6// File for class LumiBlockCollectionCnv
7// Author: Marjorie Shapiro <mdshapiro@lbl.gov>
9
11
12
14 MsgStream log(msgSvc(), "LumiBlockCollectionConverter" );
15 LumiBlockCollection_PERS * persObj = m_converter.createPersistent( transCont, log );
16
17 log << MSG::DEBUG << "Success" << endmsg;
18 return persObj;
19}
20
22 MsgStream log(msgSvc(), "LumiBlockCollectionConverter" );
23 static const pool::Guid p1_guid("CF1F40C9-6125-4C35-87FF-DDA2C319000C");
24 static const pool::Guid p2_guid("DEF9282A-F174-4382-8248-B94567CD869F");
25
26 if( compareClassGuid(p2_guid) ) {
27 std::unique_ptr< LumiBlockCollection_p2 > col_vect( poolReadObject< LumiBlockCollection_p2 >() );
28 return m_converter.createTransient( col_vect.get(), log );
29 }
30 else if( compareClassGuid(p1_guid) ) {
31 std::unique_ptr< LumiBlockCollection_p1 > col_vect( poolReadObject< LumiBlockCollection_p1 >() );
32 return m_converter_p1.createTransient( col_vect.get(), log );
33 }
34 else {
35 throw std::runtime_error("Unsupported persistent version of LumiBlockCollection");
36 }
37}
#define endmsg
LumiBlockCollection_p2 LumiBlockCollection_PERS
virtual LumiBlockCollection_PERS * createPersistent(LumiBlockCollection *transCont)
virtual LumiBlockCollection * createTransient()
LumiBlockCollectionCnv_p2 m_converter
LumiBlockCollectionCnv_p1 m_converter_p1