Belle II Software  release-05-02-19
ARICHFEBoardInfo.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2015 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Manca Mrvar *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 #include <TObject.h>
13 #include <string>
14 #include <TTimeStamp.h>
15 #include <arich/dbobjects/ARICHAsicInfo.h>
16 
17 namespace Belle2 {
26  class ARICHFEBoardInfo: public TObject {
27  public:
28 
33  {
34  for (unsigned i = 0; i < 4; i++) m_asicInfo[i] = NULL;
35  for (unsigned i = 0; i < 4; i++) m_asicsFEB[i] = ("");
36  };
37 
41  ARICHFEBoardInfo(int serial, ARICHAsicInfo** asicInfo, const std::string& asicsFEB, TTimeStamp timeStamp): m_serial(serial),
42  m_timeStamp(timeStamp),
44  {
45  for (unsigned i = 0; i < 4; i++) m_asicInfo[i] = asicInfo[i];
46  for (unsigned i = 0; i < 4; i++) m_asicsFEB[i] = asicsFEB[i];
47  };
48 
52  ~ARICHFEBoardInfo() {};
53 
57  int getFEBoardSerial() const {return m_serial; }
58 
62  void setFEBoardSerial(int serial) {m_serial = serial; }
63 
67  ARICHAsicInfo* getAsicInfo(unsigned int i) const;
68 
72  void setAsicInfo(unsigned int i, ARICHAsicInfo* asic);
73 
77  std::string getAsicPosition(unsigned int i) const;
78 
82  void setAsicPosition(unsigned int i, const std::string& asicsFEB);
83 
87  TTimeStamp getTimeStamp() const {return m_timeStamp; }
88 
92  void setTimeStamp(TTimeStamp timeStamp) {m_timeStamp = timeStamp; }
93 
97  std::string getFEBoardLocation();
98 
102  void setFEBoardLocation(const std::string& currentLocation) {m_currentLocation = currentLocation; }
103 
104  private:
105  int m_serial;
106  ARICHAsicInfo* m_asicInfo[4];
107  std::string m_asicsFEB[4];
108  TTimeStamp m_timeStamp;
109  std::string m_currentLocation;
112  };
114 } // end namespace Belle2
Belle2::ARICHFEBoardInfo::setAsicInfo
void setAsicInfo(unsigned int i, ARICHAsicInfo *asic)
Set Asic Info.
Definition: ARICHFEBoardInfo.cc:24
Belle2::ARICHFEBoardInfo::setFEBoardLocation
void setFEBoardLocation(const std::string &currentLocation)
Set current location.
Definition: ARICHFEBoardInfo.h:110
Belle2::ARICHFEBoardInfo::getTimeStamp
TTimeStamp getTimeStamp() const
Get delivery date.
Definition: ARICHFEBoardInfo.h:95
Belle2::ARICHFEBoardInfo::m_asicsFEB
std::string m_asicsFEB[4]
serial numbers of ASICs on FEB board
Definition: ARICHFEBoardInfo.h:115
Belle2::ARICHFEBoardInfo::m_serial
int m_serial
FrontEndBoard Identfier.
Definition: ARICHFEBoardInfo.h:113
Belle2::ARICHFEBoardInfo::getFEBoardSerial
int getFEBoardSerial() const
Get Front End Board Identifier.
Definition: ARICHFEBoardInfo.h:65
Belle2::ARICHFEBoardInfo::setFEBoardSerial
void setFEBoardSerial(int serial)
Set Front End Board Identifier.
Definition: ARICHFEBoardInfo.h:70
Belle2::ARICHFEBoardInfo::m_asicInfo
ARICHAsicInfo * m_asicInfo[4]
id of the i-th chip in the FEB
Definition: ARICHFEBoardInfo.h:114
Belle2::ARICHFEBoardInfo::~ARICHFEBoardInfo
~ARICHFEBoardInfo()
Destructor.
Definition: ARICHFEBoardInfo.h:60
Belle2::ARICHFEBoardInfo::m_timeStamp
TTimeStamp m_timeStamp
Delivery Date.
Definition: ARICHFEBoardInfo.h:116
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::ARICHFEBoardInfo::m_currentLocation
std::string m_currentLocation
Current Location of the FEB.
Definition: ARICHFEBoardInfo.h:117
Belle2::ARICHFEBoardInfo::ClassDef
ClassDef(ARICHFEBoardInfo, 2)
ClassDef.
Belle2::ARICHFEBoardInfo::setAsicPosition
void setAsicPosition(unsigned int i, const std::string &asicsFEB)
Set Asic position.
Definition: ARICHFEBoardInfo.cc:36
Belle2::ARICHFEBoardInfo::ARICHFEBoardInfo
ARICHFEBoardInfo()
Default constructor.
Definition: ARICHFEBoardInfo.h:40
Belle2::ARICHFEBoardInfo::setTimeStamp
void setTimeStamp(TTimeStamp timeStamp)
Set delivery date.
Definition: ARICHFEBoardInfo.h:100
Belle2::ARICHAsicInfo
Tested ASIC chips.
Definition: ARICHAsicInfo.h:35
Belle2::ARICHFEBoardInfo::getFEBoardLocation
std::string getFEBoardLocation()
Get current location.
Belle2::ARICHFEBoardInfo::getAsicInfo
ARICHAsicInfo * getAsicInfo(unsigned int i) const
Get Asic Info.
Definition: ARICHFEBoardInfo.cc:17
Belle2::ARICHFEBoardInfo::getAsicPosition
std::string getAsicPosition(unsigned int i) const
Get Asic position.
Definition: ARICHFEBoardInfo.cc:29