LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
rootNames.h
Go to the documentation of this file.
1 #ifndef canvas_Persistency_Provenance_rootNames_h
2 #define canvas_Persistency_Provenance_rootNames_h
3 
6 #include "canvas/Persistency/Provenance/Compatibility/BranchIDList.h"
13 
14 #include <string>
15 #include <typeinfo>
16 
17 namespace art {
18  struct FileFormatVersion;
19  class History;
20 
21  namespace rootNames {
22 
23  //------------------------------------------------------------------
24  // Parentage Tree
25  std::string const& parentageTreeName();
26 
27  // Branches on parentage tree
28  std::string const& parentageIDBranchName();
29  std::string const& parentageBranchName();
30 
31  //------------------------------------------------------------------
32  // MetaData Tree (1 entry per file)
33  std::string const& metaDataTreeName();
34 
35  // FileIndex Tree
36  std::string const& fileIndexTreeName();
37 
38  // Event History Tree
39  std::string const& eventHistoryTreeName();
40 
41  // Branches on EventHistory Tree
42  std::string const& eventHistoryBranchName();
43 
44  //------------------------------------------------------------------
45  // Other tree names
46  std::string const& eventTreeName();
47  std::string const& dataTreeName(BranchType bt);
48  std::string const& eventMetaDataTreeName();
49 
50 #define ART_ROOTNAME(T, N) \
51  template <> \
52  inline char const* metaBranchRootName<T>() \
53  { \
54  return N; \
55  }
56 
57 #define ART_ROOTNAME_SIMPLE(T) ART_ROOTNAME(T, #T)
58 
59  template <typename T>
60  char const*
62  {
64  << "art::metaBranchRootName requires a specialization for type "
65  << TypeID(typeid(T)).className() << "\n";
66  }
67 
69  ART_ROOTNAME_SIMPLE(FileIndex) // supporting backwards compatibility
71  ART_ROOTNAME(ProductRegistry, "ProductRegistry")
74  ART_ROOTNAME_SIMPLE(BranchIDLists)
75  ART_ROOTNAME(BranchChildren, "ProductDependencies")
76  ART_ROOTNAME(History, "EventHistory")
77 
78 #undef ART_ROOTNAME_SIMPLE
79 #undef ART_ROOTNAME
80 
81  } // rootNames
82 }
83 #endif /* canvas_Persistency_Provenance_rootNames_h */
84 
85 // Local Variables:
86 // mode: c++
87 // End:
std::string const & dataTreeName(BranchType bt)
Definition: rootNames.cc:74
std::string const & parentageTreeName()
Definition: rootNames.cc:22
std::string const & eventHistoryTreeName()
Definition: rootNames.cc:55
std::map< ProcessHistoryID const, ProcessHistory > ProcessHistoryMap
std::string const & metaDataTreeName()
Definition: rootNames.cc:41
#define ART_ROOTNAME(T, N)
Definition: rootNames.h:50
char const * metaBranchRootName()
Definition: rootNames.h:61
std::string const & parentageBranchName()
Definition: rootNames.cc:34
std::string const & parentageIDBranchName()
Definition: rootNames.cc:28
std::string className() const
Definition: TypeID.cc:21
std::string const & eventMetaDataTreeName()
Definition: rootNames.cc:80
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
std::string const & fileIndexTreeName()
Definition: rootNames.cc:48
std::string const & eventHistoryBranchName()
Definition: rootNames.cc:62
BranchType
Definition: BranchType.h:18
HLT enums.
std::string const & eventTreeName()
Definition: rootNames.cc:68
std::map< fhicl::ParameterSetID, ParameterSetBlob > ParameterSetMap
#define ART_ROOTNAME_SIMPLE(T)
Definition: rootNames.h:57