ATLAS Offline Software
Loading...
Searching...
No Matches
TrigInDetTrackTruthMapCnv.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
8#include "TROOT.h"
9#include <iostream>
10
11//constructor
15
16//destructor
18
19
20//create persistent
22 ATH_MSG_DEBUG( "TrigInDetTrackTruthMapCnv::createPersistent" );
23
24 TrigInDetTrackTruthMap_PERS* persObj = m_trigInDetTrackTruthMapCnv_tlp4.createPersistent( transObj, msg() );
25
26 return persObj;
27}
28
29//create transient
31
32 ATH_MSG_DEBUG( "TrigInDetTrackTruthMapCnv::createTransient " );
33
34 const static pool::Guid tlp1_guid("08892FEB-5706-4938-9226-F45C0AA662E7");
35 const static pool::Guid tlp2_guid("02074F47-F290-4A48-B503-4DCAB4181B3D");
36 const static pool::Guid tlp3_guid("81BFA8A7-89A8-4072-B6E2-7124300CA9EB");
37 const static pool::Guid tlp4_guid("018E514D-5EAD-702A-83E3-46AFCFD24B68");
38 const static pool::Guid p0_guid("41581666-F06D-44AE-93B9-D7E912A27AA1");
39
40 TrigInDetTrackTruthMap *transObj = 0;
41
42
43 if( compareClassGuid(tlp4_guid) ) {
44
45 ATH_MSG_DEBUG( "TrigInDetTrackTruthMapCnv::reading tlp4 persistent object" );
47 transObj = m_trigInDetTrackTruthMapCnv_tlp4.createTransient( msg() );
48
49 }
50 else if( compareClassGuid(tlp3_guid) ) {
51
52 ATH_MSG_DEBUG( "TrigInDetTrackTruthMapCnv::reading tlp3 persistent object" );
54 transObj = m_trigInDetTrackTruthMapCnv_tlp3.createTransient( msg() );
55
56 }
57 else if( compareClassGuid(tlp2_guid) ) {
58
59 ATH_MSG_DEBUG( "TrigInDetTrackTruthMapCnv::reading tlp2 persistent object" );
61 transObj = m_trigInDetTrackTruthMapCnv_tlp2.createTransient( msg() );
62
63 }
64 else if( compareClassGuid(tlp1_guid) ) {
65 ATH_MSG_DEBUG( "TrigInDetTrackTruthMapCnv::reading tlp1 persistent object" );
66 TrigInDetTrackTruthMapCnv_tlp1 tlp1_Converter;
68 transObj = tlp1_Converter.createTransient( msg() );
69 }
70 else if( compareClassGuid(p0_guid) ) {
71
72 ATH_MSG_DEBUG( "TrigInDetTrackTruthMapCnv::reading p0 persistent object" );
73 // old version from before TP separation, just return it
75 }
76 else {
77 throw std::runtime_error("Unsupported persistent version of TrigInDetTrackTruthMap");
78 }
79
80 return transObj;
81}
82
83
84namespace {
85 // Helper to be able to call thread-unsafe code during initialize as we
86 // currently cannot mark Converter::initialize() as thread-unsafe.
87 StatusCode loadConverter ATLAS_NOT_THREAD_SAFE() {
88 gROOT->GetClass("TrigInDetTrackTruthMap_old");
91 return StatusCode::SUCCESS;
92 }
93}
94
96{
97 [[maybe_unused]] static const bool did_rootcnv = []{
98 StatusCode sc ATLAS_THREAD_SAFE = loadConverter();
99 return sc.isSuccess();
100 }();
102}
#define ATH_MSG_DEBUG(x)
static Double_t sc
Registry for Root converters.
TrigInDetTrackTruthMap_tlp4 TrigInDetTrackTruthMap_PERS
T_AthenaPoolCustomCnv< TrigInDetTrackTruthMap, TrigInDetTrackTruthMap_PERS > TrigInDetTrackTruthMapCnvBase
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
static TConverterRegistry * Instance()
Return a pointer to the global registry instance.
void AddConverter(TVirtualConverter *conv)
Add a new converter to the registry.
TRANS * createTransient(MsgStream &log)
Create transient representation of the persistent object known to this converter.
virtual TrigInDetTrackTruthMap_PERS * createPersistent(TrigInDetTrackTruthMap *transObj)
TrigInDetTrackTruthMapCnv_tlp2 m_trigInDetTrackTruthMapCnv_tlp2
TrigInDetTrackTruthMapCnv_tlp3 m_trigInDetTrackTruthMapCnv_tlp3
virtual StatusCode initialize()
Gaudi Service Interface method implementations:
virtual TrigInDetTrackTruthMap * createTransient()
TrigInDetTrackTruthMapCnv_tlp4 m_trigInDetTrackTruthMapCnv_tlp4
TrigInDetTrackTruthMapCnv(ISvcLocator *svcloc)