| The Gaudi Framework v30r0 (c919700c)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Namespace List
- Namespace Members

Namespaces | Classes | Typedefs | Functions | Variables
Gaudi::Functional Namespace Reference

## Namespaces
| details
| Traits

## Classes
class | Consumer
class | Consumer< void(const In &...), Traits_ >
class | FilterPredicate
class | FilterPredicate< bool(const In &...), Traits_ >
class | MergingTransformer
class | MultiScalarTransformer
class | MultiScalarTransformer< ScalarOp, std::tuple< Out... >(const In &...), Traits_ >
class | MultiTransformer
class | MultiTransformer< std::tuple< Out... >(const In &...), Traits_ >
class | MultiTransformerFilter
class | MultiTransformerFilter< std::tuple< Out... >(const In &...), Traits_ >
class | Producer
class | ScalarTransformer
class | ScalarTransformer< ScalarOp, Out(const In &...), Traits_ >
class | SplittingTransformer
class | SplittingTransformer< vector_of_< Out >(const In &...), Traits_ >
class | Transformer
class | Transformer< Out(const In &...), Traits_ >

## Typedefs
template<typename Container >
using | vector_of_ = details::template vector_of_const_< Container >
using | KeyValue = std::pair< std::string, std::string >
using | KeyValues = std::pair< std::string, std::vector< std::string >>
template<typename T >
using | InputHandle_t = details::InputHandle_t< Traits_, typename std::remove_pointer< T >::type >
template<typename Container >
using | vector_of_optional_ = std::vector< boost::optional< Container >>

## Functions
std::string | concat_alternatives (std::initializer_list< std::string > c)
template<typename... Strings>
std::string | concat_alternatives (const Strings &...s)
void | updateHandleLocation (IProperty &parent, const std::string &prop, const std::string &newLoc)
void | updateHandleLocations (IProperty &parent, const std::string &prop, const std::vector< std::string > &newLocs)
void | updateReadHandleLocation (IProperty &parent, const std::string &prop, const std::string &newLoc)
| MergingTransformer (const std::string &name, ISvcLocator *locator, const KeyValues &inputs, const KeyValue &output)
StatusCode | execute () override final
virtual Out | operator() (const vector_of_const_< In > &inputs) const =0

## Variables
template<typename Signature , typename Traits_ = Traits::useDefaults>
struct[[deprecated("use MergingTransformer instead")]] | ListTransformer
template<typename Signature , typename Traits_ = Traits::useDefaults>
struct[[deprecated("use MergingTransformer instead")]] | Traits_
template<typename Out , typename In , typename Traits_ >
class MergingTransformer< Out(const vector_of_const_< In > | void
std::vector< std::string > | m_inputLocations
std::vector< InputHandle_t< In > > | m_inputs

## Typedef Documentation

template<typename T >

using Gaudi::Functional::InputHandle_t = typedef details::InputHandle_t<Traits_, typename std::remove_pointer<T>::type>
| private

Definition at line 43 of file MergingTransformer.h.

using Gaudi::Functional::KeyValue = typedef std::pair<std::string, std::string>

Definition at line 29 of file MergingTransformer.h.

using Gaudi::Functional::KeyValues = typedef std::pair<std::string, std::vector<std::string>>

Definition at line 30 of file MergingTransformer.h.

template<typename Container >

using Gaudi::Functional::vector_of_ = typedef std::vector<Container>

Definition at line 11 of file ListTransformer.h.

template<typename Container >

using Gaudi::Functional::vector_of_optional_ = typedef std::vector<boost::optional<Container>>

Definition at line 22 of file SplittingTransformer.h.

## Function Documentation

std::string Gaudi::Functional::concat_alternatives | ( | std::initializer_list< std::string > | c | ) |
| inline

Definition at line 21 of file FunctionalUtilities.h.

22 {
23 return boost::algorithm::join( c, ":" );
24 }
template<typename... Strings>

std::string Gaudi::Functional::concat_alternatives | ( | const Strings &... | s | ) |

Definition at line 27 of file FunctionalUtilities.h.

28 {
29 return concat_alternatives( std::initializer_list<std::string>{s...} );
30 }
gaudirun.s
string s
Definition: gaudirun.py:253
Gaudi::Functional::concat_alternatives
std::string concat_alternatives(const Strings &...s)
Definition: FunctionalUtilities.h:27
std::initializer_list

StatusCode Gaudi::Functional::execute | ( |  | ) |
| final override

Gaudi::Functional::MergingTransformer< Out, In, Traits_ >::MergingTransformer | ( | const std::string & | name,
|  | ISvcLocator * | locator,
|  | const KeyValues & | inputs,
|  | const KeyValue & | output
| ) |  |

Definition at line 49 of file MergingTransformer.h.

53 : base_class( name, pSvcLocator, output ), m_inputLocations( inputs.second )
54 {
55 // TODO/FIXME: replace vector of string property + call-back with a
56 // vector<handle> property ... as soon as declareProperty can deal with that.
57 auto p = this->declareProperty( inputs.first, m_inputLocations );
58 p->declareUpdateHandler( [=]( Gaudi::Details::PropertyBase& ) {
59 this->m_inputs = details::make_vector_of_handles<decltype( this->m_inputs )>( this, m_inputLocations,
60 Gaudi::DataHandle::Reader );
61 if ( std::is_pointer<In>::value ) { // handle constructor does not (yet) allow to set optional flag... so do it
62 // explicitly here...
63 std::for_each( this->m_inputs.begin(), this->m_inputs.end(), []( auto& h ) { h.setOptional( true ); } );
64 }
65 } );
66 p->useUpdateHandler(); // invoke call-back now, to be sure the input handles are synced with the property...
67 }
Gaudi::Functional::details::make_vector_of_handles
Handles make_vector_of_handles(IDataHandleHolder *owner, const std::vector< std::string > &init, Gaudi::DataHandle::Mode mode)
Definition: FunctionalDetails.h:418
std::is_pointer
gaudirun.output
output
Definition: gaudirun.py:404
Gaudi::DataHandle::Reader
Definition: DataHandle.h:31
declareProperty
Gaudi::Details::PropertyBase * declareProperty(const std::string &name, TYPE &value, const std::string &doc="none")
Declare a property (templated)
Gaudi::Details::PropertyBase
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
Definition: Property.h:32
Gaudi::Functional::m_inputLocations
std::vector< std::string > m_inputLocations
Definition: MergingTransformer.h:44
Gaudi::Functional::m_inputs
std::vector< InputHandle_t< In > > m_inputs
Definition: MergingTransformer.h:45
std::for_each
T for_each(T...args)

virtual Out Gaudi::Functional::operator() | ( | const vector_of_const_< In > & | inputs | ) | const
| pure virtual

void Gaudi::Functional::updateHandleLocation | ( | IProperty & | parent,
|  | const std::string & | prop,
|  | const std::string & | newLoc
| ) |  |
| inline

Definition at line 32 of file FunctionalUtilities.h.

33 {
34 auto sc = parent.setProperty( prop, newLoc );
35 if ( sc.isFailure() ) throw GaudiException( "Could not set Property", prop + " -> " + newLoc, sc );
36 }
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:22
IProperty::setProperty
virtual StatusCode setProperty(const Gaudi::Details::PropertyBase &p)=0
Set the property by property.

void Gaudi::Functional::updateHandleLocations | ( | IProperty & | parent,
|  | const std::string & | prop,
|  | const std::vector< std::string > & | newLocs
| ) |  |
| inline

Definition at line 38 of file FunctionalUtilities.h.

40 {
41 std::ostringstream ss;
42 GaudiUtils::details::ostream_joiner( ss << '[', newLocs, ", ", []( std::ostream & os, const auto& i ) -> auto& {
43 return os << "'" << i << "'";
44 } ) << ']';
45 auto sc = parent.setProperty( prop, ss.str() );
46 if ( sc.isFailure() ) throw GaudiException( "Could not set Property", prop + " -> " + ss.str(), sc );
47 }
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:22
IProperty::setProperty
virtual StatusCode setProperty(const Gaudi::Details::PropertyBase &p)=0
Set the property by property.
std::ostringstream
STL class.
std::ostringstream::str
T str(T...args)
GaudiUtils::details::ostream_joiner
Stream & ostream_joiner(Stream &os, Iterator first, Iterator last, Separator sep, OutputElement output=OutputElement{})
Definition: SerializeSTL.h:40
std::ostream
STL class.

void Gaudi::Functional::updateReadHandleLocation | ( | IProperty & | parent,
|  | const std::string & | prop,
|  | const std::string & | newLoc
| ) |  |
| inline

Definition at line 50 of file FunctionalUtilities.h.

51 {
52 return updateHandleLocation( parent, prop, newLoc );
53 }
Gaudi::Functional::updateHandleLocation
void updateHandleLocation(IProperty &parent, const std::string &prop, const std::string &newLoc)
Definition: FunctionalUtilities.h:32

## Variable Documentation

template<typename Signature , typename Traits_ = Traits::useDefaults>

struct [[deprecated( "use MergingTransformer instead" )]] Gaudi::Functional::ListTransformer

Definition at line 13 of file ListTransformer.h.

std::vector<std::string> Gaudi::Functional::m_inputLocations
| private

Definition at line 44 of file MergingTransformer.h.

std::vector<InputHandle_t<In> > Gaudi::Functional::m_inputs
| private

Definition at line 45 of file MergingTransformer.h.

template<typename Signature , typename Traits_ = Traits::useDefaults>

class MergingTransformer< Out(const vector_of_const_< In > Gaudi::Functional::Traits_

Initial value:
{
using MergingTransformer<Signature, Traits_>::MergingTransformer
Gaudi::Functional::MergingTransformer
MergingTransformer(const std::string &name, ISvcLocator *locator, const KeyValues &inputs, const KeyValue &output)
Definition: MergingTransformer.h:49

Definition at line 14 of file ListTransformer.h.

template<typename Out , typename In , typename Traits_ >

class MergingTransformer< Out(const vector_of_const_< In > Gaudi::Functional::void

Definition at line 23 of file MergingTransformer.h.