DD4hep - The AIDA detector description toolkit for high energy physics experiments
DD4hep  Rev:Unversioneddirectory
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ConditionsDependencyCollection.cpp
Go to the documentation of this file.
1 // $Id$
2 //==========================================================================
3 // AIDA Detector description implementation for LCD
4 //--------------------------------------------------------------------------
5 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
6 // All rights reserved.
7 //
8 // For the licensing terms see $DD4hepINSTALL/LICENSE.
9 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
10 //
11 // Author : M.Frank
12 //
13 //==========================================================================
14 
15 // Framework include files
16 #include "DD4hep/Printout.h"
17 #include "DD4hep/Primitives.h"
19 
20 using namespace DD4hep;
21 using namespace DD4hep::Conditions;
22 
25 {
26 }
27 
30  : dependencies(copy.dependencies)
31 {
32  for(Dependencies::iterator i=dependencies.begin(); i!=dependencies.end(); ++i)
33  (*i).second->addRef(), (*i).second.flag = 0;
34 }
35 
39 }
40 
44 }
45 
47 std::pair<ConditionsDependencyCollection::iterator,bool>
48 ConditionsDependencyCollection::insert(const Dependencies::value_type& entry) {
49  entry.second->addRef();
50  return dependencies.insert(entry);
51 }
52 
54 std::pair<ConditionsDependencyCollection::iterator,bool>
56  dep->addRef();
57  return dependencies.insert(std::make_pair(dep->key(),Holder(dep)));
58 }
void clear()
Clear the dependency container. Destroys the contained stuff.
std::pair< iterator, bool > insert(const Dependencies::value_type &entry)
Mini-container interface: insert element by key.
void copy(Alignment from, Alignment to)
Copy alignment object from source object.
Condition dependency definition.
key_type key() const
Access the dependency key.
void releaseObjects(M &m)
Definition: Primitives.h:344
ConditionDependency * addRef()
Add use count to the object.