Skip to content
Snippets Groups Projects

Draft: HepMC3 version in metadata

Closed Matthew Gignac requested to merge mgignac/athena:hepmc-version-metadata into master
1 file
+ 6
1
Compare changes
  • Side-by-side
  • Inline
@@ -70,8 +70,13 @@ HepMCWeightSvc::setWeightNames (const WeightMap& weightNames,
// Store as strings ... when read back in we use a gaudi parser to parse the list
myAttributes.extend("HepMCWeightNames","string");
myAttributes.extend("HepMCWeightSvcVersion","int");
#ifdef HEPMC3
myAttributes["HepMCWeightSvcVersion"].data<int>() = 3;
#else
myAttributes["HepMCWeightSvcVersion"].data<int>() = 2;
#endif
std::string stringToStore = Gaudi::Utils::toString( weightNames );
myAttributes["HepMCWeightNames"].data<std::string>() = stringToStore;
Loading