ATLAS Offline Software
CaloCPUOutput.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_CALOCPUOUTPUT_H
8 #define CALORECGPU_CALOCPUOUTPUT_H
9 
12 #include <string>
13 
16 
17 class CaloCell_ID;
18 
31  public AthAlgTool, virtual public CaloClusterCollectionProcessor
32 {
33  public:
34 
35  CaloCPUOutput(const std::string & type, const std::string & name, const IInterface * parent);
36 
38 
39  virtual StatusCode initialize() override;
40 
41  virtual StatusCode execute (const EventContext& ctx, xAOD::CaloClusterContainer* cluster_collection) const override;
42 
43  virtual ~CaloCPUOutput() = default;
44 
45  private:
46 
47 
52  Gaudi::Property<std::string> m_savePath{this, "SavePath", "./saved_clusters", "Path to where the files should be saved"};
53 
57  Gaudi::Property<std::string> m_filePrefix{this, "FilePrefix", "", "Prefix of the saved files"};
58 
62  Gaudi::Property<std::string> m_fileSuffix{this, "FileSuffix", "", "Suffix of the saved files"};
63 
67  Gaudi::Property<unsigned int> m_numWidth{this, "NumberWidth", 9, "The number of digits to reserve for the events"};
68 
74  Gaudi::Property<bool> m_saveCellInfo{this, "AlsoOutputCellInfo", false,
75  "Whether to output cell energies, gains, times, etc., as this information is repeated in the GPU side too."};
76 
80  SG::ReadHandleKey<CaloCellContainer> m_cellsKey {this, "CellsName", "", "Name(s) of Cell Containers"};
81 
85  const CaloCell_ID* m_calo_id {nullptr};
86 
87 };
88 
89 #endif //CALORECGPU_CALOCPUOUTPUT_H
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
CaloCPUOutput::m_cellsKey
SG::ReadHandleKey< CaloCellContainer > m_cellsKey
vector of names of the cell containers to use as input.
Definition: CaloCPUOutput.h:80
CaloClusterCollectionProcessor::execute
virtual StatusCode execute(const EventContext &ctx, xAOD::CaloClusterContainer *collection) const =0
Execute on an entire collection of clusters.
CaloCPUOutput
Standard tool to output CPU cluster info to the non-standard file format that we have been using for ...
Definition: CaloCPUOutput.h:32
CaloClusterCollectionProcessor
Definition: CaloClusterCollectionProcessor.h:32
CaloCPUOutput::m_numWidth
Gaudi::Property< unsigned int > m_numWidth
The number of digits to reserve for the events.
Definition: CaloCPUOutput.h:67
SG::ReadHandleKey< CaloCellContainer >
CaloCPUOutput::initialize
virtual StatusCode initialize() override
Definition: CaloCPUOutput.cxx:22
CaloCPUOutput::m_saveCellInfo
Gaudi::Property< bool > m_saveCellInfo
If true, also outputs the cell energies, times, gains, qualities and provenances.
Definition: CaloCPUOutput.h:74
CaloCPUOutput::execute
virtual StatusCode execute(const EventContext &ctx, xAOD::CaloClusterContainer *cluster_collection) const override
Execute on an entire collection of clusters.
Definition: CaloCPUOutput.cxx:31
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
CaloCell_ID
Helper class for offline cell identifiers.
Definition: CaloCell_ID.h:34
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
CaloCPUOutput::m_savePath
Gaudi::Property< std::string > m_savePath
The path specifying the folder to which the files should be saved.
Definition: CaloCPUOutput.h:52
ReadCondHandleKey.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
CaloClusterCollectionProcessor.h
Base class for cluster processing tools called from CaloClusterMaker.
CaloCPUOutput::m_fileSuffix
Gaudi::Property< std::string > m_fileSuffix
The suffix of the saved files.
Definition: CaloCPUOutput.h:62
CaloCPUOutput::m_filePrefix
Gaudi::Property< std::string > m_filePrefix
The prefix of the saved files.
Definition: CaloCPUOutput.h:57
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
CaloCPUOutput::CaloCPUOutput
CaloCPUOutput(const std::string &type, const std::string &name, const IInterface *parent)
Definition: CaloCPUOutput.cxx:15
AthAlgTool
Definition: AthAlgTool.h:26
CaloCPUOutput::~CaloCPUOutput
virtual ~CaloCPUOutput()=default
CaloCPUOutput::m_calo_id
const CaloCell_ID * m_calo_id
Pointer to Calo ID Helper.
Definition: CaloCPUOutput.h:85