ATLAS Offline Software
Public Member Functions | List of all members
GlobalSim::LArStripNeighborhoodDumper Class Reference

#include <LArStripNeighborhoodDumper.h>

Collaboration diagram for GlobalSim::LArStripNeighborhoodDumper:

Public Member Functions

 LArStripNeighborhoodDumper ()
 
StatusCode dump (const std::string &name, const xAOD::EventInfo &eventInfo, const LArStripNeighborhoodContainer &) const
 
StatusCode dumpTerse (const std::string &name, const xAOD::EventInfo &eventInfo, const LArStripNeighborhoodContainer &) const
 

Detailed Description

Definition at line 14 of file LArStripNeighborhoodDumper.h.

Constructor & Destructor Documentation

◆ LArStripNeighborhoodDumper()

GlobalSim::LArStripNeighborhoodDumper::LArStripNeighborhoodDumper ( )

Definition at line 10 of file LArStripNeighborhoodDumper.cxx.

10  {
11  }

Member Function Documentation

◆ dump()

StatusCode GlobalSim::LArStripNeighborhoodDumper::dump ( const std::string &  name,
const xAOD::EventInfo eventInfo,
const LArStripNeighborhoodContainer neighborhoods 
) const

Definition at line 14 of file LArStripNeighborhoodDumper.cxx.

16  {
17 
18  std::ofstream out(name + "_" +
19  std::to_string(eventInfo.eventNumber()) +
20  ".log");
21 
22  out << "run " << eventInfo.runNumber()
23  << " evt " << eventInfo.eventNumber()
24  << " is simulation " << std::boolalpha
26  << " weight " << eventInfo.mcEventWeight() << '\n';
27 
28  for (const auto& nbhd : neighborhoods) {
29  out << *nbhd << '\n';
30  }
31 
32  out.close();
33 
34  return StatusCode::SUCCESS;
35  }

◆ dumpTerse()

StatusCode GlobalSim::LArStripNeighborhoodDumper::dumpTerse ( const std::string &  name,
const xAOD::EventInfo eventInfo,
const LArStripNeighborhoodContainer neighborhoods 
) const

Definition at line 65 of file LArStripNeighborhoodDumper.cxx.

67  {
68 
69  std::ofstream out(name + "_" +
70  std::to_string(eventInfo.eventNumber()) +
71  "_terse.log");
72  out << "run " << eventInfo.runNumber()
73  << " evt " << eventInfo.eventNumber()
74  << " is simulation " << std::boolalpha
76  << " weight " << eventInfo.mcEventWeight() << '\n';
77 
78  for (const auto& n : neighborhoods) {dump_n(n, out);}
79 
80 
81  out.close();
82 
83  return StatusCode::SUCCESS;
84  }

The documentation for this class was generated from the following files:
xAOD::EventInfo_v1::eventNumber
uint64_t eventNumber() const
The current event's event number.
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:70
xAOD::EventInfo_v1::IS_SIMULATION
@ IS_SIMULATION
true: simulation, false: data
Definition: EventInfo_v1.h:151
xAOD::EventInfo_v1::runNumber
uint32_t runNumber() const
The current event's run number.
beamspotman.n
n
Definition: beamspotman.py:729
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
xAOD::EventInfo_v1::mcEventWeight
float mcEventWeight(size_t i=0) const
The weight of one specific MC event used in the simulation.
Definition: EventInfo_v1.cxx:203
GlobalSim::dump_n
void dump_n(const LArStripNeighborhood *n, std::ostream &os)
Definition: LArStripNeighborhoodDumper.cxx:57
xAOD::EventInfo_v1::eventType
bool eventType(EventType type) const
Check for one particular bitmask value.