The Gaudi Framework  master (37c0b60a)
MIHelpers.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #ifndef GAUDIEXAMPLES_MULTIINPUT_COMMON
12 #define GAUDIEXAMPLES_MULTIINPUT_COMMON
13 
14 #include <RootCnv/RootAddress.h>
15 #include <istream>
16 #include <ostream>
17 #include <tuple>
18 
19 namespace Gaudi {
20  inline std::ostream& operator<<( std::ostream& o, const RootAddress& addr ) {
21  return o << addr.svcType() << ' ' << addr.clID() << ' ' << addr.par()[0] << ' ' << addr.par()[1] << ' '
22  << addr.ipar()[0] << ' ' << addr.ipar()[1];
23  }
24 
25  namespace TestSuite {
26  namespace MultiInput {
29  long s{ 0 };
30  CLID c{ 0 };
31  std::string p1, p2;
32  unsigned long ip1{ 0 }, ip2{ 0 };
33  i >> s >> c >> p1 >> p2 >> ip1 >> ip2;
34  addr = RootAddressArgs{ s, c, p1, p2, ip1, ip2 };
35  return i;
36  }
38  long s{ 0 };
39  CLID c{ 0 };
40  std::string p1, p2;
41  unsigned long ip1{ 0 }, ip2{ 0 };
42  std::tie( s, c, p1, p2, ip1, ip2 ) = args;
43  return new Gaudi::RootAddress( s, c, p1, p2, ip1, ip2 );
44  }
45  } // namespace MultiInput
46  } // namespace TestSuite
47 } // namespace Gaudi
48 #endif
std::string
STL class.
AlgSequencer.p2
p2
Definition: AlgSequencer.py:30
gaudirun.s
string s
Definition: gaudirun.py:346
TestSuite
#define TestSuite
Definition: MakeAndConsume.cpp:658
std::tuple
GenericAddress::clID
const CLID & clID() const override
Access : Retrieve class ID of the link.
Definition: GenericAddress.h:81
gaudirun.c
c
Definition: gaudirun.py:525
GenericAddress::svcType
long svcType() const override
Access : retrieve the storage type of the class id.
Definition: GenericAddress.h:85
std::tie
T tie(T... args)
std::ostream
STL class.
Gaudi::TestSuite::MultiInput::operator>>
std::istream & operator>>(std::istream &i, RootAddressArgs &addr)
Definition: MIHelpers.h:28
AlgSequencer.p1
p1
Definition: AlgSequencer.py:29
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:18
Gaudi::TestSuite::MultiInput::make_address
Gaudi::RootAddress * make_address(RootAddressArgs args)
Definition: MIHelpers.h:37
Gaudi
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition: __init__.py:1
gaudirun.args
args
Definition: gaudirun.py:336
GenericAddress::par
const std::string * par() const override
Retrieve string parameters.
Definition: GenericAddress.h:89
Gaudi::operator<<
std::ostream & operator<<(std::ostream &o, const Gaudi::StringKey &key)
printout of the object reply on the native printout for the string
Definition: StringKey.h:208
Gaudi::TestSuite::MultiInput::RootAddressArgs
std::tuple< long, CLID, std::string, std::string, unsigned long, unsigned long > RootAddressArgs
Definition: MIHelpers.h:27
RootAddress.h
std::istream
STL class.
GenericAddress::ipar
const unsigned long * ipar() const override
Retrieve integer parameters.
Definition: GenericAddress.h:91
Gaudi::RootAddress
Definition: RootAddress.h:46