ATLAS Offline Software
Loading...
Searching...
No Matches
EventFormat_v1.h
Go to the documentation of this file.
1// Dear emacs, this is -*- c++ -*-
2
3/*
4 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5*/
6
7// $Id: EventFormat_v1.h 641134 2015-01-22 19:35:12Z ssnyder $
8#ifndef XAODEVENTFORMAT_VERSIONS_EVENTFORMAT_V1_H
9#define XAODEVENTFORMAT_VERSIONS_EVENTFORMAT_V1_H
10
11// System include(s):
12extern "C" {
13# include <stdint.h>
14}
15
16// STL include(s):
17#include <vector>
18#include <string>
19#include <map>
20#include <iosfwd>
21
22// Local include(s):
24
25namespace xAOD {
26
39
41 typedef std::map< std::string, EventFormatElement > KeyedData_t;
43 typedef std::map< uint32_t, EventFormatElement > HashedData_t;
44
45 public:
48
50 void add( const EventFormatElement& element,
51 bool updatePersistent = true );
52
54 bool exists( const std::string& key ) const;
56 bool exists( uint32_t hash ) const;
57
59 const EventFormatElement* get( const std::string& key, bool quiet = false ) const;
61 const EventFormatElement* get( uint32_t hash, bool quiet = false ) const;
62
64 void clear();
65
67 typedef KeyedData_t::const_iterator const_iterator;
69 const_iterator begin() const;
71 const_iterator end() const;
72
74 void toTransient();
75
77 void dump() const;
78
79 private:
84
86 std::vector< std::string > m_branchNames;
88 std::vector< std::string > m_classNames;
90 std::vector< std::string > m_parentNames;
92 std::vector< uint32_t > m_branchHashes;
93
94 }; // class EventFormat_v1
95
97 std::ostream& operator<<( std::ostream& out,
98 const EventFormat_v1& format );
99
100} // namespace xAOD
101
102#endif // XAODEVENTFORMAT_VERSIONS_EVENTFORMAT_V1_H
Class describing one branch of the ROOT file.
Event format metadata for xAOD files.
KeyedData_t::const_iterator const_iterator
Iterator for looping over the elements of the object.
std::map< uint32_t, EventFormatElement > HashedData_t
Type of the hash->data in-memory object.
EventFormat_v1()
Default constructor.
std::vector< uint32_t > m_branchHashes
Hashed versions of the branch names.
KeyedData_t m_keyedData
Object associating string keys with the descriptions.
void add(const EventFormatElement &element, bool updatePersistent=true)
Add the description of a new branch.
const_iterator end() const
STL-like function for getting the end of the container.
std::vector< std::string > m_parentNames
Names of the auxiliary parents of the branches.
std::map< std::string, EventFormatElement > KeyedData_t
Type of the key->data in-memory object.
bool exists(const std::string &key) const
Check if a description exists about a given branch.
std::vector< std::string > m_branchNames
Names of the branches that we are describing.
std::vector< std::string > m_classNames
Names of the transient objects belonging to the branch names.
const EventFormatElement * get(const std::string &key, bool quiet=false) const
Get the description of a given branch.
void dump() const
Dump the contents of this object.
void toTransient()
Interpret the persistent members of the object.
void clear()
Clear the object.
const_iterator begin() const
STL-like function for getting the beginning of the container.
HashedData_t m_hashedData
Object associating hash keys with the descriptions.
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.
setEventNumber uint32_t