ATLAS Offline Software
Loading...
Searching...
No Matches
PileUpHashHelper.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef PILEUPTOOLS_PILEUPHASHHELPER_H
6#define PILEUPTOOLS_PILEUPHASHHELPER_H
7
13
14#include <sstream>
15
16#include <uuid/uuid.h>
17
19
21{
22public:
24
26 void addToHashSource(const std::string &string);
27
29 void addToHashSource(const xAOD::EventInfo *eventInfo);
30
32 void clearHashSource();
33
35 std::string hashSource() const { return m_stream.str(); }
36
38 void calculateHash(uuid_t &hash) const;
39
42
45 uuid_t &hash);
46
48 static const uint16_t PILEUP_SIZE_BYTES = 8;
49
50private:
51 std::stringstream m_stream;
52};
53
54#endif // PILEUPTOOLS_PILEUPHASHHELPER_H
void clearHashSource()
Clear the stream.
std::string hashSource() const
Get the current hash base.
std::stringstream m_stream
void addToHashSource(const std::string &string)
Add a plain string to the stream.
void calculateHash(uuid_t &hash) const
Calculate the hash.
static void pileUpMixtureIdToUuid(const xAOD::EventInfo::PileUpMixtureID &mixture, uuid_t &hash)
xAOD::EventInfo::PileUpMixtureID to uuid_t
static xAOD::EventInfo::PileUpMixtureID uuidToPileUpMixtureId(const uuid_t &hash)
Convert uuid_t to xAOD::EventInfo::PileUpMixtureID.
static const uint16_t PILEUP_SIZE_BYTES
Size of individual low/high bits in bytes.
EventInfo_v1 EventInfo
Definition of the latest event info version.
Unique pile-up mixture identifier definition.