ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
HepMCWeightSvc::WeightInfo Struct Reference

Cached sets of weights. More...

Collaboration diagram for HepMCWeightSvc::WeightInfo:

Public Member Functions

void fillVec ()
 Initialize sorted vector from map. More...
 

Public Attributes

unsigned long m_chanNum = 0
 Channel number for this set of weights. More...
 
WeightMap m_weightNames
 Map of weight names. More...
 
std::vector< std::string > m_weightNameVec
 Sorted vector of weight names. More...
 

Detailed Description

Cached sets of weights.

We retain NWEIGHTS sets of weights. They are overwritten in a round-robin fashion if needed.

Definition at line 103 of file HepMCWeightSvc.h.

Member Function Documentation

◆ fillVec()

void HepMCWeightSvc::WeightInfo::fillVec ( )

Initialize sorted vector from map.

Definition at line 243 of file HepMCWeightSvc.cxx.

244 {
245  m_weightNameVec.clear();
246  using WPair = std::pair<std::string, unsigned long int>;
247  std::vector<WPair> sorted;
248  for(const auto& i : m_weightNames) {
249  sorted.emplace_back (i);
250  }
251  std::sort (sorted.begin(), sorted.end(),
252  [](const WPair& a, const WPair& b) {return a.second < b.second; });
253  for (auto& a: sorted) {
254  m_weightNameVec.emplace_back (std::move (a.first));
255  }
256 }

Member Data Documentation

◆ m_chanNum

unsigned long HepMCWeightSvc::WeightInfo::m_chanNum = 0

Channel number for this set of weights.

Definition at line 106 of file HepMCWeightSvc.h.

◆ m_weightNames

WeightMap HepMCWeightSvc::WeightInfo::m_weightNames

Map of weight names.

Definition at line 109 of file HepMCWeightSvc.h.

◆ m_weightNameVec

std::vector<std::string> HepMCWeightSvc::WeightInfo::m_weightNameVec

Sorted vector of weight names.

Definition at line 112 of file HepMCWeightSvc.h.


The documentation for this struct was generated from the following files:
lumiFormat.i
int i
Definition: lumiFormat.py:92
HepMCWeightSvc::WeightInfo::m_weightNameVec
std::vector< std::string > m_weightNameVec
Sorted vector of weight names.
Definition: HepMCWeightSvc.h:112
HepMCWeightSvc::WeightInfo::m_weightNames
WeightMap m_weightNames
Map of weight names.
Definition: HepMCWeightSvc.h:109
DerivationFramework::TriggerMatchingUtils::sorted
std::vector< typename T::value_type > sorted(T begin, T end)
Helper function to create a sorted vector from an unsorted one.
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
a
TList * a
Definition: liststreamerinfos.cxx:10
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623