ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetConditions
TRT_ConditionsData
TRT_ConditionsData
StrawT0MultChanContainer.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// @file StrawT0MultChanContainer.h
6
//
7
// @brief
8
// Class for storing/accessing trt t0 data with channels
9
//
10
// @author Wouter Hulsbergen <wouter.hulsbergen@cern.ch>
11
//
12
// $Id: StrawT0MultChanContainer.h,v 1.5 2007-06-13 11:10:44 hansenph Exp $
13
14
#ifndef TRTCONDITIONSDATA_STRAWT0MULTCHANCONTAINER_H
15
#define TRTCONDITIONSDATA_STRAWT0MULTCHANCONTAINER_H
16
17
#include "
TRT_ConditionsData/StrawT0Container.h
"
18
#include "
TRT_ConditionsData/MultChanContainer.h
"
19
#include "
AthenaKernel/CondCont.h
"
20
#include "
AthenaKernel/getMessageSvc.h
"
21
#include "GaudiKernel/MsgStream.h"
22
23
namespace
TRTCond
24
{
25
typedef
StrawT0ContainerTemplate<ExpandedIdentifier::LAYERWHEEL>
StrawT0LayerContainer
;
26
30
class
StrawT0MultChanContainer
:
public
MultChanContainer
<StrawT0ContainerTemplate<ExpandedIdentifier::LAYERWHEEL> >
31
{
32
public
:
34
typedef
StrawT0ContainerTemplate<ExpandedIdentifier::LAYERWHEEL>::FlatContainer
FlatContainer
;
35
37
StrawT0MultChanContainer
() {}
38
40
virtual
~StrawT0MultChanContainer
() {}
41
43
float
getT0
(
const
ExpandedIdentifier
&
id
)
const
{
44
ContainerWithValue
valwithcontainer =
getWithContainer
(
id
) ;
45
return
StrawT0Trait::isvalid
(*valwithcontainer.second) ? valwithcontainer.first->unpackT0( *valwithcontainer.second ) : 0 ;
46
}
47
49
float
getT0Err
(
const
ExpandedIdentifier
&
id
)
const
{
50
ContainerWithValue
valwithcontainer =
getWithContainer
(
id
) ;
51
return
StrawT0Trait::isvalid
(*valwithcontainer.second) ? valwithcontainer.first->unpackT0Err( *valwithcontainer.second ) : 0 ;
52
}
53
55
void
setT0
(
const
ExpandedIdentifier
&
id
,
float
t0
,
float
t0err) {
56
if
(
id
.level()==
ExpandedIdentifier::DETECTOR
) {
57
findContainer
(
id
)->
setT0
(
t0
,t0err) ;
58
}
else
if
(
id
.level()==
ExpandedIdentifier::BARRELEC
) {
59
MsgStream log(
Athena::getMessageSvc
(),
"StrawT0MultChanContainer"
);
60
log << MSG::WARNING <<
"Sorry: cannot store containers at BARREL_EC granularity"
<<
endmsg
;
61
}
else
{
62
findContainer
(
id
)->
setT0
(
id
,
t0
,t0err) ;
63
}
64
}
65
66
void
unpack
(
const
ExpandedIdentifier
&
id
,
const
StrawT0
& sd,
float
&
t0
,
float
& t0err)
const
{
67
const
StrawT0LayerContainer
* container =
getContainer
(
channelId
(
id
)) ;
68
if
(not container){
69
MsgStream log(
Athena::getMessageSvc
(),
"StrawT0MultChanContainer"
);
70
log << MSG::ERROR <<
"cannot find container channel"
<<
channelId
(
id
) <<
endmsg
;
71
}
else
{
72
container->unpack( sd,
t0
,t0err ) ;
73
}
74
}
75
77
void
setPackingLimits
(
float
t0min,
float
t0max,
float
t0errmin,
float
t0errmax) ;
78
80
static
const
char
*
classname
() {
return
"TRTCond::StrawT0MultChanContainer"
; }
81
} ;
82
83
inline
void
StrawT0MultChanContainer::setPackingLimits
(
float
t0min,
float
t0max,
float
t0errmin,
float
t0errmax)
84
{
85
CondMultChanCollection<StrawT0ContainerTemplate<ExpandedIdentifier::LAYERWHEEL>
>
::iterator
dauit ;
86
for
(dauit = this->
begin
() ; dauit != this->
end
(); ++dauit)
87
(*dauit)->setPackingLimits( t0min,t0max,t0errmin,t0errmax ) ;
88
}
89
}
90
91
92
CLASS_DEF
(
TRTCond::StrawT0MultChanContainer
,1178829403,1)
93
CONDCONT_DEF
(
TRTCond
::StrawT0MultChanContainer,182150756);
94
95
96
#endif
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
CondCont.h
Hold mappings of ranges to condition objects.
CONDCONT_DEF
#define CONDCONT_DEF(...)
Definition
CondCont.h:1413
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
t0
static Double_t t0
Definition
LArPhysWaveHECTool.cxx:38
MultChanContainer.h
CondMultChanCollection for storing TRT conditions data.
StrawT0Container.h
Class for storing/accessing trt t0 data.
CondMultChanCollection< StrawT0ContainerTemplate< ExpandedIdentifier::LAYERWHEEL > >::CondMultChanCollection
CondMultChanCollection()
Definition
CondMultChanCollection.h:119
TRTCond::MultChanContainer< StrawT0ContainerTemplate< ExpandedIdentifier::LAYERWHEEL > >::iterator
DataModel_detail::iterator< DataVector > iterator
Definition
DataVector.h:842
TRTCond::MultChanContainer< StrawT0ContainerTemplate< ExpandedIdentifier::LAYERWHEEL > >::end
const_iterator end() const noexcept
TRTCond::MultChanContainer< StrawT0ContainerTemplate< ExpandedIdentifier::LAYERWHEEL > >::begin
const_iterator begin() const noexcept
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< StrawT0ContainerTemplate< ExpandedIdentifier::LAYERWHEEL > >::MultChanContainer
MultChanContainer()
Definition
MultChanContainer.h:48
TRTCond::MultChanContainer< StrawT0ContainerTemplate< ExpandedIdentifier::LAYERWHEEL > >::findContainer
StrawT0ContainerTemplate< ExpandedIdentifier::LAYERWHEEL > * findContainer(const ExpandedIdentifier &id)
Definition
MultChanContainer.h:177
TRTCond::MultChanContainer< StrawT0ContainerTemplate< ExpandedIdentifier::LAYERWHEEL > >::getContainer
const StrawT0ContainerTemplate< ExpandedIdentifier::LAYERWHEEL > * getContainer(size_t chanid) const
Definition
MultChanContainer.h:215
TRTCond::MultChanContainer< StrawT0ContainerTemplate< ExpandedIdentifier::LAYERWHEEL > >::channelId
size_t channelId(const ExpandedIdentifier &x) const
Definition
MultChanContainer.h:152
TRTCond::MultChanContainer< StrawT0ContainerTemplate< ExpandedIdentifier::LAYERWHEEL > >::ContainerWithValue
std::pair< const StrawT0ContainerTemplate< ExpandedIdentifier::LAYERWHEEL > *, const typename StrawT0ContainerTemplate< ExpandedIdentifier::LAYERWHEEL >::value_type * > ContainerWithValue
Definition
MultChanContainer.h:83
TRTCond::MultChanContainer< StrawT0ContainerTemplate< ExpandedIdentifier::LAYERWHEEL > >::getWithContainer
ContainerWithValue getWithContainer(const ExpandedIdentifier &id) const
Definition
MultChanContainer.h:285
TRTCond::NestedContainerBase< NestingLevel, NestedContainer< NestingLevel+1, StrawT0, StrawT0Trait >, StrawT0, StrawT0Trait >::FlatContainer
std::vector< std::pair< ExpandedIdentifier, const StrawT0 * > > FlatContainer
Definition
NestedContainer.h:346
TRTCond::StrawT0ContainerTemplate
class for storing/accessing trt t0 data
Definition
StrawT0Container.h:45
TRTCond::StrawT0ContainerTemplate::setT0
void setT0(const ExpandedIdentifier &id, float t0, float t0err)
set t0
Definition
StrawT0Container.h:70
TRTCond::StrawT0MultChanContainer
A COOL Multichannel container for StrawT0 objects.
Definition
StrawT0MultChanContainer.h:31
TRTCond::StrawT0MultChanContainer::unpack
void unpack(const ExpandedIdentifier &id, const StrawT0 &sd, float &t0, float &t0err) const
public method to unpack a StrawT0 object
Definition
StrawT0MultChanContainer.h:66
TRTCond::StrawT0MultChanContainer::setT0
void setT0(const ExpandedIdentifier &id, float t0, float t0err)
set t0
Definition
StrawT0MultChanContainer.h:55
TRTCond::StrawT0MultChanContainer::StrawT0MultChanContainer
StrawT0MultChanContainer()
constructor
Definition
StrawT0MultChanContainer.h:37
TRTCond::StrawT0MultChanContainer::~StrawT0MultChanContainer
virtual ~StrawT0MultChanContainer()
destructor
Definition
StrawT0MultChanContainer.h:40
TRTCond::StrawT0MultChanContainer::setPackingLimits
void setPackingLimits(float t0min, float t0max, float t0errmin, float t0errmax)
change the packing limits. NOTE: this only works for channels that already exist!
Definition
StrawT0MultChanContainer.h:83
TRTCond::StrawT0MultChanContainer::classname
static const char * classname()
classname used to talk to iovservice
Definition
StrawT0MultChanContainer.h:80
TRTCond::StrawT0MultChanContainer::getT0
float getT0(const ExpandedIdentifier &id) const
access to unpacked t0
Definition
StrawT0MultChanContainer.h:43
TRTCond::StrawT0MultChanContainer::getT0Err
float getT0Err(const ExpandedIdentifier &id) const
access to unpacked t0 error
Definition
StrawT0MultChanContainer.h:49
TRTCond::StrawT0MultChanContainer::FlatContainer
StrawT0ContainerTemplate< ExpandedIdentifier::LAYERWHEEL >::FlatContainer FlatContainer
typedefs
Definition
StrawT0MultChanContainer.h:34
TRTCond::StrawT0Trait::isvalid
static bool isvalid(const StrawT0 &x)
Definition
StrawT0Container.h:33
TRTCond::StrawT0
class for t0 data for one straw
Definition
StrawT0.h:23
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::StrawT0LayerContainer
StrawT0ContainerTemplate< ExpandedIdentifier::LAYERWHEEL > StrawT0LayerContainer
Definition
StrawT0MultChanContainer.h:25
Generated on
for ATLAS Offline Software by
1.17.0