ATLAS Offline Software
nodeIDPrinter.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 #include <sstream>
5 #include "./nodeIDPrinter.h"
6 
7 std::string nodeIDPrinter(const std::string& name,
8  int nodeID,
9  int parentID,
10  bool pass,
11  const std::string& timerStr){
12 
13  std::stringstream ss;
14  ss << "name(): " << name <<" node: " << nodeID
15  << " parent: " << parentID
16  << " pass: " << std::boolalpha << pass << " " <<timerStr << '\n';
17 
18  return ss.str();
19 }
20 
21 std::string nodeIDPrinter(const std::string& name,
22  bool pass,
23  const std::string& timerStr){
24 
25  std::stringstream ss;
26  ss << "name(): " << name <<" pass: " <<std::boolalpha << pass << " "
27  << timerStr << '\n';
28 
29  return ss.str();
30 }
31 
32 std::string nodeIDPrinter(const std::string& name,
33  int nodeID,
34  int parentID,
35  const std::optional<bool>& pass,
36  const std::string& timerStr){
37  if(pass.has_value()){
38  return nodeIDPrinter(name, nodeID, parentID, *pass, timerStr);
39  }
40  std::stringstream ss;
41  ss << "name(): " <<name <<" node: " << nodeID
42  << " parent: " << parentID
43  << " pass: " << "ERROR " <<timerStr << '\n';
44 
45  return ss.str();
46 }
47 
48 std::string nodeIDPrinter(const std::string& name,
49  const std::optional<bool>& pass,
50  const std::string& timerStr){
51  if(pass.has_value()){
52  return nodeIDPrinter(name, *pass, timerStr);
53  }
54 
55 
56  std::stringstream ss;
57 
58  ss << "name(): " << name << " pass: " << "ERROR " <<timerStr << '\n';
59 
60  return ss.str();
61 }
62 
63 std::string nodeIDPrinter(const std::string& name,
64  int nodeID,
65  int parentID){
66 
67  std::stringstream ss;
68  ss << "name(): " << name <<" node: " << nodeID
69  << " parent: " << parentID
70  << '\n';
71 
72  return ss.str();
73 }
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
nodeIDPrinter.h
nodeIDPrinter
std::string nodeIDPrinter(const std::string &name, int nodeID, int parentID, bool pass, const std::string &timerStr)
Definition: nodeIDPrinter.cxx:7
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195