ATLAS Offline Software
RtRelationContainer.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 namespace TRTCond
8 {
9 
11  {
12  // delete owned objects
13  clear() ;
14  }
15 
18  {
19  *this = rhs ;
20  }
21 
23  {
24  // this is a bit tricky since we own the contents. the following
25  // solution is not particularly efficient, , but the least amount
26  // of work for me.
27 
28  // first delete owned objects
29  clear() ;
30 
31  // now create a 'FlatContainer'
32  FlatContainer allentries;
33  rhs.getall(allentries) ;
34 
35  // store them one-by-one
36  for(const auto & allentrie : allentries)
37  set( allentrie.first, *(allentrie.second) ) ;
38 
39  return *this ;
40  }
41 
42 }
RtRelationContainer.h
Class for storing/accessing trt rtrelations.
TRTCond::RtRelationContainer::~RtRelationContainer
virtual ~RtRelationContainer()
destructor
Definition: RtRelationContainer.cxx:10
TRTCond::NestedContainerBase< NestingLevel, NestedContainer< NestingLevel+1, RtRelation *, RtRelationTrait >, RtRelation *, RtRelationTrait >::set
void set(const ExpandedIdentifier &id, const RtRelation * &t)
set a value.
Definition: NestedContainer.h:191
TRTCond::NestedContainerBase< NestingLevel, NestedContainer< NestingLevel+1, RtRelation *, RtRelationTrait >, RtRelation *, RtRelationTrait >::FlatContainer
std::vector< std::pair< ExpandedIdentifier, const RtRelation * * > > FlatContainer
fill vector with all entries in the container. needed to dump to Peter's flat file format
Definition: NestedContainer.h:346
TRTCond::RtRelation
Definition: RtRelation.h:27
TRTCond::NestedContainer
Definition: NestedContainer.h:373
TRTCond::RtRelationContainer::RtRelationContainer
RtRelationContainer()
default constructor
Definition: RtRelationContainer.h:32
TRTCond::NestedContainerPointerTrait
Definition: NestedContainer.h:389
TRTCond
Definition: BasicRtRelation.cxx:8
TRTCond::RtRelationContainer::operator=
RtRelationContainer & operator=(const RtRelationContainer &rhs)
assignment
Definition: RtRelationContainer.cxx:22
TRTCond::NestedContainerBase< NestingLevel, NestedContainer< NestingLevel+1, RtRelation *, RtRelationTrait >, RtRelation *, RtRelationTrait >::clear
void clear()
clear entire container
Definition: NestedContainer.h:238
TRTCond::NestedContainerBase::getall
void getall(FlatContainer &entries) const
Definition: NestedContainer.h:347
TRTCond::ExpandedIdentifier
Identifier for TRT detector elements in the conditions code.
Definition: InnerDetector/InDetConditions/TRT_ConditionsData/TRT_ConditionsData/ExpandedIdentifier.h:30
TRTCond::RtRelationContainer
Definition: RtRelationContainer.h:29