ATLAS Offline Software
Loading...
Searching...
No Matches
StrawDxContainer.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3*/
4
12// $Id: StrawDxContainer.h,v 1.4 2007-06-13 11:10:43 hansenph Exp $
13
14#ifndef TRT_CONDITIONSDATA_STRAWDXCONTAINER_H
15#define TRT_CONDITIONSDATA_STRAWDXCONTAINER_H
16
17#include <string>
20
24
25namespace TRTCond
26{
31 {
32 public:
33 static void erase( StrawDx& x) { initialize(x) ; }
34 static void copy( StrawDx& out, const StrawDx& in) { out = in ; }
35 static bool isvalid( const StrawDx& x ) { return x.isvalid() ; }
36 static void initialize( StrawDx& x) { x = initialvalue() ; }
37 static size_t footprint( const StrawDx& x) { return sizeof(x) ; }
38 static void print(const StrawDx& x) { x.print() ; }
39 static StrawDx initialvalue() { return StrawDx() ; }
40 static bool isequal(const StrawDx& x, const StrawDx& y) { return x==y ; }
41 } ;
42
43
46 template <int LEVEL>
47 class StrawDxContainerTemplate : public NestedContainer<LEVEL, StrawDx,StrawDxTrait>
48 {
49 private:
53 public:
56
59
61 float getDx1(const ExpandedIdentifier& id) const {
63 return StrawDxTrait::isvalid(sd) ? m_dxpacker.unpack(sd.packeddx1()) : 0 ;
64 }
65 float getDx2(const ExpandedIdentifier& id) const {
67 return StrawDxTrait::isvalid(sd) ? m_dxpacker.unpack(sd.packeddx2()) : 0 ;
68 }
69
70 float getDxErr(const ExpandedIdentifier& id) const {
72 return m_dxerrpacker.unpack(sd.packeddxerr());
73 }
74
76 void setDx(const ExpandedIdentifier& id, float dx1, float dx2, float dxerr) {
78 }
79
81 void setDx(float dx1, float dx2, float dxerr) {
83 }
84
86 void unpack(const StrawDx& sd, float& dx1 , float& dx2, float& dxerr) const {
87 dx1 = m_dxpacker.unpack(sd.packeddx1()) ;
88 dx2 = m_dxpacker.unpack(sd.packeddx2()) ;
89 dxerr = m_dxerrpacker.unpack(sd.packeddxerr()) ;
90 }
91
93 float unpackDx1( const StrawDx& sd ) const { return m_dxpacker.unpack(sd.packeddx1()); }
95 float unpackDx2( const StrawDx& sd ) const { return m_dxpacker.unpack(sd.packeddx2()); }
97 float unpackDxErr( const StrawDx& sd ) const { return m_dxerrpacker.unpack(sd.packeddxerr()); }
98
100 static const char* classname() { return "TRTCond::StrawDxContainer" ; }
101 } ;
102
103 // The typedef gives problems when generating the reflex dictionary
104 //typedef StrawDxContainerTemplate<ExpandedIdentifier::DETECTOR> StrawDxContainer ;
108 class StrawDxContainer : public StrawDxContainerTemplate<ExpandedIdentifier::DETECTOR>
109 {
110 } ;
111}
112
114CONDCONT_DEF(TRTCond::StrawDxContainer,1168594249);
115
116#endif
Hold mappings of ranges to condition objects.
#define CONDCONT_DEF(...)
Definition CondCont.h:1413
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
'Nested' template container for storing TRT conditions data.
TRT straw endpoint correction object.
#define y
#define x
Template class for packing data.
Nested container class, ie a base class at level l with daugthers at level l+1.
float unpackDx1(const StrawDx &sd) const
unpack dx near electronics
float getDx2(const ExpandedIdentifier &id) const
float getDxErr(const ExpandedIdentifier &id) const
access to unpacked dx error
static const char * classname()
classname used to talk to iovservice
void setDx(const ExpandedIdentifier &id, float dx1, float dx2, float dxerr)
set dx
float unpackDxErr(const StrawDx &sd) const
unpack dx near unterminated fixation
virtual ~StrawDxContainerTemplate()
destructor
float unpackDx2(const StrawDx &sd) const
unpack dx near unterminated fixation
void unpack(const StrawDx &sd, float &dx1, float &dx2, float &dxerr) const
public method to unpack a StrawDx object
void setDx(float dx1, float dx2, float dxerr)
set the top-level dx
float getDx1(const ExpandedIdentifier &id) const
access to unpacked dx
specialise to detector level
trait class to deal with StrawDx in NestedContainers
static void erase(StrawDx &x)
static StrawDx initialvalue()
static void copy(StrawDx &out, const StrawDx &in)
static bool isvalid(const StrawDx &x)
static void print(const StrawDx &x)
static void initialize(StrawDx &x)
static bool isequal(const StrawDx &x, const StrawDx &y)
static size_t footprint(const StrawDx &x)
Class for endpoint data for one straw.
Definition StrawDx.h:29
void initialize()