Skip to content

Commit

Permalink
Add test for CMS fwd decl enumerator as template arg:
Browse files Browse the repository at this point in the history
  • Loading branch information
Axel-Naumann committed Mar 5, 2021
1 parent c665247 commit 568ae3a
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cling/dict/fwd-decl-enumconstant/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
ROOTTEST_GENERATE_REFLEX_DICTIONARY(fwdDeclEnumconstantDict
OPTIONS --fail_on_warnings
SELECTION selection.xml
classes.h
)

ROOTTEST_ADD_TEST(fwdDeclEnumconstant
MACRO execfwdDeclEnumconstant.C
DEPENDS fwdDeclEnumconstantDict-libgen-build
LABELS roottest regression cling)
12 changes: 12 additions & 0 deletions cling/dict/fwd-decl-enumconstant/Hash.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#ifndef DataFormats_Provenance_Hash_h
#define DataFormats_Provenance_Hash_h

namespace edm {

template <int I>
class Hash {
public:
};

} // namespace edm
#endif
18 changes: 18 additions & 0 deletions cling/dict/fwd-decl-enumconstant/HashedTypes.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#ifndef DataFormats_Provenance_HashedTypes_h
#define DataFormats_Provenance_HashedTypes_h

/// Declaration of the enum HashedTypes, used in defining several "id"
/// classes.

namespace edm {
enum HashedTypes {
ModuleDescriptionType, // Obsolete
ParameterSetType,
ProcessHistoryType,
ProcessConfigurationType,
EntryDescriptionType, // Obsolete
ParentageType
};
}

#endif // DataFormats_Provenance_HashedTypes_h
24 changes: 24 additions & 0 deletions cling/dict/fwd-decl-enumconstant/ParameterSetID.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#ifndef DataFormats_Provenance_ParameterSetID_h
#define DataFormats_Provenance_ParameterSetID_h

/*----------------------------------------------------------------------
ParameterSetID: A globally unique identifier for each collection of
tracked parameters. Two ParameterSet objects will have equal
ParameterSetIDs if they contain the same set of tracked parameters.
We calculate the ParameterSetID from the names and values of the
tracked parameters within a ParameterSet, currently using the MD5
algorithm.
----------------------------------------------------------------------*/

#include "Hash.h"
#include "HashedTypes.h"

namespace edm {
typedef Hash<ParameterSetType> ParameterSetID;

}
#endif
1 change: 1 addition & 0 deletions cling/dict/fwd-decl-enumconstant/classes.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "ParameterSetID.h"
3 changes: 3 additions & 0 deletions cling/dict/fwd-decl-enumconstant/execfwdDeclEnumconstant.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
int execfwdDeclEnumconstant() {
return gSystem->Load("libfwdDeclEnumconstantDict_dictrflx");
}
3 changes: 3 additions & 0 deletions cling/dict/fwd-decl-enumconstant/selection.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<lcgdict>
<class name="edm::ParameterSetID"/>
</lcgdict>

0 comments on commit 568ae3a

Please sign in to comment.