ATLAS Offline Software
TrigDecisionCnv.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 #include "TrigDecisionCnv.h"
16 
17 
18 TrigDecisionCnv::TrigDecisionCnv (ISvcLocator* svcloc)
19  : TrigDecisionCnvBase(svcloc)
20 {}
22 
23 
25 {
26  MsgStream log(msgSvc(), "TrigDecisionConverter" );
27 
28  // TrigDec::TrigDecisionCnv_p1 converter;
30  TrigDecision_PERS* persObj = converter.createPersistent( transCont, log );
31 
32  return persObj;
33 }
34 
35 
37 {
38  MsgStream log(msgSvc(), "TrigDecisionConverter" );
39 
40  static const pool::Guid p1_guid("83D7E08D-CF8C-47A0-963F-5618A9509334");
41  static const pool::Guid p2_guid("6BE81E51-B42B-4783-957D-84E7F383E9D5");
42  static const pool::Guid p3_guid("1C0527B6-1B94-4F47-ADE4-D24E7BF91D3E");
43  static const pool::Guid p4_guid("78F57689-0902-4E47-BB04-9BD10C7EF8B5");
44  static const pool::Guid p5_guid("DA3DEF39-2401-4A8E-ACD2-851B0DF10AFA");
45 
46  if ( compareClassGuid(p1_guid) ) {
47  // using unique_ptr ensures deletion of the persistent object
48  std::unique_ptr< TrigDec::TrigDecision_p1 > col_vect( poolReadObject< TrigDec::TrigDecision_p1 >() );
50  return converter.createTransient( col_vect.get(), log );
51  } else if ( compareClassGuid(p2_guid) ) {
52  std::unique_ptr< TrigDec::TrigDecision_p2 > col_vect( poolReadObject< TrigDec::TrigDecision_p2 >() );
54  return converter.createTransient( col_vect.get(), log );
55  } else if ( compareClassGuid(p3_guid) ) {
56  std::unique_ptr< TrigDec::TrigDecision_p3 > col_vect( poolReadObject< TrigDec::TrigDecision_p3 >() );
58  return converter.createTransient( col_vect.get(), log );
59  } else if ( compareClassGuid(p4_guid) ) {
60  std::unique_ptr< TrigDec::TrigDecision_p4 > col_vect( poolReadObject< TrigDec::TrigDecision_p4 >() );
62  return converter.createTransient( col_vect.get(), log );
63  } else if ( compareClassGuid(p5_guid) ) {
64  std::unique_ptr< TrigDec::TrigDecision_p5 > col_vect( poolReadObject< TrigDec::TrigDecision_p5 >() );
66  return converter.createTransient( col_vect.get(), log );
67  }
68  throw std::runtime_error("Unsupported persistent version of Data Collection");
69 }
TrigDecisionCnv_p3.h
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
TrigDecisionCnv.h
TrigDec::TrigDecisionCnv_p1
Definition: TrigDecisionCnv_p1.h:38
TrigDecisionCnv::createPersistent
virtual TrigDecision_PERS * createPersistent(TrigDec::TrigDecision *transCont)
Definition: TrigDecisionCnv.cxx:24
TrigDecision_p5.h
TrigDec::TrigDecision
The TrigDecision is an object which merges trigger informations from various levels.
Definition: Trigger/TrigEvent/TrigDecisionEvent/TrigDecisionEvent/TrigDecision.h:61
TPAbstractPolyCnvBase::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
TrigDec::TrigDecisionCnv_p5
Definition: TrigDecisionCnv_p5.h:37
pool::Guid
::Guid Guid
Definition: T_AthenaPoolCustCnv.h:19
TrigDecisionCnv::createTransient
virtual TrigDec::TrigDecision * createTransient()
Definition: TrigDecisionCnv.cxx:36
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
T_AthenaPoolCustomCnv
Compatibility for old converter classes that don't get passed the key.
Definition: T_AthenaPoolCustomCnv.h:132
TrigDecisionCnv::TrigDecisionCnv
TrigDecisionCnv(ISvcLocator *svcloc)
Definition: TrigDecisionCnv.cxx:18
TrigDecision_p3.h
TrigDec::TrigDecision_p5
Definition: TrigDecision_p5.h:60
TrigDecision_p4.h
TrigDecisionCnv::~TrigDecisionCnv
~TrigDecisionCnv()
Definition: TrigDecisionCnv.cxx:21
TrigDecision_p2.h
TrigDec::TrigDecisionCnv_p4
Definition: TrigDecisionCnv_p4.h:37
TrigDecision_p1.h
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
TrigDecisionCnv_p1.h
T_AthenaPoolCustCnv::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
TrigDec::TrigDecisionCnv_p3
Definition: TrigDecisionCnv_p3.h:37
TrigDecisionCnv_p2.h
TrigDecisionCnv_p5.h
TrigDec::TrigDecisionCnv_p2
Definition: TrigDecisionCnv_p2.h:37
TrigDecisionCnv_p4.h