ATLAS Offline Software
Loading...
Searching...
No Matches
ZdcRawData.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5//*****************************************************************************
6// Filename : ZdcRawData.cxx
7// Author : Peter Steinberg
8// Created : March 2009
9//
10// DESCRIPTION:
11//
12//
13// HISTORY:
14// 20 March 2009: Created
15//
16// BUGS:
17//
18//
19//
20//*****************************************************************************
21
22#include "ZdcEvent/ZdcRawData.h"
23
24
25#include <iostream>
26
27namespace{
28 void
29 printVector(const auto & container, const std::string & label, std::ostream & text){
30 text << label;
31 for (auto v:container){
32 text << " " <<v;
33 }
34 }
35}
36
38 : m_id (id)
39{
40}
41
43{
44 std::cout << (std::string) (*this) << std::endl;
45}
46
47ZdcRawData::operator std::string() const
48{
49 std::string result(whoami());
50 return result;
51}
52
53
54void ZdcRawData::print_to_stream ( const std::vector<double>& val,
55 const std::string & label,
56 std::ostream & text)
57{
58 printVector(val, label, text);
59}
60
61void ZdcRawData::print_to_stream ( const std::vector<int>& val,
62 const std::string & label,
63 std::ostream & text)
64{
65 printVector(val, label, text);
66}
67
ZdcRawData()=default
virtual std::string whoami() const
Definition ZdcRawData.h:53
virtual void print() const
Identifier m_id
Definition ZdcRawData.h:68
static void print_to_stream(const std::vector< double > &val, const std::string &label, std::ostream &text)
std::string label(const std::string &format, int i)
Definition label.h:19