ATLAS Offline Software
StrawStatusContainer.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 StrawStatusContainer.h
6 //
7 // @brief
8 // Class for storing/accessing trt straw status data
9 //
10 // @author Esben Klinkby <klinkby@nbi.dk>
11 //
12 //
13 
14 #ifndef TRT_CONDITIONSDATA_STRAWSTATUSCONTAINER_H
15 #define TRT_CONDITIONSDATA_STRAWSTATUSCONTAINER_H
16 
17 #include <string>
18 #include "AthenaKernel/CLASS_DEF.h"
21 
22 
23 namespace TRTCond
24 {
25 
27 
29  {
30  public:
31  static void erase( StrawStatus& x) { x.setstatus(StrawStatus::Undefined) ; }
32  static void copy( StrawStatus& out, const StrawStatus& in) { out = in ; }
33  static StrawStatus initialvalue() { return StrawStatus() ; }
34 
35  static bool isvalid( const StrawStatus& x ) { return x.getstatus()!=StrawStatus::Undefined ;}
36  static size_t footprint( const StrawStatus& x) { return sizeof(x) ; }
37  static void print(const StrawStatus& x) { x.print() ; }
38  static bool isequal(const StrawStatus& x, const StrawStatus& y) { return x==y ; }
39  };
40 
41 
42  template <int LEVEL>
43  class StrawStatusContainerTemplate : public NestedContainer<LEVEL, StrawStatus,DeadStrawTrait>
44  {
45  private:
46 
47  public:
50 
53 
55  void setStatus(const ExpandedIdentifier& id, unsigned int status) {
57  // what is called here...?
58  }
59 
60  };
61  class StrawStatusContainer : public StrawStatusContainerTemplate<ExpandedIdentifier::DETECTOR>
62  {
63  } ;
64 }
65 
66 CLASS_DEF(TRTCond::StrawStatusContainer,1222305359,1) //correct
67 
68 #endif
TRTCond::StrawStatusContainerTemplate::StrawStatusContainerTemplate
StrawStatusContainerTemplate()
constructor
Definition: StrawStatusContainer.h:49
TRTCond::StrawStatusContainerTemplate
Definition: StrawStatusContainer.h:44
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
TRTCond::NestedContainerBase< NestingLevel, NestedContainer< NestingLevel+1, T, Trait >, T, Trait >::set
void set(const ExpandedIdentifier &id, const T &t)
set a value.
Definition: NestedContainer.h:191
x
#define x
TRTCond::NestedContainer
Definition: NestedContainer.h:373
TRTCond::StrawStatusContainerTemplate::setStatus
void setStatus(const ExpandedIdentifier &id, unsigned int status)
set status
Definition: StrawStatusContainer.h:55
TRTCond::StrawStatus::Undefined
@ Undefined
Definition: StrawStatus.h:18
TRTCond::DeadStrawTrait::isequal
static bool isequal(const StrawStatus &x, const StrawStatus &y)
Definition: StrawStatusContainer.h:38
TRTCond::DeadStrawTrait::copy
static void copy(StrawStatus &out, const StrawStatus &in)
Definition: StrawStatusContainer.h:32
TRTCond::DeadStrawTrait::initialvalue
static StrawStatus initialvalue()
Definition: StrawStatusContainer.h:33
StrawStatus.h
TRTCond::DeadStrawTrait
trait class to deal with StrawStatus in NestedContainers
Definition: StrawStatusContainer.h:29
TRTCond::DeadStrawTrait::erase
static void erase(StrawStatus &x)
Definition: StrawStatusContainer.h:31
TRTCond::StrawStatus
Definition: StrawStatus.h:13
TRTCond
Definition: BasicRtRelation.cxx:8
TRTCond::DeadStrawTrait::print
static void print(const StrawStatus &x)
Definition: StrawStatusContainer.h:37
NestedContainer.h
'Nested' template container for storing TRT conditions data.
y
#define y
TRTCond::DeadStrawTrait::isvalid
static bool isvalid(const StrawStatus &x)
Definition: StrawStatusContainer.h:35
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:64
TRTCond::StrawStatusContainer
Definition: StrawStatusContainer.h:62
merge.status
status
Definition: merge.py:17
TRTCond::DeadStrawTrait::footprint
static size_t footprint(const StrawStatus &x)
Definition: StrawStatusContainer.h:36
TRTCond::StrawStatusContainerTemplate::~StrawStatusContainerTemplate
virtual ~StrawStatusContainerTemplate()
destructor
Definition: StrawStatusContainer.h:52
TRTCond::ExpandedIdentifier
Identifier for TRT detector elements in the conditions code.
Definition: InnerDetector/InDetConditions/TRT_ConditionsData/TRT_ConditionsData/ExpandedIdentifier.h:30
CLASS_DEF.h
macros to associate a CLID to a type