ATLAS Offline Software
ID3PD.icc
Go to the documentation of this file.
1 // This file's extension implies that it's C, but it's really -*- C++ -*-.
2 
3 /*
4  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // $Id$
8 /**
9  * @file D3PDMakerInterfaces/ID3PD.icc
10  * @author scott snyder <snyder@bnl.gov>
11  * @date Jul, 2009
12  * @brief Abstract interface for a D3PD tree.
13  */
14 
15 
16 namespace D3PD {
17 
18 
19 /**
20  * @brief Add a new piece of metadata to the tuple.
21  * @param key - The key for this object.
22  * Any existing object will be overwritten.
23  * @param obj - Pointer to the object to write.
24  *
25  * The interpretation of the @c key parameter is up to the concrete
26  * D3PD implementation. However, a key name with a trailing slash
27  * NAME/ indicates that all metadata items with this name should
28  * be grouped together in a collection called NAME (for example,
29  * in a Root directory with that name).
30  */
31 template <class T>
32 StatusCode ID3PD::addMetadata (const std::string& key, const T* obj)
33 {
34  return addMetadata (key, obj, typeid(T));
35 }
36 
37 
38 } // namespace D3PD