ATLAS Offline Software
Loading...
Searching...
No Matches
Monitored Namespace Reference

Generic monitoring tool for athena components. More...

Namespaces

namespace  detail

Classes

class  CumulativeHistogramFiller1D
 Filler for 1D histograms filled in cummulative mode. More...
class  Group
 Group of local monitoring quantities and retain correlation when filling histograms More...
struct  HistogramDef
 the internal class used to keep parsed Filler properties More...
struct  HistogramException
 Represents error occurred during accessing histograms objects. More...
class  HistogramFactory
 Bridge between ROOT framework and monitoring code. More...
class  HistogramFiller
 Base class for all histogram fillers. More...
class  HistogramFiller1D
 Filler for plain 1D histograms. More...
class  HistogramFiller2DGeneric
 Generic filler for 2D histogram. More...
class  HistogramFiller2DProfile
 Filler for profile 2D histogram. More...
class  HistogramFillerEfficiency
 Filler for TEfficiency graphs. More...
class  HistogramFillerFactory
 Factory of the histogram fillers. More...
class  HistogramFillerRebinableAxis
 Mixin class for rebinning of histogram axis. More...
class  HistogramFillerTree
 Filler for TTrees. More...
class  IHistogramProvider
 Interface of the source of ROOT objects for HistogramFillers. More...
class  IMonitoredVariable
class  LiveHistogramProvider
 Provides latest-N-lumiblock histograms to be filled. More...
class  LumiblockHistogramProvider
 Implementation of IHistogramProvider for lumi block based histograms. More...
class  ObjectsCollection
 Monitoring of object collections (internal) More...
class  ObjectsRefCollection
 Monitoring of object collection references (internal) More...
class  OfflineHistogramProvider
 Implementation of IHistogramProvider for offline histograms. More...
class  Scalar
 Declare a monitored scalar variable. More...
class  ScopedTimer
 Helper class to create a scoped timer. More...
class  StaticHistogramProvider
 Default implementation of IHistogramProvider interface. More...
class  Timer
 A monitored timer. More...
class  ValuesCollection
 Internal class not to be used by end user. More...
class  ValuesRefCollection
 Internal class not to be used by end user. More...
class  VecHistogramFiller1D

Typedefs

typedef HistogramFiller2DGeneric< TH2 > HistogramFiller2D
typedef HistogramFillerRebinableAxis< HistogramFiller2DProfile, Axis::XHistogramFiller2DProfileRebinable
 TProfile2D filler with rebinable x-axis.
typedef HistogramFiller2DGeneric< TProfile > HistogramFillerProfile
 TProfile filler.
typedef HistogramFillerRebinableAxis< HistogramFillerProfile, Axis::XHistogramFillerProfileRebinable
 TProfile filler with rebinable x-axis.
typedef HistogramFillerRebinableAxis< HistogramFiller1D, Axis::XHistogramFillerRebinable1D
 Rebinable 1D histogram.
typedef HistogramFillerRebinableAxis< HistogramFiller2D, Axis::XHistogramFillerRebinable2DX
 Rebinable 2D histogram (x-axis only)
typedef HistogramFillerRebinableAxis< HistogramFiller2D, Axis::YHistogramFillerRebinable2DY
 Rebinable 2D histogram (y-axis only)
typedef HistogramFillerRebinableAxis< HistogramFillerRebinable2DX, Axis::YHistogramFillerRebinable2D
 Rebinable 2D histogram (both axes)

Enumerations

enum  Axis { X = 0 , Y , Z }
 Helper type for histogram axis selection. More...

Functions

template<class T>
ValuesCollection< T > Collection (std::string name, const T &collection)
 Declare a monitored (double-convertible) collection.
template<class T>
ValuesCollection< T > Collection (std::string name, T const &&collection)
template<class T>
ValuesRefCollection< T > Collection (std::string name, const std::reference_wrapper< T > &collection)
 Declare a monitored (double-convertible) collection reference.
template<class T>
ValuesRefCollection< T > Collection (std::string name, const std::reference_wrapper< T > &&collection)
template<class T>
ObjectsCollection< T, double > Collection (std::string name, const T &collection, std::function< double(const typename ObjectsCollection< T, double >::const_value_type &)> accessor)
 Declare a monitored collection of objects via accessor function.
template<class T>
ObjectsCollection< T, double > Collection (std::string name, const T &&collection, std::function< double(const typename ObjectsCollection< T, double >::const_value_type &)> accessor)=delete
template<class T>
ObjectsCollection< T, std::string > Collection (std::string name, const T &collection, std::function< std::string(const typename ObjectsCollection< T, std::string >::const_value_type &)> accessor)
template<class T>
ObjectsCollection< T, std::string > Collection (std::string name, const T &&collection, std::function< std::string(const typename ObjectsCollection< T, std::string >::const_value_type &)> accessor)=delete
template<class T>
ObjectsRefCollection< T, double > Collection (std::string name, const std::reference_wrapper< T > &collection, std::function< double(const typename ObjectsRefCollection< T, double >::const_value_type &)> accessor)
 Declare a monitored reference to a collection of objects via accessor function.
template<class T>
ObjectsRefCollection< T, double > Collection (std::string name, const std::reference_wrapper< T > &&collection, std::function< double(const typename ObjectsRefCollection< T, double >::const_value_type &)> accessor)=delete
template<class T>
ObjectsRefCollection< T, std::string > Collection (std::string name, const std::reference_wrapper< T > &collection, std::function< std::string(const typename ObjectsRefCollection< T, std::string >::const_value_type &)> accessor)
template<class T>
ObjectsRefCollection< T, std::string > Collection (std::string name, const std::reference_wrapper< T > &&collection, std::function< std::string(const typename ObjectsRefCollection< T, std::string >::const_value_type &)> accessor)=delete
template<typename... T>
void fill (const ToolHandle< GenericMonitoringTool > &tool, T &&... variables)
template<typename V, typename std::enable_if_t< std::is_integral_v< V > > * = nullptr>
std::vector< V > buildToolMap (const ToolHandleArray< GenericMonitoringTool > &tools, const std::string &baseName, int nHist)
 Builds an array of indices (base case)
template<typename V, typename std::enable_if_t<!std::is_integral_v< V > > * = nullptr, typename... T>
std::vector< V > buildToolMap (const ToolHandleArray< GenericMonitoringTool > &tools, const std::string &baseName, int nHist, T... dimensions)
 Builds an N-dimensional array of indices (recursive)
template<typename V, typename std::enable_if_t< std::is_integral_v< V > > * = nullptr>
std::map< std::string, int > buildToolMap (const ToolHandleArray< GenericMonitoringTool > &tools, const std::string &baseName, const std::vector< std::string > &labels)
 Builds a map of indices (base case)
template<typename V, typename std::enable_if_t<!std::is_integral_v< V > > * = nullptr, typename... T>
std::map< std::string, V > buildToolMap (const ToolHandleArray< GenericMonitoringTool > &tools, const std::string &baseName, const std::vector< std::string > &labels, T... dimensions)
 Builds an N-dimensional map of indices (recursive)
void checkNamingConvention (std::string_view name)
std::ostream & operator<< (std::ostream &os, const std::reference_wrapper< Monitored::IMonitoredVariable > &rmv)
template<typename T>
void scalarFillerFunc (TBranch *branch, const IMonitoredVariable &var)
template<>
void scalarFillerFunc< std::string > (TBranch *branch, const IMonitoredVariable &var)
template<typename T>
void vectorFillerFunc (TBranch *branch, const IMonitoredVariable &var)
template<>
void vectorFillerFunc< std::string > (TBranch *branch, const IMonitoredVariable &var)
template<>
void scalarFillerFunc< std::string > (TBranch *branch, const IMonitoredVariable &var)
template<>
void vectorFillerFunc< std::string > (TBranch *branch, const IMonitoredVariable &var)

Detailed Description

Generic monitoring tool for athena components.

Namespace for the athenaMT monitoring infrastructure.

The tool can be used standalone or attached to an algorithm, tool or service. The variables to be monitored need to be exposed via the Monitored framework. The histograms to be created are configured via the Histograms list property and the format is defined via Monitored::HistogramDef.

Configuration from python should be done using GenericMonitoringTool.defineHistogram. For the list of supported histogram types see Monitored::HistogramFillerFactory.

See also
athenaMT monitoring infrastructure

Typedef Documentation

◆ HistogramFiller2D

◆ HistogramFiller2DProfileRebinable

◆ HistogramFillerProfile

TProfile filler.

Definition at line 17 of file HistogramFillerProfile.h.

◆ HistogramFillerProfileRebinable

TProfile filler with rebinable x-axis.

Definition at line 19 of file HistogramFillerProfile.h.

◆ HistogramFillerRebinable1D

◆ HistogramFillerRebinable2D

◆ HistogramFillerRebinable2DX

Rebinable 2D histogram (x-axis only)

Definition at line 83 of file HistogramFillerRebinable.h.

◆ HistogramFillerRebinable2DY

Rebinable 2D histogram (y-axis only)

Definition at line 85 of file HistogramFillerRebinable.h.

Enumeration Type Documentation

◆ Axis

Helper type for histogram axis selection.

Enumerator

Definition at line 24 of file HistogramFillerUtils.h.

Function Documentation

◆ buildToolMap() [1/4]

template<typename V, typename std::enable_if_t< std::is_integral_v< V > > * = nullptr>
std::map< std::string, int > Monitored::buildToolMap ( const ToolHandleArray< GenericMonitoringTool > & tools,
const std::string & baseName,
const std::vector< std::string > & labels )

Builds a map of indices (base case)

Definition at line 170 of file MonitoredGroup.h.

170 {
171 std::map<std::string,int> indexMap;
172 for ( const std::string& label : labels ) {
173 std::string groupName = baseName + "_" + label;
174 indexMap[label] = detail::findToolIndex(tools,groupName);
175 }
176 return indexMap;
177 }
std::string label(const std::string &format, int i)
Definition label.h:19
int findToolIndex(const ToolHandleArray< GenericMonitoringTool > &toolArray, const std::string &name)
Finds the index of an element in a tool handle array by its string name.

◆ buildToolMap() [2/4]

template<typename V, typename std::enable_if_t<!std::is_integral_v< V > > * = nullptr, typename... T>
std::map< std::string, V > Monitored::buildToolMap ( const ToolHandleArray< GenericMonitoringTool > & tools,
const std::string & baseName,
const std::vector< std::string > & labels,
T... dimensions )

Builds an N-dimensional map of indices (recursive)

Definition at line 181 of file MonitoredGroup.h.

181 {
182 std::map<std::string,V> indexMap;
183 for ( const std::string& label : labels ) {
184 std::string groupName = baseName + "_" + label;
185 indexMap[label] = buildToolMap<typename V::mapped_type>(tools,groupName,dimensions...);
186 }
187 return indexMap;
188 }
std::vector< V > buildToolMap(const ToolHandleArray< GenericMonitoringTool > &tools, const std::string &baseName, int nHist)
Builds an array of indices (base case)

◆ buildToolMap() [3/4]

template<typename V, typename std::enable_if_t< std::is_integral_v< V > > * = nullptr>
std::vector< V > Monitored::buildToolMap ( const ToolHandleArray< GenericMonitoringTool > & tools,
const std::string & baseName,
int nHist )

Builds an array of indices (base case)

Definition at line 148 of file MonitoredGroup.h.

148 {
149 std::vector<int> indexArray;
150 for ( int iHist=0; iHist<nHist; iHist++ ) {
151 std::string groupName = baseName + "_" + std::to_string(iHist);
152 indexArray.push_back(detail::findToolIndex(tools,groupName));
153 }
154 return indexArray;
155 }

◆ buildToolMap() [4/4]

template<typename V, typename std::enable_if_t<!std::is_integral_v< V > > * = nullptr, typename... T>
std::vector< V > Monitored::buildToolMap ( const ToolHandleArray< GenericMonitoringTool > & tools,
const std::string & baseName,
int nHist,
T... dimensions )

Builds an N-dimensional array of indices (recursive)

Definition at line 159 of file MonitoredGroup.h.

159 {
160 std::vector<V> indexArray;
161 for ( int iHist=0; iHist<nHist; iHist++ ) {
162 std::string groupName = baseName + "_" + std::to_string(iHist);
163 indexArray.push_back(buildToolMap<typename V::value_type>(tools,groupName,dimensions...));
164 }
165 return indexArray;
166 }

◆ checkNamingConvention()

void Monitored::checkNamingConvention ( std::string_view name)

Definition at line 10 of file MonitoredTimer.cxx.

10 {
11 // Enforce some naming convention for timers
12 if ( name.substr(0,5) != "TIME_") {
13 std::string error("Name of Timer \"");
14 error+= name;
15 error+= "\" needs to start with \"TIME_\"";
16 throw std::runtime_error(error);
17 }
18 }

◆ Collection() [1/12]

template<class T>
ValuesRefCollection< T > Monitored::Collection ( std::string name,
const std::reference_wrapper< T > && collection )
delete

◆ Collection() [2/12]

template<class T>
ObjectsRefCollection< T, double > Monitored::Collection ( std::string name,
const std::reference_wrapper< T > && collection,
std::function< double(const typename ObjectsRefCollection< T, double >::const_value_type &)> accessor )
delete

◆ Collection() [3/12]

template<class T>
ObjectsRefCollection< T, std::string > Monitored::Collection ( std::string name,
const std::reference_wrapper< T > && collection,
std::function< std::string(const typename ObjectsRefCollection< T, std::string >::const_value_type &)> accessor )
delete

◆ Collection() [4/12]

template<class T>
ValuesRefCollection< T > Monitored::Collection ( std::string name,
const std::reference_wrapper< T > & collection )

Declare a monitored (double-convertible) collection reference.

Template Parameters
TType of collection
Parameters
nameName of monitored quantity
collectionstd::reference_wrapper to collection to be monitored (e.g. STL container or array)

Examples:

Various types of collections can be monitored. STL containers:

std::vector<float> eta( {0.2, 0.1} );
std::vector<double> phi( {-1, 1} ) ;
auto vectorT = Monitored::Collection( "Eta", eta );
auto setT = Monitored::Collection( "Phi", phi );
auto group = Monitored::Group( monTool, vectorT, setT );

or more generally, any iterable container:

See also
Monitored::Scalar
Monitored::Group

Definition at line 61 of file MonitoredCollection.h.

61 {
62 return ValuesRefCollection<T>(std::move(name), collection);
63 }
Internal class not to be used by end user.

◆ Collection() [5/12]

template<class T>
ObjectsRefCollection< T, double > Monitored::Collection ( std::string name,
const std::reference_wrapper< T > & collection,
std::function< double(const typename ObjectsRefCollection< T, double >::const_value_type &)> accessor )

Declare a monitored reference to a collection of objects via accessor function.

Template Parameters
TType of collection
Parameters
nameName of monitored quantity
collectionstd::reference_wrapper to collection to be monitored (e.g. STL container or array)
accessorFunction taking an element and returning a double

Examples:

Collection of objects can be monitored provided via an accessor function:

std::vector<Track> tracks;
auto eta = Monitored::Collection( "Eta", tracks, &Track::eta );
auto phi = Monitored::Collection( "Phi", tracks, []( const Track& t ) { return t.phi(); } );
auto group = Monitored::Group( monTool, eta, phi ); // this is binding to histograms
tracks.emplace_back( 0.1, 0.9 );
tracks.emplace_back( 1.3, 1. );

A collection of strings can be used to fill labelled histograms:

auto countID = Monitored::Scalar<std::string>( "DetID", "SCT" );
std::vector<std::string> caloLabels( { "LAr", "LAr", "Tile" } );
auto countCalo = Monitored::Collection<std::vector<std::string>>( "DetCalo", caloLabels );
auto x = Monitored::Scalar("x", 1.2 );
std::vector<double> yvalues({0.2, 2.1, 1.3});
auto y = Monitored::Collection("y", yvalues );
{
// this will fill: (SCT,LAr) (SCT,LAr) (SCT,Tile)
Monitored::Group(monTool, countID, countCalo);
}
{
// this will fill: (LAr,0.2) (LAr,2.1) (Tile,1.3)
Monitored::Group(monTool, countCalo, y);
}
{
// this will fill: (LAr,1.2) (LAr,1.2) (Tile,1.2)
Monitored::Group(monTool, countCalo, x);
}

Use of accessor functions work the same way as for Monitored::Scalar:

struct StringInObject {
int layer;
std::string name;
const std::string& getName() const { return name; }
};
std::vector<StringInObject> testData({{0, "PIX"}, {1, "PIX"}, {3, "SCT"}, {1, "PIX"}});
auto name = Monitored::Collection("DetID", testData, [](const StringInObject& s)->const std::string &{ return s.getName(); }); // lambda as accessor
auto ignored1 = Monitored::Collection("ignored", testData, &StringInObject::getName ); // access via member function
auto ignored2 = Monitored::Collection("ignored", testData, [](const StringInObject& s){ return s.getName().c_str(); } ); // accessor returning const char* is supported
Monitored::Group(monTool, name);
See also
Monitored::Scalar
Monitored::Group

Definition at line 137 of file MonitoredCollection.h.

138 {
139 return ObjectsRefCollection<T, double>(std::move(name), collection, std::move(accessor));
140 }
Monitoring of object collection references (internal)

◆ Collection() [6/12]

template<class T>
ObjectsRefCollection< T, std::string > Monitored::Collection ( std::string name,
const std::reference_wrapper< T > & collection,
std::function< std::string(const typename ObjectsRefCollection< T, std::string >::const_value_type &)> accessor )

Definition at line 149 of file MonitoredCollection.h.

150 {
151 return ObjectsRefCollection<T, std::string>(std::move(name), collection, std::move(accessor));
152 }

◆ Collection() [7/12]

template<class T>
ObjectsCollection< T, double > Monitored::Collection ( std::string name,
const T && collection,
std::function< double(const typename ObjectsCollection< T, double >::const_value_type &)> accessor )
delete

◆ Collection() [8/12]

template<class T>
ObjectsCollection< T, std::string > Monitored::Collection ( std::string name,
const T && collection,
std::function< std::string(const typename ObjectsCollection< T, std::string >::const_value_type &)> accessor )
delete

◆ Collection() [9/12]

template<class T>
ValuesCollection< T > Monitored::Collection ( std::string name,
const T & collection )

Declare a monitored (double-convertible) collection.

Template Parameters
TType of collection
Parameters
nameName of monitored quantity
collectionCollection to be monitored (e.g. STL container or array)

Examples:

Various types of collections can be monitored. STL containers:

std::vector<float> eta( {0.2, 0.1} );
std::vector<double> phi( {-1, 1} ) ;
auto vectorT = Monitored::Collection( "Eta", eta );
auto setT = Monitored::Collection( "Phi", phi );
auto group = Monitored::Group( monTool, vectorT, setT );

or more generally, any iterable container:

See also
Monitored::Scalar
Monitored::Group

Definition at line 38 of file MonitoredCollection.h.

38 {
39 return ValuesCollection<T>(std::move(name), collection);
40 }
Internal class not to be used by end user.

◆ Collection() [10/12]

template<class T>
ObjectsCollection< T, double > Monitored::Collection ( std::string name,
const T & collection,
std::function< double(const typename ObjectsCollection< T, double >::const_value_type &)> accessor )

Declare a monitored collection of objects via accessor function.

Template Parameters
TType of collection
Parameters
nameName of monitored quantity
collectionCollection to be monitored (e.g. STL container or array)
accessorFunction taking an element and returning a double

Examples:

Collection of objects can be monitored provided via an accessor function:

std::vector<Track> tracks;
auto eta = Monitored::Collection( "Eta", tracks, &Track::eta );
auto phi = Monitored::Collection( "Phi", tracks, []( const Track& t ) { return t.phi(); } );
auto group = Monitored::Group( monTool, eta, phi ); // this is binding to histograms
tracks.emplace_back( 0.1, 0.9 );
tracks.emplace_back( 1.3, 1. );

A collection of strings can be used to fill labelled histograms:

auto countID = Monitored::Scalar<std::string>( "DetID", "SCT" );
std::vector<std::string> caloLabels( { "LAr", "LAr", "Tile" } );
auto countCalo = Monitored::Collection<std::vector<std::string>>( "DetCalo", caloLabels );
auto x = Monitored::Scalar("x", 1.2 );
std::vector<double> yvalues({0.2, 2.1, 1.3});
auto y = Monitored::Collection("y", yvalues );
{
// this will fill: (SCT,LAr) (SCT,LAr) (SCT,Tile)
Monitored::Group(monTool, countID, countCalo);
}
{
// this will fill: (LAr,0.2) (LAr,2.1) (Tile,1.3)
Monitored::Group(monTool, countCalo, y);
}
{
// this will fill: (LAr,1.2) (LAr,1.2) (Tile,1.2)
Monitored::Group(monTool, countCalo, x);
}

Use of accessor functions work the same way as for Monitored::Scalar:

struct StringInObject {
int layer;
std::string name;
const std::string& getName() const { return name; }
};
std::vector<StringInObject> testData({{0, "PIX"}, {1, "PIX"}, {3, "SCT"}, {1, "PIX"}});
auto name = Monitored::Collection("DetID", testData, [](const StringInObject& s)->const std::string &{ return s.getName(); }); // lambda as accessor
auto ignored1 = Monitored::Collection("ignored", testData, &StringInObject::getName ); // access via member function
auto ignored2 = Monitored::Collection("ignored", testData, [](const StringInObject& s){ return s.getName().c_str(); } ); // accessor returning const char* is supported
Monitored::Group(monTool, name);
See also
Monitored::Scalar
Monitored::Group

Definition at line 91 of file MonitoredCollection.h.

92 {
93 return ObjectsCollection<T, double>(std::move(name), collection, std::move(accessor));
94 }
Monitoring of object collections (internal)

◆ Collection() [11/12]

template<class T>
ObjectsCollection< T, std::string > Monitored::Collection ( std::string name,
const T & collection,
std::function< std::string(const typename ObjectsCollection< T, std::string >::const_value_type &)> accessor )

Definition at line 104 of file MonitoredCollection.h.

105 {
106 return ObjectsCollection<T, std::string>(std::move(name), collection, std::move(accessor));
107 }

◆ Collection() [12/12]

template<class T>
ValuesCollection< T > Monitored::Collection ( std::string name,
T const && collection )
delete

◆ fill()

template<typename... T>
void Monitored::fill ( const ToolHandle< GenericMonitoringTool > & tool,
T &&... variables )

Definition at line 128 of file MonitoredGroup.h.

128 {
129 if (!tool.empty()) {
130 tool->invokeFillers({std::forward<T>(variables)...});
131 }
132 }

◆ operator<<()

std::ostream & Monitored::operator<< ( std::ostream & os,
const std::reference_wrapper< Monitored::IMonitoredVariable > & rmv )

Definition at line 121 of file GenericMonitoringTool.cxx.

121 {
122 std::string s = rmv.get().name();
123 return os << s;
124 }

◆ scalarFillerFunc()

template<typename T>
void Monitored::scalarFillerFunc ( TBranch * branch,
const IMonitoredVariable & var )

Definition at line 163 of file HistogramFillerTree.h.

163 {
164 if (ATH_UNLIKELY(var.size() == 0)) {
165 MsgStream log(Athena::getMessageSvc(), "HistogramFillerTree");
166 log << MSG::WARNING << "Tree " << branch->GetTree()->GetName() << ": Empty value passed to scalar branch fill for"
167 << branch->GetName() << endmsg;
168 return;
169 }
170 T tofill = var.get(0);
171 T* ptr = &tofill;
172 branch->SetAddress(ptr);
173 branch->Fill();
174 }
#define endmsg
#define ATH_UNLIKELY(x)
IMessageSvc * getMessageSvc(bool quiet=false)

◆ scalarFillerFunc< std::string >() [1/2]

template<>
void Monitored::scalarFillerFunc< std::string > ( TBranch * branch,
const IMonitoredVariable & var )

Definition at line 178 of file HistogramFillerTree.h.

178 {
179 if (ATH_UNLIKELY(var.size() == 0)) {
180 MsgStream log(Athena::getMessageSvc(), "HistogramFillerTree");
181 log << MSG::WARNING << "Tree " << branch->GetTree()->GetName() << ": Empty value passed to scalar branch fill for"
182 << branch->GetName() << endmsg;
183 return;
184 }
185 std::string tofill{var.getString(0)};
186 branch->SetObject(&tofill);
187 //*static_cast<std::string*>(branch->GetObject()) = tofill;
188 branch->Fill();
189 }

◆ scalarFillerFunc< std::string >() [2/2]

template<>
void Monitored::scalarFillerFunc< std::string > ( TBranch * branch,
const IMonitoredVariable & var )

Definition at line 178 of file HistogramFillerTree.h.

178 {
179 if (ATH_UNLIKELY(var.size() == 0)) {
180 MsgStream log(Athena::getMessageSvc(), "HistogramFillerTree");
181 log << MSG::WARNING << "Tree " << branch->GetTree()->GetName() << ": Empty value passed to scalar branch fill for"
182 << branch->GetName() << endmsg;
183 return;
184 }
185 std::string tofill{var.getString(0)};
186 branch->SetObject(&tofill);
187 //*static_cast<std::string*>(branch->GetObject()) = tofill;
188 branch->Fill();
189 }

◆ vectorFillerFunc()

template<typename T>
void Monitored::vectorFillerFunc ( TBranch * branch,
const IMonitoredVariable & var )

Definition at line 192 of file HistogramFillerTree.h.

192 {
193 std::vector<T> tofill;
194 tofill.reserve(var.size());
195 for (size_t i = 0; i < var.size(); i++) {
196 tofill.push_back(var.get(i));
197 }
198 std::vector<T>* tofillptr = &tofill;
199 branch->SetAddress(&tofillptr);
200 branch->Fill();
201 }

◆ vectorFillerFunc< std::string >() [1/2]

template<>
void Monitored::vectorFillerFunc< std::string > ( TBranch * branch,
const IMonitoredVariable & var )

Definition at line 205 of file HistogramFillerTree.h.

205 {
206 std::vector<std::string> tofill;
207 tofill.reserve(var.size());
208 for (size_t i = 0; i < var.size(); i++) {
209 tofill.push_back(var.getString(i));
210 }
211 auto* tofillptr = &tofill;
212 branch->SetAddress(&tofillptr);
213 branch->Fill();
214 }

◆ vectorFillerFunc< std::string >() [2/2]

template<>
void Monitored::vectorFillerFunc< std::string > ( TBranch * branch,
const IMonitoredVariable & var )

Definition at line 205 of file HistogramFillerTree.h.

205 {
206 std::vector<std::string> tofill;
207 tofill.reserve(var.size());
208 for (size_t i = 0; i < var.size(); i++) {
209 tofill.push_back(var.getString(i));
210 }
211 auto* tofillptr = &tofill;
212 branch->SetAddress(&tofillptr);
213 branch->Fill();
214 }