ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
PileUpTools
PileUpTools
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
18
#include <
xAODEventInfo/EventInfo.h
>
19
20
class
PileUpHashHelper
21
{
22
public
:
23
PileUpHashHelper
() {}
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
41
static
xAOD::EventInfo::PileUpMixtureID
uuidToPileUpMixtureId
(
const
uuid_t &hash);
42
44
static
void
pileUpMixtureIdToUuid
(
const
xAOD::EventInfo::PileUpMixtureID
&mixture,
45
uuid_t &hash);
46
48
static
const
uint16_t
PILEUP_SIZE_BYTES
= 8;
49
50
private
:
51
std::stringstream
m_stream
;
52
};
53
54
#endif
// PILEUPTOOLS_PILEUPHASHHELPER_H
PileUpHashHelper::clearHashSource
void clearHashSource()
Clear the stream.
Definition
PileUpHashHelper.cxx:44
PileUpHashHelper::hashSource
std::string hashSource() const
Get the current hash base.
Definition
PileUpHashHelper.h:35
PileUpHashHelper::PileUpHashHelper
PileUpHashHelper()
Definition
PileUpHashHelper.h:23
PileUpHashHelper::m_stream
std::stringstream m_stream
Definition
PileUpHashHelper.h:51
PileUpHashHelper::addToHashSource
void addToHashSource(const std::string &string)
Add a plain string to the stream.
Definition
PileUpHashHelper.cxx:11
PileUpHashHelper::calculateHash
void calculateHash(uuid_t &hash) const
Calculate the hash.
Definition
PileUpHashHelper.cxx:49
PileUpHashHelper::pileUpMixtureIdToUuid
static void pileUpMixtureIdToUuid(const xAOD::EventInfo::PileUpMixtureID &mixture, uuid_t &hash)
xAOD::EventInfo::PileUpMixtureID to uuid_t
Definition
PileUpHashHelper.cxx:69
PileUpHashHelper::uuidToPileUpMixtureId
static xAOD::EventInfo::PileUpMixtureID uuidToPileUpMixtureId(const uuid_t &hash)
Convert uuid_t to xAOD::EventInfo::PileUpMixtureID.
Definition
PileUpHashHelper.cxx:57
PileUpHashHelper::PILEUP_SIZE_BYTES
static const uint16_t PILEUP_SIZE_BYTES
Size of individual low/high bits in bytes.
Definition
PileUpHashHelper.h:48
xAOD::EventInfo
EventInfo_v1 EventInfo
Definition of the latest event info version.
Definition
IEventInfoCnvTool.h:16
xAOD::EventInfo_v1::PileUpMixtureID
Unique pile-up mixture identifier definition.
Definition
EventInfo_v1.h:243
EventInfo.h
Generated on
for ATLAS Offline Software by
1.17.0