ATLAS Offline Software
Reconstruction/RecoAlgs/IsolationAlgs/src/VectorVectorIntParser.cxx
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // Add a parser for vector<vector<int>>
9 
10 // Includes needed for the custom type
11 #include <vector>
12 #include <string>
13 
14 #include "VectorVectorIntParser.h"
15 
16 // Define the parser
17 #include "GaudiKernel/ParsersFactory.h"
18 
19 namespace Gaudi
20 {
21  namespace Parsers
22  {
23 
24  // Parse function... nothing special, but it must be done explicitely.
25  StatusCode parse( VecVecInt_t& result, const std::string& input ) { return parse_( result, input ); }
26  }
27 }
28 
29 // We also need to be able to print an object of our type as a string that both
30 // Python and our parser can understand,
31 #include "GaudiKernel/ToStream.h"
32 namespace std
33 {
34  // This is an example valid for any mapping type.
35  ostream& operator<<( ostream& s, const Gaudi::Parsers::VecVecInt_t& vecvec )
36  {
37  s << '{';
38  for ( const auto& vec : vecvec ) {
40  }
41  s << '}';
42  return s;
43  }
44 }
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
get_generator_info.result
result
Definition: get_generator_info.py:21
Gaudi::Parsers::parse
StatusCode parse(std::tuple< Tup... > &tup, const Gaudi::Parsers::InputData &input)
Definition: CaloGPUClusterAndCellDataMonitorOptions.h:284
VectorVectorIntParser.h
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
Gaudi::Parsers::VecVecInt_t
std::vector< std::vector< int > > VecVecInt_t
Definition: Reconstruction/RecoAlgs/IsolationAlgs/src/VectorVectorIntParser.h:25
operator<<
std::ostream & operator<<(std::ostream &lhs, const TestGaudiProperty &rhs)
Definition: TestGaudiProperty.cxx:69
Gaudi::Utils::toStream
std::ostream &GAUDI_API toStream(const SG::VarHandleKeyArray &v, std::ostream &o)
Gaudi function used to convert a property to a string.
Definition: StoreGate/src/VarHandleKeyArray.cxx:49
Gaudi
=============================================================================
Definition: CaloGPUClusterAndCellDataMonitorOptions.h:273