ATLAS Offline Software
Loading...
Searching...
No Matches
TileMuonReceiverDumper.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
10
11
14#include <fstream>
15
16
23 ISvcLocator* svcloc)
24 : AthReentrantAlgorithm (name, svcloc)
25{
26}
27
28
33{
34 ATH_CHECK( m_contKey.initialize() );
35 return StatusCode::SUCCESS;
36}
37
38
43StatusCode TileMuonReceiverDumper::execute (const EventContext& ctx) const
44{
45 std::string fname = std::format ("{}{}_{:08}_{:08}.dump",
46 m_prefix.value().c_str(),
47 m_contKey.key().c_str(),
48 ctx.eventID().run_number(),
49 ctx.eventID().event_number());
50 std::ofstream fout (fname);
51 if (!fout) {
52 ATH_MSG_ERROR ("Cannot open dump file: " << fname);
53 return StatusCode::FAILURE;
54 }
55
57
58 fout << "TileMuonReceiverContainer/" << m_contKey.key() << " "
59 << "run " << ctx.eventID().run_number() << " "
60 << "event " << ctx.eventID().event_number() << std::endl;
61
63
64 fout.close();
65
66 return StatusCode::SUCCESS;
67}
68
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x,...)
Handle class for reading from StoreGate.
An algorithm that can be simultaneously executed in multiple threads.
virtual StatusCode execute(const EventContext &ctx) const override
Algorithm event processing.
SG::ReadHandleKey< TileMuonReceiverContainer > m_contKey
Handle to access input tile digits.
Gaudi::Property< std::string > m_prefix
Output file name prefix.
TileMuonReceiverDumper(const std::string &name, ISvcLocator *svcloc)
Constructor.
virtual StatusCode initialize() override
Algorithm initialization; called at the beginning of the job.
static TFile * fout
Definition listroot.cxx:40