All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Classes | Functions
opdet::factory Namespace Reference

Namespaces

 details
 

Classes

struct  Decl
 Token to register an algorithm, used in AlgorithmFactory. More...
 
class  AlgorithmFactory
 An algorithm factory class. More...
 
struct  FWInterfaceTraits
 Template type for the third parameter of FWInterfacedIF objects. More...
 
class  FWInterfacedIF
 
class  FWInterfacedBase
 Base class for specialization. More...
 
class  FWInterfaced
 
class  FWInterfaced< pmtana::PedAlgoFixed, pmtana::PMTPedestalBase, ArtTraits >
 Framework interface to pmtana::PedAlgoFixed. More...
 

Functions

template<typename S , typename Coll >
S join (S const &sep, Coll const &s)
 Returns a concatenation of strings in s separated by sep. More...
 
template<typename Coll >
std::string join (const char *sep, Coll const &s)
 

Function Documentation

template<typename S , typename Coll >
S opdet::factory::join ( S const &  sep,
Coll const &  s 
)

Returns a concatenation of strings in s separated by sep.

Template Parameters
Stype of string
Colltype of collection of strings
Parameters
sepseparator string
slist of strings
Returns
a string of type S with the concatenation of all elements of s

Example:

using std::string_literals;
std::array const s { "one"s, "2"s, "III"s, "d"s };
std::cout << "Options: '" << join("', '", s) << "'." << std::endl;

will print: `Options: 'one', '2', 'III', 'd'.`.

Note that actually S can be any copyable type supporting in-place addition (that is concatenation for strings). Indeed, elements in Coll do not even need to be of type S as long as S::operator+=(Coll::value_type) is supported.

Definition at line 573 of file OpRecoFactoryStuff.h.

573  {
575  if (empty(s)) return S{};
576  auto it = begin(s);
577  auto const send = end(s);
578  S cat { *it };
579  while (++it != send) { cat += sep; cat += *it; }
580  return cat;
581 } // join()
see a below echo S(symbol in a section other than those above)
auto end(FixedBins< T, C > const &) noexcept
Definition: FixedBins.h:585
auto begin(FixedBins< T, C > const &) noexcept
Definition: FixedBins.h:573
then echo File list $list not found else cat $list while read file do echo $file sed s
Definition: file_to_url.sh:60
bool empty(FixedBins< T, C > const &) noexcept
Definition: FixedBins.h:555
template<typename Coll >
std::string opdet::factory::join ( const char *  sep,
Coll const &  s 
)

Definition at line 584 of file OpRecoFactoryStuff.h.

585  { return join<std::string>(sep, s); }
then echo File list $list not found else cat $list while read file do echo $file sed s
Definition: file_to_url.sh:60