ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetConditions
TRT_ConditionsData
TRT_ConditionsData
StrawDxMultChanContainer.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
12
// $Id: StrawDxMultChanContainer.h,v 1.2 2007-06-13 11:10:43 hansenph Exp $
13
14
#ifndef TRTCONDITIONSDATA_STRAWDXMULTCHANCONTAINER_H
15
#define TRTCONDITIONSDATA_STRAWDXMULTCHANCONTAINER_H
16
17
#include "
TRT_ConditionsData/StrawDxContainer.h
"
18
#include "
TRT_ConditionsData/MultChanContainer.h
"
19
#include "
AthenaKernel/getMessageSvc.h
"
20
#include "GaudiKernel/MsgStream.h"
21
22
namespace
TRTCond
23
{
24
typedef
StrawDxContainerTemplate<ExpandedIdentifier::LAYERWHEEL>
StrawDxLayerContainer
;
25
28
class
StrawDxMultChanContainer
:
public
MultChanContainer
<StrawDxContainerTemplate<ExpandedIdentifier::LAYERWHEEL> >
29
{
30
public
:
32
typedef
StrawDxContainerTemplate<ExpandedIdentifier::LAYERWHEEL>::FlatContainer
FlatContainer
;
33
35
StrawDxMultChanContainer
() {}
36
38
virtual
~StrawDxMultChanContainer
() {}
39
41
float
getDx1
(
const
ExpandedIdentifier
&
id
)
const
{
42
ContainerWithValue
valwithcontainer =
getWithContainer
(
id
) ;
43
return
StrawDxTrait::isvalid
(*valwithcontainer.second) ? valwithcontainer.first->unpackDx1( *valwithcontainer.second ) : 0 ;
44
}
45
46
float
getDx2
(
const
ExpandedIdentifier
&
id
)
const
{
47
ContainerWithValue
valwithcontainer =
getWithContainer
(
id
) ;
48
return
StrawDxTrait::isvalid
(*valwithcontainer.second) ? valwithcontainer.first->unpackDx2( *valwithcontainer.second ) : 0 ;
49
}
50
52
float
getDxErr
(
const
ExpandedIdentifier
&
id
)
const
{
53
ContainerWithValue
valwithcontainer =
getWithContainer
(
id
) ;
54
return
StrawDxTrait::isvalid
(*valwithcontainer.second) ? valwithcontainer.first->unpackDxErr( *valwithcontainer.second ) : 0 ;
55
}
56
58
void
setDx
(
const
ExpandedIdentifier
&
id
,
float
dx1,
float
dx2,
float
dxerr) {
59
if
(
id
.level()==
ExpandedIdentifier::DETECTOR
) {
60
findContainer
(
id
)->
setDx
(dx1,dx2,dxerr) ;
61
}
else
if
(
id
.level()==
ExpandedIdentifier::BARRELEC
) {
62
MsgStream log(
Athena::getMessageSvc
(),
"StrawDxMultChanContainer"
);
63
log << MSG::WARNING <<
"Sorry: cannot store containers at BARREL_EC granularity"
<<
endmsg
;
64
}
else
{
65
findContainer
(
id
)->
setDx
(
id
, dx1, dx2, dxerr) ;
66
}
67
}
68
70
void
unpack
(
const
ExpandedIdentifier
&
id
,
float
& dx1 ,
float
& dx2,
float
& dxerr)
const
{
71
const
StrawDxLayerContainer
* container =
getContainer
(
channelId
(
id
)) ;
72
if
(container==
nullptr
) {
73
MsgStream log(
Athena::getMessageSvc
(),
"StrawDxMultChanContainer"
);
74
log << MSG::ERROR <<
"cannot find container channel "
<<
channelId
(
id
) <<
endmsg
;
75
}
else
{
76
dx1 = container->getDx1(
id
);
77
dx2 = container->getDx2(
id
);
78
dxerr = container->getDxErr(
id
);
79
}
80
}
81
83
static
const
char
*
classname
() {
return
"TRTCond::StrawDxMultChanContainer"
; }
84
} ;
85
86
}
87
88
CLASS_DEF
(
TRTCond::StrawDxMultChanContainer
,1162639324,1)
89
90
#endif
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition
Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:67
MultChanContainer.h
CondMultChanCollection for storing TRT conditions data.
StrawDxContainer.h
Class for storing/accessing trt endpoint corrections data.
TRTCond::ExpandedIdentifier
Identifier for TRT detector elements in the conditions code.
Definition
InnerDetector/InDetConditions/TRT_ConditionsData/TRT_ConditionsData/ExpandedIdentifier.h:30
TRTCond::ExpandedIdentifier::DETECTOR
@ DETECTOR
Definition
InnerDetector/InDetConditions/TRT_ConditionsData/TRT_ConditionsData/ExpandedIdentifier.h:37
TRTCond::ExpandedIdentifier::BARRELEC
@ BARRELEC
Definition
InnerDetector/InDetConditions/TRT_ConditionsData/TRT_ConditionsData/ExpandedIdentifier.h:37
TRTCond::MultChanContainer< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > >::MultChanContainer
MultChanContainer()
Definition
MultChanContainer.h:48
TRTCond::MultChanContainer< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > >::findContainer
StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > * findContainer(const ExpandedIdentifier &id)
Definition
MultChanContainer.h:177
TRTCond::MultChanContainer< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > >::getContainer
const StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > * getContainer(size_t chanid) const
Definition
MultChanContainer.h:215
TRTCond::MultChanContainer< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > >::channelId
size_t channelId(const ExpandedIdentifier &x) const
Definition
MultChanContainer.h:152
TRTCond::MultChanContainer< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > >::ContainerWithValue
std::pair< const StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > *, const typename StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >::value_type * > ContainerWithValue
Definition
MultChanContainer.h:83
TRTCond::MultChanContainer< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > >::getWithContainer
ContainerWithValue getWithContainer(const ExpandedIdentifier &id) const
Definition
MultChanContainer.h:285
TRTCond::NestedContainerBase< NestingLevel, NestedContainer< NestingLevel+1, StrawDx, StrawDxTrait >, StrawDx, StrawDxTrait >::FlatContainer
std::vector< std::pair< ExpandedIdentifier, const StrawDx * > > FlatContainer
Definition
NestedContainer.h:346
TRTCond::StrawDxContainerTemplate
Template class for storing/accessing trt endpoint correction data.
Definition
StrawDxContainer.h:48
TRTCond::StrawDxContainerTemplate::setDx
void setDx(const ExpandedIdentifier &id, float dx1, float dx2, float dxerr)
set dx
Definition
StrawDxContainer.h:76
TRTCond::StrawDxMultChanContainer
Multichannel container for StrawDx objects.
Definition
StrawDxMultChanContainer.h:29
TRTCond::StrawDxMultChanContainer::getDx2
float getDx2(const ExpandedIdentifier &id) const
access to unpacked dx far from electronics
Definition
StrawDxMultChanContainer.h:46
TRTCond::StrawDxMultChanContainer::unpack
void unpack(const ExpandedIdentifier &id, float &dx1, float &dx2, float &dxerr) const
method to unpack a StrawDx object
Definition
StrawDxMultChanContainer.h:70
TRTCond::StrawDxMultChanContainer::getDx1
float getDx1(const ExpandedIdentifier &id) const
access to unpacked dx near electronics
Definition
StrawDxMultChanContainer.h:41
TRTCond::StrawDxMultChanContainer::FlatContainer
StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >::FlatContainer FlatContainer
typedefs
Definition
StrawDxMultChanContainer.h:32
TRTCond::StrawDxMultChanContainer::~StrawDxMultChanContainer
virtual ~StrawDxMultChanContainer()
destructor
Definition
StrawDxMultChanContainer.h:38
TRTCond::StrawDxMultChanContainer::setDx
void setDx(const ExpandedIdentifier &id, float dx1, float dx2, float dxerr)
set dx
Definition
StrawDxMultChanContainer.h:58
TRTCond::StrawDxMultChanContainer::classname
static const char * classname()
classname used to talk to iovservice
Definition
StrawDxMultChanContainer.h:83
TRTCond::StrawDxMultChanContainer::StrawDxMultChanContainer
StrawDxMultChanContainer()
constructor
Definition
StrawDxMultChanContainer.h:35
TRTCond::StrawDxMultChanContainer::getDxErr
float getDxErr(const ExpandedIdentifier &id) const
access to unpacked dx error
Definition
StrawDxMultChanContainer.h:52
TRTCond::StrawDxTrait::isvalid
static bool isvalid(const StrawDx &x)
Definition
StrawDxContainer.h:35
getMessageSvc.h
singleton-like access to IMessageSvc via open function and helper
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition
getMessageSvc.cxx:20
TRTCond
Definition
BasicRtRelation.cxx:8
TRTCond::StrawDxLayerContainer
StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > StrawDxLayerContainer
Definition
StrawDxMultChanContainer.h:24
Generated on
for ATLAS Offline Software by
1.17.0