ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Event
xAOD
xAODJetAthenaPool
src
xAODJetTrigAuxContainerCnv_v1.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// $Id: xAODJetTrigAuxContainerCnv_v1.cxx 800408 2017-03-13 09:28:39Z sschramm $
6
#if !(defined(GENERATIONBASE) || defined(SIMULATIONBASE))
7
// System include(s):
8
#include <stdexcept>
9
10
// Gaudi/Athena include(s):
11
#include "GaudiKernel/MsgStream.h"
12
13
// Core EDM include(s):
14
#include "
AthContainers/tools/copyAuxStoreThinned.h
"
15
#include "
xAODJet/JetContainer.h
"
16
#include "
xAODJet/JetTrigAuxContainer.h
"
17
#include "
xAODJet/versions/JetTrigAuxContainer_v1.h
"
18
#include "AthLinks/ElementLink.h"
19
#include "
xAODBase/IParticleContainer.h
"
20
21
// Local include(s):
22
#include "
xAODJetTrigAuxContainerCnv_v1.h
"
23
24
#include <utility>
25
#include <algorithm>
26
28
#define MSGLVL MSG::VERBOSE
29
31
#define ATH_MSG( MSG ) \
32
do { \
33
if( log.level() <= MSGLVL ) { \
34
log << MSGLVL << MSG << endmsg; \
35
} \
36
} while( 0 )
37
38
xAODJetTrigAuxContainerCnv_v1::xAODJetTrigAuxContainerCnv_v1
()
39
{
40
}
41
42
void
xAODJetTrigAuxContainerCnv_v1::
43
persToTrans
(
const
xAOD::JetTrigAuxContainer_v1
* oldObj,
44
xAOD::JetTrigAuxContainer
* newObj,
45
MsgStream& log )
const
{
46
47
// Greet the user:
48
ATH_MSG
(
"Converting xAOD::JetTrigAuxContainer_v1 to current version..."
);
49
50
// Clear the transient object:
51
newObj->
resize
( 0 );
52
53
// Copy the payload of the v1 object into the latest one by misusing
54
// the thinning code a bit...
55
SG::copyAuxStoreThinned
( *oldObj, *newObj,
nullptr
);
56
57
//The old uses v_
58
xAOD::JetContainer
oldInt;
59
for
(
size_t
i = 0; i < oldObj->
size
(); ++i ) {
60
oldInt.
push_back
(
new
xAOD::Jet
() );
61
}
62
oldInt.setStore( oldObj );
63
64
xAOD::JetContainer
newInt;
65
for
(
size_t
i = 0; i < newObj->
size
(); ++i ) {
66
newInt.
push_back
(
new
xAOD::Jet
() );
67
}
68
newInt.setStore( newObj );
69
70
std::vector< std::vector< ElementLink< xAOD::IParticleContainer > > > GhostTrack;
71
72
// Print what happened:
73
ATH_MSG
(
"Converting xAOD::JetTrigAuxContainer_v1 to current version "
74
"[OK]"
);
75
76
return
;
77
}
78
82
void
xAODJetTrigAuxContainerCnv_v1::
83
transToPers
(
const
xAOD::JetTrigAuxContainer
*,
84
xAOD::JetTrigAuxContainer_v1
*,
85
MsgStream& log )
const
{
86
87
log << MSG::ERROR
88
<<
"Somebody called xAODJetTrigAuxContainerCnv_v1::transToPers"
89
<<
endmsg
;
90
throw
std::runtime_error(
"Somebody called xAODJetTrigAuxContainerCnv_v1::"
91
"transToPers"
);
92
93
return
;
94
}
95
#endif
//ifndef SIMULATIONBASE OR GNERATIONBASE
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:61
ATH_MSG
#define ATH_MSG(lvl)
Definition
AthMsgStreamMacros.h:38
JetContainer.h
JetTrigAuxContainer.h
JetTrigAuxContainer_v1.h
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
xAODJetTrigAuxContainerCnv_v1::transToPers
virtual void transToPers(const xAOD::JetTrigAuxContainer *, xAOD::JetTrigAuxContainer_v1 *, MsgStream &log) const override
Dummy function inherited from the base class.
Definition
xAODJetTrigAuxContainerCnv_v1.cxx:83
xAODJetTrigAuxContainerCnv_v1::xAODJetTrigAuxContainerCnv_v1
xAODJetTrigAuxContainerCnv_v1()
Default constructor.
Definition
xAODJetTrigAuxContainerCnv_v1.cxx:38
xAODJetTrigAuxContainerCnv_v1::persToTrans
virtual void persToTrans(const xAOD::JetTrigAuxContainer_v1 *oldObj, xAOD::JetTrigAuxContainer *newObj, MsgStream &log) const override
Function converting from the old type to the current one.
Definition
xAODJetTrigAuxContainerCnv_v1.cxx:43
xAOD::ByteStreamAuxContainer_v1::size
virtual size_t size() const override
Get the size of the container.
Definition
ByteStreamAuxContainer_v1.cxx:263
xAOD::ByteStreamAuxContainer_v1::resize
virtual bool resize(size_t size) override
Resize the arrays to a given size.
Definition
ByteStreamAuxContainer_v1.cxx:306
xAOD::JetTrigAuxContainer_v1
Temporary container used until we have I/O for AuxStoreInternal.
Definition
JetTrigAuxContainer_v1.h:36
copyAuxStoreThinned.h
Helper to copy an aux store while applying thinning.
SG::copyAuxStoreThinned
void copyAuxStoreThinned(const SG::IConstAuxStore &orig, SG::IAuxStore ©, const SG::ThinningInfo *info)
Helper to copy an aux store while applying thinning.
xAOD::Jet
Jet_v1 Jet
Definition of the current "jet version".
Definition
Event/xAOD/xAODJet/xAODJet/Jet.h:17
xAOD::JetTrigAuxContainer
JetTrigAuxContainer_v2 JetTrigAuxContainer
Definition of the current jet trigger auxiliary container.
Definition
JetTrigAuxContainer.h:21
xAOD::JetContainer
JetContainer_v1 JetContainer
Definition of the current "jet container version".
Definition
JetContainer.h:17
xAODJetTrigAuxContainerCnv_v1.h
IParticleContainer.h
Generated on
for ATLAS Offline Software by
1.17.0