ATLAS Offline Software
Loading...
Searching...
No Matches
ZdcRawChannel.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5//***************************************************************************
6// Filename : ZdcRawChannel.h
7// Author : Peter Steinberg
8// Created : March 2009
9//
10// DESCRIPTION:
11// A ZdcRawChannel is the data class containing energy/time information
12//
13// HISTORY:
14//
15// ***************************************************************************
16
17#ifndef ZDCEVENT_ZDCRAWCHANNEL_H
18#define ZDCEVENT_ZDCRAWCHANNEL_H
19
20#include "ZdcEvent/ZdcRawData.h"
22
24{
25public:
26
27 /* Constructors */
28
30 m_size = 0;
31 }
32
34 //This will hold high/low gain combinations of up to 4 different methods
35 //of reconstruction
36 {
37 m_size = 8;
38 m_energy.resize(8,0.);
39 m_time.resize(8,0.);
40 m_chi.resize(8,0.);
41 }
42
43 /* Destructor */
44
45 virtual ~ZdcRawChannel() { }
46
47 /* Inline access methods */
48
49
50
51 std::string whoami (void) const { return "ZdcRawChannel"; }
52 void print (void) const{};
53 // Convertion operator to a std::string
54 // Can be used in a cast operation : (std::string) ZdcRawChannel
55 operator std::string() const {return "ZdcRawChannel::string()";};
56
57private:
58
59 std::vector<float> m_energy;
60 std::vector<float> m_time;
61 std::vector<float> m_chi;
62
63 unsigned int m_size;
64
65 public:
66
67 void setSize(unsigned int i) {
68 m_size = i;
69 m_energy.resize(i,0.);
70 m_time.resize(i,0.);
71 m_chi.resize(i,0.);
72
73 }
74
75
76 void setEnergy(int i, float e) {m_energy[i] = e;}
77 void setTime (int i, float t) {m_time[i] = t;}
78 void setChi (int i, float c) {m_chi[i] = c;}
79
80 unsigned int getSize () const {return m_energy.size();}
81
82 float getEnergy(int i) const {return m_energy[i];}
83 float getTime(int i) const {return m_time[i];}
84 float getChi(int i) const {return m_chi[i];}
85
86};
87
88CLASS_DEF(ZdcRawChannel,92926131,0)
89
90
91#endif //ZDCEVENT_ZDCDIGITS_H
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
void setTime(int i, float t)
void setSize(unsigned int i)
void print(void) const
float getChi(int i) const
float getEnergy(int i) const
std::vector< float > m_chi
std::string whoami(void) const
unsigned int m_size
void setChi(int i, float c)
float getTime(int i) const
std::vector< float > m_time
virtual ~ZdcRawChannel()
void setEnergy(int i, float e)
ZdcRawChannel(const Identifier &id)
unsigned int getSize() const
std::vector< float > m_energy