ATLAS Offline Software
Loading...
Searching...
No Matches
CaloGPUOutput.h
Go to the documentation of this file.
1//
2// Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3//
4// Dear emacs, this is -*- c++ -*-
5//
6
7#ifndef CALORECGPU_CALOGPUOUTPUT_H
8#define CALORECGPU_CALOGPUOUTPUT_H
9
12#include <string>
13#include <mutex>
14#include <atomic>
15
26
28 public extends<AthAlgTool, CaloClusterGPUProcessor>
29{
30 public:
31
32 CaloGPUOutput(const std::string & type, const std::string & name, const IInterface * parent);
33
34 virtual StatusCode execute (const EventContext & ctx,
35 const CaloRecGPU::ConstantDataHolder & constant_data,
36 CaloRecGPU::EventDataHolder & event_data,
37 void * temporary_buffer) const override;
38
39 virtual ~CaloGPUOutput() = default;
40
41 private:
42
43
48 Gaudi::Property<std::string> m_savePath{this, "SavePath", "./saved_clusters", "Path to where the files should be saved"};
49
53 Gaudi::Property<std::string> m_filePrefix{this, "FilePrefix", "", "Prefix of the saved files"};
54
58 Gaudi::Property<std::string> m_fileSuffix{this, "FileSuffix", "", "Suffix of the saved files"};
59
63 Gaudi::Property<unsigned int> m_numWidth{this, "NumberWidth", 9, "The number of digits to reserve for the events"};
64
68 Gaudi::Property<bool> m_sortedAndCutClusters {this, "UseSortedAndCutClusters", true, "Sort the clusters by transverse energy, apply a cut and ensure contiguous tags"};
69
73 Gaudi::Property<bool> m_outputTags{this, "OutputCellsAsTags", true, "Whether to output cell assignment as tags instead of a list of indices per cluster."};
74
78 Gaudi::Property<bool> m_onlyCellInfo {this, "OnlyOutputCellInfo", false, "Only output cell info"};
79
84 mutable std::atomic<bool> m_constantDataSaved;
85
89 mutable std::mutex m_mutex;
90
91};
92
93#endif //CALORECGPU_CALOGPUOUTPUT_H
Gaudi::Property< std::string > m_savePath
The path specifying the folder to which the files should be saved.
std::mutex m_mutex
This mutex is locked when saving the constant data on the first event to ensure thread safety.
virtual ~CaloGPUOutput()=default
Gaudi::Property< bool > m_outputTags
Whether to output cell assignment as tags instead of a list of indices per cluster.
Gaudi::Property< std::string > m_filePrefix
The prefix of the saved files.
Gaudi::Property< unsigned int > m_numWidth
The number of digits to reserve for the events.
virtual StatusCode execute(const EventContext &ctx, const CaloRecGPU::ConstantDataHolder &constant_data, CaloRecGPU::EventDataHolder &event_data, void *temporary_buffer) const override
std::atomic< bool > m_constantDataSaved
A flag to signal that the constant data has been adequately saved.
Gaudi::Property< bool > m_onlyCellInfo
If true, only output cell info (useful for reducing disk usage when running the full standalone versi...
Gaudi::Property< bool > m_sortedAndCutClusters
If true, sort the clusters by transverse energy and compactify the tags to ensure sequentiality.
Gaudi::Property< std::string > m_fileSuffix
The suffix of the saved files.
CaloGPUOutput(const std::string &type, const std::string &name, const IInterface *parent)
Holds CPU and GPU versions of the geometry and cell noise information, which are assumed to be consta...
Definition DataHolders.h:27
Holds the mutable per-event information (clusters and cells) and provides utilities to convert betwee...
Definition DataHolders.h:73