All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Private Attributes | List of all members
PlotCategory Class Reference

Public Types

using QualifyFunc_t = std::function< bool(EventInfo_t const &)>
 Type of test function. More...
 

Public Member Functions

 PlotCategory (std::string name, std::string descr={}, QualifyFunc_t &&test=[](EventInfo_t const &){return true;})
 Constructor from category name and test function. More...
 
std::string const & name () const
 Returns the name of the category. More...
 
std::string const & description () const
 Returns the description of the category. More...
 
bool test (EventInfo_t const &info) const
 Returns whether the event belong to this category. More...
 
 operator std::string () const
 
bool operator() (EventInfo_t const &info) const
 

Private Attributes

std::string fName
 
std::string fDescr
 
QualifyFunc_t fTest
 

Detailed Description

Definition at line 307 of file TriggerEfficiencyPlots_module.cc.

Member Typedef Documentation

using PlotCategory::QualifyFunc_t = std::function<bool(EventInfo_t const&)>

Type of test function.

Definition at line 312 of file TriggerEfficiencyPlots_module.cc.

Constructor & Destructor Documentation

PlotCategory::PlotCategory ( std::string  name,
std::string  descr = {},
QualifyFunc_t &&  test = [](EventInfo_t const&){ return true; } 
)
inline

Constructor from category name and test function.

Definition at line 316 of file TriggerEfficiencyPlots_module.cc.

317  {},
318  QualifyFunc_t&& test = [](EventInfo_t const&){ return true; }
319  )
320  : fName(std::move(name)), fDescr(std::move(descr)), fTest(std::move(test))
321  {}
Information about the event.
std::string const & name() const
Returns the name of the category.
bool test(EventInfo_t const &info) const
Returns whether the event belong to this category.
std::function< bool(EventInfo_t const &)> QualifyFunc_t
Type of test function.

Member Function Documentation

std::string const& PlotCategory::description ( ) const
inline

Returns the description of the category.

Definition at line 327 of file TriggerEfficiencyPlots_module.cc.

327 { return fDescr; }
std::string const& PlotCategory::name ( ) const
inline

Returns the name of the category.

Definition at line 324 of file TriggerEfficiencyPlots_module.cc.

324 { return fName; }
PlotCategory::operator std::string ( ) const
inline

Definition at line 332 of file TriggerEfficiencyPlots_module.cc.

332 { return name(); }
std::string const & name() const
Returns the name of the category.
bool PlotCategory::operator() ( EventInfo_t const &  info) const
inline

Definition at line 333 of file TriggerEfficiencyPlots_module.cc.

333 { return test(info); }
bool test(EventInfo_t const &info) const
Returns whether the event belong to this category.
bool PlotCategory::test ( EventInfo_t const &  info) const
inline

Returns whether the event belong to this category.

Definition at line 330 of file TriggerEfficiencyPlots_module.cc.

330 { return fTest(info); }

Member Data Documentation

std::string PlotCategory::fDescr
private

Definition at line 338 of file TriggerEfficiencyPlots_module.cc.

std::string PlotCategory::fName
private

Definition at line 337 of file TriggerEfficiencyPlots_module.cc.

QualifyFunc_t PlotCategory::fTest
private

Definition at line 339 of file TriggerEfficiencyPlots_module.cc.


The documentation for this class was generated from the following file: