ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Event
xAOD
xAODTriggerAthenaPool
src
xAODEmTauRoIAuxContainerCnv_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$
6
7
// System include(s):
8
#include <stdexcept>
9
10
// Gaudi/Athena include(s):
11
#include "GaudiKernel/MsgStream.h"
12
13
// EDM include(s):
14
#include "
AthContainers/tools/copyAuxStoreThinned.h
"
15
#include "
xAODTrigger/versions/EmTauRoIContainer_v1.h
"
16
#include "
xAODTrigger/EmTauRoIContainer.h
"
17
18
// Local include(s):
19
#include "
xAODEmTauRoIAuxContainerCnv_v1.h
"
20
22
#define MSGLVL MSG::INFO
23
25
#define ATH_MSG( MSG ) \
26
do { \
27
if( log.level() <= MSGLVL ) { \
28
log << MSGLVL << MSG << endmsg; \
29
} \
30
} while( 0 )
31
32
xAODEmTauRoIAuxContainerCnv_v1::xAODEmTauRoIAuxContainerCnv_v1
()
33
{
34
}
35
36
void
xAODEmTauRoIAuxContainerCnv_v1::
37
persToTrans
(
const
xAOD::EmTauRoIAuxContainer_v1
* oldObj,
38
xAOD::EmTauRoIAuxContainer
* newObj,
39
MsgStream&
/*log*/
)
const
{
40
41
// Greet the user:
42
//ATH_MSG( "Converting xAOD::EmTauRoIAuxContainer_v1 to current version..." );
43
44
// Remove this line once the converter is "ready":
45
//ATH_MSG( "WARNING Converter is not complete yet!" );
46
47
// Clear the transient object:
48
newObj->
resize
( 0 );
49
50
SG::copyAuxStoreThinned
( *oldObj, *newObj,
nullptr
);
51
52
// Now a bit of jiggery-pokery to set threshold pattern
53
xAOD::EmTauRoIContainer
newInt;
54
for
(
size_t
i = 0; i < newObj->
size
(); ++i) {
55
newInt.
push_back
(
new
xAOD::EmTauRoI
() );
56
}
57
newInt.setStore( newObj);
58
59
for
(
size_t
i = 0; i < newObj->
size
(); ++i) {
60
if
(newInt[i]->roiType() ==
xAOD::EmTauRoI::CPRoIWord
) {
61
uint32_t pattern = newInt[i]->roiWord()&0xffff;
62
newInt[i]->setThrPattern(pattern);
63
}
64
}
65
66
return
;
67
}
68
72
void
xAODEmTauRoIAuxContainerCnv_v1::transToPers
(
const
xAOD::EmTauRoIAuxContainer
*,
73
xAOD::EmTauRoIAuxContainer_v1
*,
74
MsgStream& log )
const
{
75
76
log << MSG::ERROR
77
<<
"Somebody called xAODEmTauRoIAuxContainerCnv_v1::transToPers"
78
<<
endmsg
;
79
throw
std::runtime_error(
"Somebody called xAODEmTauRoIAuxContainerCnv_v1::"
80
"transToPers"
);
81
82
return
;
83
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
EmTauRoIContainer.h
EmTauRoIContainer_v1.h
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
xAODEmTauRoIAuxContainerCnv_v1::xAODEmTauRoIAuxContainerCnv_v1
xAODEmTauRoIAuxContainerCnv_v1()
Default constructor.
Definition
xAODEmTauRoIAuxContainerCnv_v1.cxx:32
xAODEmTauRoIAuxContainerCnv_v1::persToTrans
virtual void persToTrans(const xAOD::EmTauRoIAuxContainer_v1 *oldObj, xAOD::EmTauRoIAuxContainer *newObj, MsgStream &log) const override
Function converting from the old type to the current one.
Definition
xAODEmTauRoIAuxContainerCnv_v1.cxx:37
xAODEmTauRoIAuxContainerCnv_v1::transToPers
virtual void transToPers(const xAOD::EmTauRoIAuxContainer *, xAOD::EmTauRoIAuxContainer_v1 *, MsgStream &log) const override
Dummy function inherited from the base class.
Definition
xAODEmTauRoIAuxContainerCnv_v1.cxx:72
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::EmTauRoIAuxContainer_v1
Auxiliary store for the LVL1 em/tau RoI container.
Definition
EmTauRoIAuxContainer_v1.h:34
xAOD::EmTauRoI_v2::CPRoIWord
@ CPRoIWord
This is a Run 1 EM/Tau RoI word.
Definition
EmTauRoI_v2.h:46
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::EmTauRoIContainer
EmTauRoIContainer_v2 EmTauRoIContainer
Definition
EmTauRoIContainer.h:17
xAOD::EmTauRoIAuxContainer
EmTauRoIAuxContainer_v2 EmTauRoIAuxContainer
Definition
EmTauRoIAuxContainer.h:16
xAOD::EmTauRoI
EmTauRoI_v2 EmTauRoI
Definition
EmTauRoI.h:16
xAODEmTauRoIAuxContainerCnv_v1.h
Generated on
for ATLAS Offline Software by
1.17.0