|  | ATLAS Offline Software
    | 
 
 
 
Go to the documentation of this file.
    5 #ifndef AthenaMonitoringKernel_HistogramFillerUtils_h 
    6 #define AthenaMonitoringKernel_HistogramFillerUtils_h 
   18 #include "THashList.h" 
   19 #include "TProfile2D.h" 
   29     auto noCut = [](size_t){ 
return true; };   
 
   39     template<Axis AXIS, 
typename H>
 
   41       if constexpr (AXIS==
Axis::X) 
return hist->GetXaxis();
 
   42       else if constexpr (AXIS==
Axis::Y) 
return hist->GetYaxis();
 
   43       else return hist->GetZaxis();
 
   55     template<Axis AXIS, 
typename H>
 
   57       if ( 
var->hasStringRepresentation() ) {
 
   58         const TAxis* 
axis = getAxis<AXIS>(
hist);
 
   59         const int binNumber = 
axis->FindFixBin( 
var->getString(
i).c_str() );
 
   60         return axis->GetBinCenter(binNumber);
 
   88     template<Axis AXIS, 
typename H>
 
   91       TAxis* 
a = getAxis<AXIS>(
hist);
 
  100         bool curcleanup = 
hist->TestBit(TObject::kMustCleanup);
 
  101         hist->ResetBit(TObject::kMustCleanup);
 
  103         hist->SetBit(TObject::kMustCleanup, curcleanup);
 
  114       if (not 
axis) 
return false;
 
  136       if ( not 
labels ) 
return false;
 
  148     template<
typename H, 
typename T, T... 
a, 
typename ...Vs>
 
  163     template<
typename H, 
typename W, 
typename M, 
typename ...Ms>
 
  167       if constexpr(std::is_same_v<M, Monitored::IMonitoredVariable>) {
 
  169         const size_t j = 
m1.size()==1 ? 0 : 
i;
 
  170         if (not 
m1.hasStringRepresentation())
 
  194     void doFill(TProfile2D*, 
W, 
size_t, 
const double&, 
const double&, 
const char* 
const&) {}
 
  196     void doFill(TProfile2D*, 
W, 
size_t, 
const char* 
const&, 
const char* 
const&, 
const char* 
const&) {}
 
  198     void doFill(TProfile2D*, 
W, 
size_t, 
const char* 
const&, 
const double&, 
const char* 
const&) {}
 
  200     void doFill(TProfile2D*, 
W, 
size_t, 
const double&, 
const char* 
const&, 
const char* 
const&) {}
 
  
OH histogram lock header file.
double getFillValue(const H *hist, const IMonitoredVariable *var, size_t i)
Return value for filling i'th entry of var into AXIS for hist.
constexpr std::array axis_name
Convert axis to ROOT-compatible character.
Scoped lock to be used for threaded histogram operations.
auto noCut
no cut for filling
void doFill(H *hist, W weight, size_t i, const M &m1, const Ms &... m)
Perform (arbitrary dimension) histogram fill with weight.
void rebinHistogram(H *hist, const double value)
Method that rebins a histogram.
constexpr auto getAxis(H *hist)
Helper to get corresponding TAxis selected by Monitored::Axis.
def TProfile(*args, **kwargs)
Generic monitoring tool for athena components.
auto noWeight
no weight for filling
static std::mutex & globalROOTMutex()
Axis
Helper type for histogram axis selection.
bool fillWillRebinHistogram(const TAxis *axis, T value)
Check if Fill would result in rebinning.
constexpr std::array axis_bit
bool shouldRebinHistogram(const TAxis *axis, const double value)
Method checks if histogram should be rebinned.