ATLAS Offline Software
Loading...
Searching...
No Matches
EventFormatElement.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5// $Id: EventFormatElement.cxx 586453 2014-03-06 10:24:33Z krasznaa $
6
7// STL include(s):
8#include <iostream>
9#include <iomanip>
10
11// Local include(s):
13
14namespace xAOD {
15
21 const std::string& className,
22 const std::string& parentName,
26
27 }
28
30 const std::string& EventFormatElement::branchName() const {
31
32 return m_branchName;
33 }
34
36 const std::string& EventFormatElement::className() const {
37
38 return m_className;
39 }
40
42 const std::string& EventFormatElement::parentName() const {
43
44 return m_parentName;
45 }
46
52
59 std::ostream& operator<<( std::ostream& out,
60 const EventFormatElement& element ) {
61
62 // Get the current state of the stream:
63 const char fillChar = out.fill();
64 const std::ios_base::fmtflags flags = out.flags();
65 const std::streamsize width = out.width();
66
67 // Do the printout:
68 out << "Branch name: " << std::setw( 30 ) << element.branchName()
69 << ", Class name: " << std::setw( 30 ) << element.className()
70 << ", Hash: 0x" << std::setw( 8 ) << std::hex << std::setfill( '0' )
71 << element.hash();
72
73 // Restore the original state of the stream:
74 out.fill( fillChar );
75 out.flags( flags );
76 out.width( width );
77
78 // Return the stream:
79 return out;
80 }
81
82} // namespace xAOD
const double width
Class describing one branch of the ROOT file.
sgkey_t m_hash
The hash belonging to this branch/key.
std::string m_branchName
The branch/key name.
sgkey_t hash() const
Get the hash belonging to this branch/key.
std::string m_parentName
The name of the parent auxiliary object.
const std::string & branchName() const
Get the branch/key name.
EventFormatElement(const std::string &branchName="", const std::string &className="", const std::string &parentName="", sgkey_t hash=0)
Constructor with all members specified.
std::string m_className
The class name belonging to this branch/key.
const std::string & parentName() const
Get the name of the parent auxiliary object.
const std::string & className() const
Get the class name of this branch/key.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
std::ostream & operator<<(std::ostream &out, const std::pair< FIRST, SECOND > &pair)
Helper print operator.