ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Event
xAOD
xAODTrigRingerAthenaPool
src
xAODTrigRNNOutputAuxContainerCnv_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
// System include(s):
6
#include <stdexcept>
7
#include <vector>
8
9
// Gaudi/Athena include(s):
10
#include "GaudiKernel/MsgStream.h"
11
12
// EDM include(s):
13
#include "
AthContainers/tools/copyAuxStoreThinned.h
"
14
#include "
xAODTrigRinger/versions/TrigRNNOutputContainer_v1.h
"
15
#include "
xAODTrigRinger/TrigRNNOutputContainer.h
"
16
#include "
xAODTrigRinger/TrigRNNOutput.h
"
17
18
// Local include(s):
19
#include "
xAODTrigRNNOutputAuxContainerCnv_v1.h
"
20
22
#define MSGLVL MSG::DEBUG
23
25
#define ATH_MSG( MSG ) \
26
do { \
27
if( log.level() <= MSGLVL ) { \
28
log << MSGLVL << MSG << endmsg; \
29
} \
30
} while( 0 )
31
32
xAODTrigRNNOutputAuxContainerCnv_v1::xAODTrigRNNOutputAuxContainerCnv_v1
()
33
{
34
}
35
36
void
xAODTrigRNNOutputAuxContainerCnv_v1::
37
persToTrans
(
const
xAOD::TrigRNNOutputAuxContainer_v1
* oldObj,
38
xAOD::TrigRNNOutputAuxContainer
* newObj,
39
MsgStream& log )
const
{
40
41
// Greet the user:
42
ATH_MSG
(
"Converting xAOD::TrigRNNOutputAuxContainer_v1 to current version..."
);
43
44
// Clear the transient object:
45
newObj->
resize
(0);
46
SG::copyAuxStoreThinned
( *oldObj, *newObj,
nullptr
);
47
48
// Set up an interface container on top of the old object:
49
xAOD::TrigRNNOutputContainer_v1
oldInt;
50
for
(
size_t
i = 0; i < oldObj->
size
(); ++i ) {
51
oldInt.
push_back
(
new
xAOD::TrigRNNOutput_v1
() );
52
}
53
oldInt.setStore( oldObj );
54
55
// Set up an interface container on top of the new object:
56
xAOD::TrigRNNOutputContainer
newInt;
57
for
(
size_t
i = 0; i < newObj->
size
(); ++i) {
58
newInt.
push_back
(
new
xAOD::TrigRNNOutput
() );
59
}
60
newInt.setStore( newObj );
61
62
// Convert the objects one by one:
63
for
(
size_t
i = 0; i < oldInt.
size
(); ++i ) {
64
newInt[ i ]->setRnnDecision( oldInt[ i ]->decision() );
65
}
66
67
return
;
68
}
69
73
void
xAODTrigRNNOutputAuxContainerCnv_v1::
74
transToPers
(
const
xAOD::TrigRNNOutputAuxContainer
*,
75
xAOD::TrigRNNOutputAuxContainer_v1
*,
76
MsgStream& log )
const
{
77
78
log << MSG::ERROR
79
<<
"Somebody called xAODTrigRNNOutputAuxContainerCnv_v1::transToPers"
80
<<
endmsg
;
81
throw
std::runtime_error(
"Somebody called "
82
"xAODTrigRNNOutputAuxContainerCnv_v1::"
83
"transToPers"
);
84
85
return
;
86
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
ATH_MSG
#define ATH_MSG(lvl)
Definition
AthMsgStreamMacros.h:38
TrigRNNOutputContainer.h
TrigRNNOutput.h
TrigRNNOutputContainer_v1.h
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
xAODTrigRNNOutputAuxContainerCnv_v1::transToPers
virtual void transToPers(const xAOD::TrigRNNOutputAuxContainer *, xAOD::TrigRNNOutputAuxContainer_v1 *, MsgStream &log) const override
Dummy function inherited from the base class.
Definition
xAODTrigRNNOutputAuxContainerCnv_v1.cxx:74
xAODTrigRNNOutputAuxContainerCnv_v1::persToTrans
virtual void persToTrans(const xAOD::TrigRNNOutputAuxContainer_v1 *oldObj, xAOD::TrigRNNOutputAuxContainer *newObj, MsgStream &log) const override
Function converting from the old type to the current one.
Definition
xAODTrigRNNOutputAuxContainerCnv_v1.cxx:37
xAODTrigRNNOutputAuxContainerCnv_v1::xAODTrigRNNOutputAuxContainerCnv_v1
xAODTrigRNNOutputAuxContainerCnv_v1()
Default constructor.
Definition
xAODTrigRNNOutputAuxContainerCnv_v1.cxx:32
xAOD::AuxContainerBase::resize
virtual bool resize(size_t size) override
Resize the arrays to a given size.
Definition
AuxContainerBase.cxx:530
xAOD::AuxContainerBase::size
virtual size_t size() const override
Get the size of the container.
Definition
AuxContainerBase.cxx:455
xAOD::TrigRNNOutputAuxContainer_v1
This is a fixed implementation of the trigger TrigRNNOutput auxiliary store.
Definition
TrigRNNOutputAuxContainer_v1.h:30
xAOD::TrigRNNOutput_v1
Definition
TrigRNNOutput_v1.h:22
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::TrigRNNOutputContainer_v1
DataVector< TrigRNNOutput_v1 > TrigRNNOutputContainer_v1
Define the RingerRings container as a simple DataVector.
Definition
TrigRNNOutputContainer_v1.h:18
xAOD::TrigRNNOutput
TrigRNNOutput_v2 TrigRNNOutput
Define the latest version of the RingerRings class.
Definition
Event/xAOD/xAODTrigRinger/xAODTrigRinger/TrigRNNOutput.h:17
xAOD::TrigRNNOutputAuxContainer
TrigRNNOutputAuxContainer_v2 TrigRNNOutputAuxContainer
Define the latest version of the RingerRings class.
Definition
TrigRNNOutputAuxContainer.h:17
xAOD::TrigRNNOutputContainer
TrigRNNOutputContainer_v2 TrigRNNOutputContainer
Define the latest version of the TrigRNNOutputContainer class.
Definition
Event/xAOD/xAODTrigRinger/xAODTrigRinger/TrigRNNOutputContainer.h:17
xAODTrigRNNOutputAuxContainerCnv_v1.h
Generated on
for ATLAS Offline Software by
1.17.0