ATLAS Offline Software
CaloGPUOutput.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2002-2023 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 
28  public AthAlgTool, virtual public 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_onlyCellInfo {this, "OnlyOutputCellInfo", false, "Only output cell info"};
74 
79  mutable std::atomic<bool> m_constantDataSaved;
80 
85 
86 };
87 
88 #endif //CALORECGPU_CALOGPUOUTPUT_H
CaloGPUOutput::execute
virtual StatusCode execute(const EventContext &ctx, const CaloRecGPU::ConstantDataHolder &constant_data, CaloRecGPU::EventDataHolder &event_data, void *temporary_buffer) const override
Process the clusters on GPU.
Definition: CaloGPUOutput.cxx:22
BeamSpot::mutex
std::mutex mutex
Definition: InDetBeamSpotVertex.cxx:18
CaloGPUOutput
Standard tool to output the GPU data representation to the non-standard file format that we have been...
Definition: CaloGPUOutput.h:29
CaloClusterGPUProcessor
Base class for GPU-accelerated cluster processing tools to be called from CaloGPUHybridClusterProcess...
Definition: CaloClusterGPUProcessor.h:27
CaloRecGPU::EventDataHolder
Definition: DataHolders.h:35
CaloGPUOutput::m_onlyCellInfo
Gaudi::Property< bool > m_onlyCellInfo
If true, only output cell info (useful for reducing disk usage when running the full standalone versi...
Definition: CaloGPUOutput.h:73
CaloClusterGPUProcessor.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CaloGPUOutput::m_numWidth
Gaudi::Property< unsigned int > m_numWidth
The number of digits to reserve for the events.
Definition: CaloGPUOutput.h:63
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
CaloGPUOutput::m_savePath
Gaudi::Property< std::string > m_savePath
The path specifying the folder to which the files should be saved.
Definition: CaloGPUOutput.h:48
CaloGPUOutput::CaloGPUOutput
CaloGPUOutput(const std::string &type, const std::string &name, const IInterface *parent)
Definition: CaloGPUOutput.cxx:15
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
CaloGPUOutput::m_filePrefix
Gaudi::Property< std::string > m_filePrefix
The prefix of the saved files.
Definition: CaloGPUOutput.h:53
CaloGPUOutput::m_mutex
std::mutex m_mutex
This mutex is locked when saving the constant data on the first event to ensure thread safety.
Definition: CaloGPUOutput.h:84
CaloGPUOutput::~CaloGPUOutput
virtual ~CaloGPUOutput()=default
CaloGPUOutput::m_constantDataSaved
std::atomic< bool > m_constantDataSaved
A flag to signal that the constant data has been adequately saved.
Definition: CaloGPUOutput.h:79
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
CaloRecGPU::ConstantDataHolder
Definition: DataHolders.h:19
CaloGPUOutput::m_fileSuffix
Gaudi::Property< std::string > m_fileSuffix
The suffix of the saved files.
Definition: CaloGPUOutput.h:58
AthAlgTool
Definition: AthAlgTool.h:26
CaloGPUOutput::m_sortedAndCutClusters
Gaudi::Property< bool > m_sortedAndCutClusters
If true, sort the clusters by transverse energy and compactify the tags to ensure sequentiality.
Definition: CaloGPUOutput.h:68