![]() |
ATLAS Offline Software
|
Used to calculate the rate for a group of RatesTrigger objects at L1 or the HLT. More...
#include <RatesGroup.h>
Public Member Functions | |
| RatesGroup (const std::string &name, IMessageSvc *msgSvc, const bool doHistograms=true, const bool doExtrapolation=true) | |
| Construct new RatesGroup to enumerate the combined union (OR) and intersection (AND) rate of a set of trigger at L1 or the HLT. More... | |
| virtual | ~RatesGroup () |
| RatesGroup (const RatesGroup &)=delete | |
| RatesGroup & | operator= (const RatesGroup &)=delete |
| void | addToGroup (const RatesTrigger *toAdd) |
| Add a trigger to this group. More... | |
| void | removeFromGroup (const RatesTrigger *toRemove) |
| Remove a trigger from this group. More... | |
| void | removeOtherL1 (const RatesTrigger *toKeep) |
| Remove from the groups mapping all triggers which have a dissimilar seed to the supplied trigger. More... | |
| void | execute (const WeightingValuesSummary_t &weights) |
| Perform group rates evaluation. More... | |
| void | setExpressGroup (const bool i) |
| Flag this group as the express group (modifies group trigger's prescales) More... | |
| void | setDoCachedWeights (const bool i) |
| Flag group to cache weights. More... | |
| void | setUseCachedWeights (const bool i) |
| Set to use cached weights from the Master group (need ptr to m_masterGroup) More... | |
| void | duplicateChildren (const RatesGroup *toDuplicate) |
| Copy in triggers from another group. More... | |
| double | getCachedWeight (const size_t l1Hash) const |
| Get cached weight from triggers seeding from a given L1 item. More... | |
| void | setUniqueTrigger (RatesTrigger *trigger) |
| Set trigger I am doing unique rates for. More... | |
| RatesTrigger * | getUniqueTrigger () |
| Get the trigger I am doing unique rates for. More... | |
| double | getUniqueWeight (const double ratesDenominator) const |
| Get the unique rate of a unique-rate group For a group being used to get a unique rate, we need to subtract the rate of this group of N-1 chains from the master group of N chains. More... | |
| const std::unordered_map< size_t, std::set< const RatesTrigger * > > & | getChildren () const |
| const std::string | printConfig () const |
| Prints the RatesGroup's configuration. More... | |
| const std::string | printRate (const double ratesDenominator) const |
| Prints the RatesGroup's rate. More... | |
| StatusCode | giveMuHist (const ServiceHandle< ITHistSvc > &svc, const std::string &name) |
| StatusCode | giveTrainHist (const ServiceHandle< ITHistSvc > &svc, const std::string &name) |
| StatusCode | giveDataHist (const ServiceHandle< ITHistSvc > &svc, const std::string &name) |
| void | clearTrainHist () |
| In some jobs we don't want to do the rates vs. More... | |
| TH1 * | getDataHist () |
| bool | doHistograms () const |
| If histogramming was enabled in this rates object. More... | |
| const std::string & | getExtrapolationFactorString (ExtrapStrat_t strat) const |
| double | getExtrapolationFactor (const WeightingValuesSummary_t &weights, const ExtrapStrat_t strat) const |
| void | setDataName (const std::string &newName) |
| void | setRateVsMuName (const std::string &newName) |
| void | setRateVsTrainName (const std::string &newName) |
| bool | msgLvl (const MSG::Level lvl) const |
| Test the output level. More... | |
| MsgStream & | msg () const |
| The standard message stream. More... | |
| MsgStream & | msg (const MSG::Level lvl) const |
| The standard message stream. More... | |
| void | setLevel (MSG::Level lvl) |
| Change the current logging level. More... | |
Static Public Member Functions | |
| static bool | isZero (double v) |
| static bool | isNotPositive (double v) |
Public Attributes | |
| double | m_rateAccumulatorOR |
| Numerator for the rate of the OR of all triggers. More... | |
| double | m_rateAccumulatorAND |
| Numerator for the rate of the AND of all triggers. More... | |
| double | m_rateAccumulatorOR2 |
| For stat error. More... | |
| double | m_rateAccumulatorAND2 |
| For stat error. More... | |
| bool | m_doCachedWeights |
| Used in the global rates group. More... | |
| std::unordered_map< size_t, double > | m_cachedWeights |
| Cached weight of the OR of all triggers except for the L1 seed-hash of the key here. More... | |
| bool | m_useCachedWeights |
| Efficiency. More... | |
| const ExtrapStrat_t | m_extrapolationStrategy |
| How this group is to scale with luminosity. More... | |
| const RatesGroup * | m_masterGroup |
| If not nullptr, then use the cached weights info in this master group object. More... | |
| RatesTrigger * | m_uniqueTrigger |
| If not nullptr, then a trigger this group is calculating the unique rate for. More... | |
| bool | m_isExpressGroup |
| If this group is calculating for the express stream - also include express prescales. More... | |
| std::unordered_map< size_t, std::set< const RatesTrigger * > > | m_children |
Protected Attributes | |
| bool | m_doHistograms |
| If histogramming is switched on. More... | |
| std::unique_ptr< TH1 > | m_rateVsMu |
| Histogram of rate as a fn. More... | |
| std::unique_ptr< TH1 > | m_rateVsTrain |
| Histogram of rate as a fn. More... | |
| std::unique_ptr< TH1 > | m_data |
| Histogram of raw rates quantites, for when we need to normalise offline (e.g. More... | |
| TH1 * | m_rateVsMuCachedPtr {} |
| Cached, non-owning pointer. More... | |
| TH1 * | m_rateVsTrainCachedPtr {} |
| Cached, non-owning pointer. More... | |
| TH1 * | m_dataCachedPtr {} |
| Cached, non-owning pointer. More... | |
Private Member Functions | |
| void | initMessaging () const |
| Initialize our message level and MessageSvc. More... | |
Private Attributes | |
| const std::string | m_name |
| Name of the group. More... | |
| const size_t | m_nameHash |
| Hash of the group's name. More... | |
| std::string | m_nm |
| Message source name. More... | |
| boost::thread_specific_ptr< MsgStream > | m_msg_tls |
| MsgStream instance (a std::cout like with print-out levels) More... | |
| std::atomic< IMessageSvc * > | m_imsg { nullptr } |
| MessageSvc pointer. More... | |
| std::atomic< MSG::Level > | m_lvl { MSG::NIL } |
| Current logging level. More... | |
| std::atomic_flag m_initialized | ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
| Messaging initialized (initMessaging) More... | |
Used to calculate the rate for a group of RatesTrigger objects at L1 or the HLT.
Definition at line 29 of file RatesGroup.h.
| RatesGroup::RatesGroup | ( | const std::string & | name, |
| IMessageSvc * | msgSvc, | ||
| const bool | doHistograms = true, |
||
| const bool | doExtrapolation = true |
||
| ) |
Construct new RatesGroup to enumerate the combined union (OR) and intersection (AND) rate of a set of trigger at L1 or the HLT.
| name | Name of the group |
| msgSvc | Reference to message service |
| prescale | Prescale to apply to the whole group |
| doHistograms | Flag to mint histograms or not |
| doExtrapolation | Flag to switch on or off extrapolation within the group |
Definition at line 16 of file RatesGroup.cxx.
|
virtual |
Definition at line 34 of file RatesGroup.cxx.
|
delete |
| void RatesGroup::addToGroup | ( | const RatesTrigger * | toAdd | ) |
Add a trigger to this group.
It will be stored in a set mapped to its L1 seed. 'All L1' items are mapped under an empty string.
| toAdd | Pointer to a trigger to add to this group. |
Definition at line 59 of file RatesGroup.cxx.
|
inherited |
In some jobs we don't want to do the rates vs.
position in train
Definition at line 76 of file RatesHistoBase.cxx.
|
inlineinherited |
If histogramming was enabled in this rates object.
Definition at line 99 of file RatesHistoBase.h.
| void RatesGroup::duplicateChildren | ( | const RatesGroup * | toDuplicate | ) |
| void RatesGroup::execute | ( | const WeightingValuesSummary_t & | weights | ) |
Perform group rates evaluation.
We force all HLT chains to only have a single L1 seed, however L1 items may seed many HLT chains. This allows for a factorising algorithm to be utilised. The union (OR) and intercept (AND) are calculated. If this is the master group (the "Main" group of HLT chains) then the sub-weights from all L1 seeds is cached If this is a chain's unique rate group then the cached info from the Main group is used to speed up the calculation Coherent prescales are taken into consideration.
| weights | Struct of all weighting data which may be required in the calculation |
Definition at line 82 of file RatesGroup.cxx.
| double RatesGroup::getCachedWeight | ( | const size_t | l1Hash | ) | const |
Get cached weight from triggers seeding from a given L1 item.
Definition at line 194 of file RatesGroup.cxx.
| const std::unordered_map< size_t, std::set< const RatesTrigger * > > & RatesGroup::getChildren | ( | ) | const |
Definition at line 200 of file RatesGroup.cxx.
|
inherited |
Definition at line 82 of file RatesHistoBase.cxx.
|
inherited |
Definition at line 96 of file RatesHistoBase.cxx.
|
inherited |
Definition at line 87 of file RatesHistoBase.cxx.
| RatesTrigger * RatesGroup::getUniqueTrigger | ( | ) |
| double RatesGroup::getUniqueWeight | ( | const double | ratesDenominator | ) | const |
Get the unique rate of a unique-rate group For a group being used to get a unique rate, we need to subtract the rate of this group of N-1 chains from the master group of N chains.
Definition at line 178 of file RatesGroup.cxx.
|
inherited |
Definition at line 66 of file RatesHistoBase.cxx.
|
inherited |
Definition at line 46 of file RatesHistoBase.cxx.
|
inherited |
Definition at line 56 of file RatesHistoBase.cxx.
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
|
inlinestaticinherited |
Definition at line 104 of file RatesHistoBase.h.
|
inlinestaticinherited |
Definition at line 103 of file RatesHistoBase.h.
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 164 of file AthMessaging.h.
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 179 of file AthMessaging.h.
|
inlineinherited |
Test the output level.
| lvl | The message level to test against |
| true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
|
delete |
| const std::string RatesGroup::printConfig | ( | ) | const |
Prints the RatesGroup's configuration.
Definition at line 36 of file RatesGroup.cxx.
Prints the RatesGroup's rate.
| ratesDenominator | The walltime for the run, needed to normalise from integrated weighted counts to a rate. |
Definition at line 48 of file RatesGroup.cxx.
| void RatesGroup::removeFromGroup | ( | const RatesTrigger * | toRemove | ) |
Remove a trigger from this group.
It will be removed from the set mapped to its L1 seed. 'All L1' items are mapped under an empty string.
| toAdd | Pointer to a trigger to be removed. |
Definition at line 67 of file RatesGroup.cxx.
| void RatesGroup::removeOtherL1 | ( | const RatesTrigger * | toKeep | ) |
Remove from the groups mapping all triggers which have a dissimilar seed to the supplied trigger.
The group will be left with exactly one set of triggers with a common L1 seed. This is used in unique rates groups which can use a lot of the calculations done by the master rates group
| toKeep | Pointer to a trigger. All other triggers which do not share toKeep's L1 seed will be removed. |
Definition at line 72 of file RatesGroup.cxx.
|
inherited |
Definition at line 92 of file RatesHistoBase.cxx.
| void RatesGroup::setDoCachedWeights | ( | const bool | i | ) |
Flag group to cache weights.
Called only on the Master group
Definition at line 186 of file RatesGroup.cxx.
| void RatesGroup::setExpressGroup | ( | const bool | i | ) |
Flag this group as the express group (modifies group trigger's prescales)
Definition at line 184 of file RatesGroup.cxx.
|
inherited |
Change the current logging level.
Use this rather than msg().setLevel() for proper operation with MT.
Definition at line 28 of file AthMessaging.cxx.
|
inherited |
Definition at line 93 of file RatesHistoBase.cxx.
|
inherited |
Definition at line 94 of file RatesHistoBase.cxx.
| void RatesGroup::setUniqueTrigger | ( | RatesTrigger * | trigger | ) |
| void RatesGroup::setUseCachedWeights | ( | const bool | i | ) |
Set to use cached weights from the Master group (need ptr to m_masterGroup)
Definition at line 188 of file RatesGroup.cxx.
|
mutableprivateinherited |
Messaging initialized (initMessaging)
Definition at line 141 of file AthMessaging.h.
| std::unordered_map<size_t, double> RatesGroup::m_cachedWeights |
Cached weight of the OR of all triggers except for the L1 seed-hash of the key here.
Definition at line 119 of file RatesGroup.h.
| std::unordered_map<size_t, std::set<const RatesTrigger*> > RatesGroup::m_children |
Definition at line 127 of file RatesGroup.h.
|
protectedinherited |
Histogram of raw rates quantites, for when we need to normalise offline (e.g.
grid processing)
Definition at line 115 of file RatesHistoBase.h.
|
protectedinherited |
Cached, non-owning pointer.
Definition at line 118 of file RatesHistoBase.h.
| bool RatesGroup::m_doCachedWeights |
Used in the global rates group.
Cache extra information for the benefit of the unique rate groups
Definition at line 118 of file RatesGroup.h.
|
protectedinherited |
If histogramming is switched on.
Definition at line 112 of file RatesHistoBase.h.
| const ExtrapStrat_t RatesGroup::m_extrapolationStrategy |
How this group is to scale with luminosity.
Currently supported are linear and none.
Definition at line 121 of file RatesGroup.h.
|
mutableprivateinherited |
MessageSvc pointer.
Definition at line 135 of file AthMessaging.h.
| bool RatesGroup::m_isExpressGroup |
If this group is calculating for the express stream - also include express prescales.
Definition at line 125 of file RatesGroup.h.
|
mutableprivateinherited |
Current logging level.
Definition at line 138 of file AthMessaging.h.
| const RatesGroup* RatesGroup::m_masterGroup |
If not nullptr, then use the cached weights info in this master group object.
Definition at line 122 of file RatesGroup.h.
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
|
private |
Name of the group.
Definition at line 110 of file RatesGroup.h.
|
private |
Hash of the group's name.
Definition at line 111 of file RatesGroup.h.
|
privateinherited |
Message source name.
Definition at line 129 of file AthMessaging.h.
| double RatesGroup::m_rateAccumulatorAND |
Numerator for the rate of the AND of all triggers.
Definition at line 114 of file RatesGroup.h.
| double RatesGroup::m_rateAccumulatorAND2 |
For stat error.
Definition at line 116 of file RatesGroup.h.
| double RatesGroup::m_rateAccumulatorOR |
Numerator for the rate of the OR of all triggers.
Definition at line 113 of file RatesGroup.h.
| double RatesGroup::m_rateAccumulatorOR2 |
For stat error.
Definition at line 115 of file RatesGroup.h.
|
protectedinherited |
|
protectedinherited |
Cached, non-owning pointer.
Definition at line 116 of file RatesHistoBase.h.
|
protectedinherited |
Histogram of rate as a fn.
of position in bunch train
Definition at line 114 of file RatesHistoBase.h.
|
protectedinherited |
Cached, non-owning pointer.
Definition at line 117 of file RatesHistoBase.h.
| RatesTrigger* RatesGroup::m_uniqueTrigger |
If not nullptr, then a trigger this group is calculating the unique rate for.
Needs non-const as fills a histo
Definition at line 123 of file RatesGroup.h.
| bool RatesGroup::m_useCachedWeights |
1.8.18