Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  master (d98a2936)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
MIHelpers.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2025 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 #pragma once
12 
13 #include <RootCnv/RootAddress.h>
14 #include <istream>
15 #include <ostream>
16 #include <tuple>
17 
18 namespace Gaudi {
19  inline std::ostream& operator<<( std::ostream& o, const RootAddress& addr ) {
20  return o << addr.svcType() << ' ' << addr.clID() << ' ' << addr.par()[0] << ' ' << addr.par()[1] << ' '
21  << addr.ipar()[0] << ' ' << addr.ipar()[1];
22  }
23 
24  namespace TestSuite {
25  namespace MultiInput {
26  typedef std::tuple<long, CLID, std::string, std::string, unsigned long, unsigned long> RootAddressArgs;
27  inline std::istream& operator>>( std::istream& i, RootAddressArgs& addr ) {
28  long s{ 0 };
29  CLID c{ 0 };
30  std::string p1, p2;
31  unsigned long ip1{ 0 }, ip2{ 0 };
32  i >> s >> c >> p1 >> p2 >> ip1 >> ip2;
33  addr = RootAddressArgs{ s, c, p1, p2, ip1, ip2 };
34  return i;
35  }
37  long s{ 0 };
38  CLID c{ 0 };
39  std::string p1, p2;
40  unsigned long ip1{ 0 }, ip2{ 0 };
41  std::tie( s, c, p1, p2, ip1, ip2 ) = args;
42  return new Gaudi::RootAddress( s, c, p1, p2, ip1, ip2 );
43  }
44  } // namespace MultiInput
45  } // namespace TestSuite
46 } // namespace Gaudi
AlgSequencer.p2
p2
Definition: AlgSequencer.py:30
gaudirun.s
string s
Definition: gaudirun.py:346
GenericAddress::clID
const CLID & clID() const override
Access : Retrieve class ID of the link.
Definition: GenericAddress.h:78
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:82
Gaudi::TestSuite::MultiInput::operator>>
std::istream & operator>>(std::istream &i, RootAddressArgs &addr)
Definition: MIHelpers.h:27
AlgSequencer.p1
p1
Definition: AlgSequencer.py:29
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:16
Gaudi::TestSuite::MultiInput::make_address
Gaudi::RootAddress * make_address(RootAddressArgs args)
Definition: MIHelpers.h:36
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:86
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:176
Gaudi::TestSuite::MultiInput::RootAddressArgs
std::tuple< long, CLID, std::string, std::string, unsigned long, unsigned long > RootAddressArgs
Definition: MIHelpers.h:26
RootAddress.h
GenericAddress::ipar
const unsigned long * ipar() const override
Retrieve integer parameters.
Definition: GenericAddress.h:88
Gaudi::RootAddress
Definition: RootAddress.h:45