The Gaudi Framework  v38r1p1 (ae26267b)
Tuples::detail Namespace Reference

Classes

class  ErrorHandler
 
struct  to_
 
class  TupleObjImp
 

Typedefs

template<typename Iterator >
using const_ref_t = std::add_const_t< typename std::iterator_traits< Iterator >::reference >
 

Functions

template<class HANDLER1 , class HANDLER2 >
auto createTupleObj (HANDLER1 handler1, HANDLER2 handler2, const std::string &name, NTuple::Tuple *tuple, const CLID &clid=CLID_ColumnWiseTuple, const Tuples::Type type=Tuples::NTUPLE)
 Templated helper functions allow to avoid heavy semantics of dealing with explicit type of class TupleObjImp. More...
 
template<class OBJECT , class FUNCTION >
ErrorHandler< OBJECT, FUNCTION > make_handler (const OBJECT *object, FUNCTION function)
 Templated helper functions allow to avoid heavy semantics of dealing with explicit type of class ErrorHandler. More...
 

Variables

constexpr to_< float > to_float {}
 

Typedef Documentation

◆ const_ref_t

template<typename Iterator >
using Tuples::detail::const_ref_t = typedef std::add_const_t<typename std::iterator_traits<Iterator>::reference>

Definition at line 83 of file TupleObj.h.

Function Documentation

◆ createTupleObj()

template<class HANDLER1 , class HANDLER2 >
auto Tuples::detail::createTupleObj ( HANDLER1  handler1,
HANDLER2  handler2,
const std::string name,
NTuple::Tuple tuple,
const CLID clid = CLID_ColumnWiseTuple,
const Tuples::Type  type = Tuples::NTUPLE 
)

Templated helper functions allow to avoid heavy semantics of dealing with explicit type of class TupleObjImp.

void print_error ( const std::string& msg , StatusCode sc )
{ std::cout <<
"Error" << msg << " code " << sc.getCode() << std::endl ; }
void print_warning ( const std::string& msg , StatusCode sc )
{ std::cout <<
"Warning" << msg << " code " << sc.getCode() << std::endl ; }
NTuple::Tuple* tuple = ... ;
TupleObj* obj =
createTupleObj( print_errror ,
print_warning ,
" my tuple " , ntuple ) ;

Few concrete error handlers for dealing with classes, which supports member functions Error,Warning and Print ( e.g. class GaudiAlgorithm or class GaudiTool ) are provided

Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@i.nosp@m.tep..nosp@m.ru
Date
2004-1-24

Definition at line 143 of file TupleDetail.h.

144  {
145  return std::make_unique<TupleObjImp<HANDLER1, HANDLER2>>( handler1, handler2, name, tuple, clid, type );
146  }

◆ make_handler()

template<class OBJECT , class FUNCTION >
ErrorHandler<OBJECT, FUNCTION> Tuples::detail::make_handler ( const OBJECT object,
FUNCTION  function 
)

Templated helper functions allow to avoid heavy semantics of dealing with explicit type of class ErrorHandler.

const GaudiAlgorithm* algo = ... ;
// error handler using GaudiAlgorithm::Error member function
const GaudiTool* tool = .... ;
// error handler using GaudiTool::Print member function
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@i.nosp@m.tep..nosp@m.ru
Date
2004-1-24

Definition at line 198 of file TupleDetail.h.

198  {
199  return ErrorHandler( object, function );
200  }

Variable Documentation

◆ to_float

constexpr to_<float> Tuples::detail::to_float {}
constexpr

Definition at line 80 of file TupleObj.h.

std::string
STL class.
GaudiMP.FdsRegistry.msg
msg
Definition: FdsRegistry.py:19
Tuples::detail::make_handler
ErrorHandler< OBJECT, FUNCTION > make_handler(const OBJECT *object, FUNCTION function)
Templated helper functions allow to avoid heavy semantics of dealing with explicit type of class Erro...
Definition: TupleDetail.h:198
bug_34121.tool
tool
Definition: bug_34121.py:17
StatusCode
Definition: StatusCode.h:65
std::cout
GaudiAlgorithm
Definition: GaudiAlgorithm.h:104
GaudiCommon< AlgTool >::Print
StatusCode Print(std::string_view msg, const StatusCode st=StatusCode::SUCCESS, const MSG::Level lev=MSG::INFO) const
Print the message and return with the given StatusCode.
Definition: GaudiCommon.icpp:314
gaudirun.type
type
Definition: gaudirun.py:160
GaudiAlg.TupleUtils.ntuple
def ntuple
Definition: TupleUtils.py:160
ConditionsStallTest.name
name
Definition: ConditionsStallTest.py:76
std::endl
T endl(T... args)
NTuple::Tuple
Abstract base class which allows the user to interact with the actual N tuple implementation.
Definition: NTuple.h:387
Tuples::detail::createTupleObj
auto createTupleObj(HANDLER1 handler1, HANDLER2 handler2, const std::string &name, NTuple::Tuple *tuple, const CLID &clid=CLID_ColumnWiseTuple, const Tuples::Type type=Tuples::NTUPLE)
Templated helper functions allow to avoid heavy semantics of dealing with explicit type of class Tupl...
Definition: TupleDetail.h:143
StatusCode::getCode
code_t getCode() const
Retrieve value.
Definition: StatusCode.h:136
GaudiTool
Definition: GaudiTool.h:110
GaudiCommon< Algorithm >::Error
StatusCode Error(std::string_view msg, const StatusCode st=StatusCode::FAILURE, const size_t mx=10) const
Print the error message and return with the given StatusCode.
Definition: GaudiCommon.icpp:256