The Gaudi Framework  master (82fdf313)
Loading...
Searching...
No Matches
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
18namespace 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
unsigned int CLID
Class ID definition.
Definition ClassID.h:16
Description:
Definition RootAddress.h:45
long svcType() const override
Access : retrieve the storage type of the class id.
const CLID & clID() const override
Access : Retrieve class ID of the link.
const std::string * par() const override
Retrieve string parameters.
const unsigned long * ipar() const override
Retrieve integer parameters.
Gaudi::RootAddress * make_address(RootAddressArgs args)
Definition MIHelpers.h:36
std::tuple< long, CLID, std::string, std::string, unsigned long, unsigned long > RootAddressArgs
Definition MIHelpers.h:26
std::istream & operator>>(std::istream &i, RootAddressArgs &addr)
Definition MIHelpers.h:27
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition __init__.py:1
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