ATLAS Offline Software
TBMWPCRaw.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TBEVENT_TBMWPCRAW_H
6 #define TBEVENT_TBMWPCRAW_H
7 // //
9 // Raw data class for Beam Projection Chambers (MWPC with time //
10 // delay readout). Actually each instance describes a MWPC plane. //
11 // //
13 
14 #include <string>
15 #include <vector>
16 #include "AthenaKernel/CLASS_DEF.h"
18 #include "TBEvent/TBBeamDetector.h"
19 
20 
21 
22 class TBMWPCRaw : public TBBeamDetector
23 {
24  public:
25 
26  typedef unsigned short signal_type;
27  typedef unsigned int source_type;
28 
30  // Constructors and Destructor //
32 
33  TBMWPCRaw();
34  TBMWPCRaw(const std::string& thisBPCName);
35  ~TBMWPCRaw();
36 
38  // Data Manipulation //
40 
41  // signal type definition
42  enum SignalType {
44  };
45 
46  // set signal //////////////////////////////////////////////////////
47  // void setSignal(source_type theSignalType, signal_type theSignal);
48 
49  // set/reset overflow for each signal
50 /* void setOverflow(source_type theSignalType); */
51 /* void setOverflow(source_type theSignalType, bool overflow); */
52 /* void resetOverflow(source_type theSignalType); */
53 
54 
56  inline void setCwireno(const std::vector<int>& cwireno) {
57  m_cwireno = cwireno;
58  }
59  inline void addCwireno(int cwire){
60  m_cwireno.push_back(cwire);
61  }
62 
64  inline void setNwires(const std::vector<int>& nwires) {
65  m_nwires = nwires;
66  }
67  inline void addNwires(int nwire){
68  m_nwires.push_back(nwire);
69  }
70 
71  // set X or Y
72  inline void setXchambers(bool isX){m_isX=isX;}
73 
74 
75  // set global overflow
76  virtual void setOverflow();
77  virtual void setOverflow(bool overflow);
78  virtual void resetOverflow();
79 
80 
81  // access signal //////////////////////////////////////////////////
82 
83 
85  inline const std::vector<int> & getCwireno()
86  const { return m_cwireno; }
87 
89  inline const std::vector<int> & getNwires()
90  const { return m_nwires; }
91 
92 
93 
94  inline bool isX() const {return m_isX;}
95 
96  // access overflow for each signal type
97  // bool isOverflow(source_type theSignalType) const;
98 
99  // data class reset
100  void reset();
101 
102  private:
103 
105  // Private Data //
107 
108  // std::vector<signal_type> m_signals;
109  std::vector<bool> m_overflowType;
110 
111  // Variables used in 2002 HEC+EMEC TB copied from LArTBeamChambers :
112  std::vector<int> m_cwireno;
113  std::vector<int> m_nwires;
117  bool m_isX;
118 
120 
122  // Private Data Manipulation //
124 
125  // void setUpStores();
126 
127 };
128 
129 CLASS_DEF( TBMWPCRaw , 239046776 , 1 )
130 
131 #endif
132 
133 
TBBeamDetector.h
TBMWPCRaw::resetOverflow
virtual void resetOverflow()
Definition: TBMWPCRaw.cxx:89
TBMWPCRaw::addNwires
void addNwires(int nwire)
Definition: TBMWPCRaw.h:67
TBMWPCRaw::m_nwires
std::vector< int > m_nwires
the number of wires a cluster
Definition: TBMWPCRaw.h:113
TBMWPCRaw::setOverflow
virtual void setOverflow()
Definition: TBMWPCRaw.cxx:84
TBMWPCRaw
Definition: TBMWPCRaw.h:23
TBMWPCRaw::m_overflowSetFlag
bool m_overflowSetFlag
Definition: TBMWPCRaw.h:119
TBMWPCRaw::tdcUp
@ tdcUp
Definition: TBMWPCRaw.h:43
TBMWPCRaw::isX
bool isX() const
Definition: TBMWPCRaw.h:94
TBMWPCRaw::tdcLeft
@ tdcLeft
Definition: TBMWPCRaw.h:43
TBMWPCRaw::SignalType
SignalType
Definition: TBMWPCRaw.h:42
TBMWPCRaw::tdcRight
@ tdcRight
Definition: TBMWPCRaw.h:43
TBMWPCRaw::setNwires
void setNwires(const std::vector< int > &nwires)
Set the collection of the number of wires in a cluster.
Definition: TBMWPCRaw.h:64
TBMWPCRaw::reset
void reset()
Definition: TBMWPCRaw.cxx:41
TBMWPCRaw::signal_type
unsigned short signal_type
Definition: TBMWPCRaw.h:26
TBMWPCRaw::addCwireno
void addCwireno(int cwire)
Definition: TBMWPCRaw.h:59
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
TBMWPCRaw::m_cwireno
std::vector< int > m_cwireno
center wire number
Definition: TBMWPCRaw.h:112
TBMWPCRaw::TBMWPCRaw
TBMWPCRaw()
Definition: TBMWPCRaw.cxx:17
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
TBMWPCRaw::setCwireno
void setCwireno(const std::vector< int > &cwireno)
Set the collection of the center wire number.
Definition: TBMWPCRaw.h:56
TBMWPCRaw::getCwireno
const std::vector< int > & getCwireno() const
Get the collection of the center wire number of a cluster.
Definition: TBMWPCRaw.h:85
TBMWPCRaw::getNwires
const std::vector< int > & getNwires() const
Get the collection of the number of wire of a cluster.
Definition: TBMWPCRaw.h:89
TBMWPCRaw::tdcDown
@ tdcDown
Definition: TBMWPCRaw.h:43
TBMWPCRaw::setXchambers
void setXchambers(bool isX)
Definition: TBMWPCRaw.h:72
TBBeamDetector
Definition: TBBeamDetector.h:16
CLASS_DEF.h
macros to associate a CLID to a type
TBMWPCRaw::source_type
unsigned int source_type
Definition: TBMWPCRaw.h:27
TBMWPCRaw::m_isX
bool m_isX
Definition: TBMWPCRaw.h:117
TBMWPCRaw::m_overflowType
std::vector< bool > m_overflowType
Definition: TBMWPCRaw.h:109
TBMWPCRaw::~TBMWPCRaw
~TBMWPCRaw()
Definition: TBMWPCRaw.cxx:34