The Gaudi Framework  master (d98a2936)
DataHandle.cpp
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 #include <GaudiKernel/DataHandle.h>
13 
14 #include <sstream>
15 
16 std::string const Gaudi::DataHandle::default_type = "unknown_t";
17 
18 namespace Gaudi {
19  std::string DataHandle::pythonRepr() const {
20  std::ostringstream ost;
21  ost << "DataHandle(" << fullKey() << ", '";
22  switch ( mode() ) {
24  ost << "R";
25  break;
26  case DataHandle::Mode::Writer:
27  ost << "W";
28  break;
29  default:
30  ost << "UNKNOWN";
31  break;
32  }
33  ost << "', '" + default_type + "')";
34  return ost.str();
35  }
36 
37  std::ostream& operator<<( std::ostream& str, const DataHandle& d ) {
38  str << d.fullKey() << " m: " << d.mode();
39  if ( d.owner() ) str << " o: " << d.owner()->name();
40  return str;
41  }
42 } // namespace Gaudi
Gaudi::DataHandle::default_type
static const std::string default_type
Definition: DataHandle.h:82
Gaudi::DataHandle
Definition: DataHandle.h:37
INamedInterface::name
virtual const std::string & name() const =0
Retrieve the name of the instance.
Gaudi::DataHandle::owner
virtual IDataHandleHolder * owner() const
Definition: DataHandle.h:52
Gaudi
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition: __init__.py:1
IDataHandleHolder.h
Gaudi::DataHandle::mode
virtual Mode mode() const
Definition: DataHandle.h:54
Gaudi::DataHandle::pythonRepr
virtual std::string pythonRepr() const
Definition: DataHandle.cpp:19
DataHandle.h
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::DataHandle::fullKey
virtual const DataObjID & fullKey() const
Definition: DataHandle.h:60
compareOutputFiles.Reader
Reader
Definition: compareOutputFiles.py:489