ATLAS Offline Software
CaloRecoStatus.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 #ifndef CALOEVENT_CALORECOSTATUS_H
6 #define CALOEVENT_CALORECOSTATUS_H
7 
8 
9 #include <vector>
10 
12 {
13  public:
14 
16  typedef unsigned int store_type;
17 
37  {
38  TAGGEDEM = 0x00000001, /*< tagged as electromagnetic object */
39  TAGGEDHAD = 0x00000002, /*< tagged as hadronic object */
40  TAGGEDMUON = 0x00000004, /*< tagged as muonic cluster */
41  TAGGEDUNKNOWN = 0x00000008, /*< tagged as unknown */
42  CALIBRATED = 0x10000000, /*< cluster calibrated (non-emscale) */
43  CALIBRATEDLHC = 0x10000010, /*< cluster calibrated local had */
44  CALIBRATEDALT = 0x10000020, /*< cluster calibrated alternatively */
45  UNKNOWNSTATUS = 0x00000000 /*< unknown status */
46  };
48  CaloRecoStatus(StatusIndicator statusIndicator = UNKNOWNSTATUS);
51  virtual ~CaloRecoStatus();
52 
57  virtual void setStatus(const StatusIndicator& statusIndicator);
65  virtual bool checkStatus(const StatusIndicator& statusIndicator) const;
67  // virtual const StatusIndicator & getStatusWord() const;
68  virtual const store_type& getStatusWord() const;
75  virtual bool getStatus(std::vector<CaloRecoStatus::StatusIndicator>&
76  pStatusList) const;
80  virtual void resetStatus();
81  virtual void resetStatus(const StatusIndicator& statusIndicator);
82 
83 
84  private:
85 
87  // StatusIndicator m_status;
89 
90 };
97  : m_status((store_type)aStatus)
98 { }
99 
101  : m_status(aStatus)
102 { }
103 
105 { }
106 
107 inline void CaloRecoStatus::setStatus(const StatusIndicator& aStatus)
108 {
109  m_status = m_status | (store_type)aStatus;
110 }
111 
113 {
114  return m_status;
115 }
116 
117 inline bool CaloRecoStatus::checkStatus(const StatusIndicator& aStatus) const
118 {
119  return ( m_status & (store_type)aStatus ) == (store_type)aStatus;
120 }
121 
123 {
125 }
126 
127 inline void CaloRecoStatus::resetStatus(const StatusIndicator& aStatus)
128 {
129  m_status = m_status & ~((store_type)aStatus);
130 }
131 #endif
SGTest::store
TestStore store
Definition: TestStore.cxx:23
CaloRecoStatus::CALIBRATEDLHC
@ CALIBRATEDLHC
Definition: CaloRecoStatus.h:43
CaloRecoStatus::resetStatus
virtual void resetStatus()
reset reconstruction status
Definition: CaloRecoStatus.h:122
CaloRecoStatus::store_type
unsigned int store_type
Internal store type.
Definition: CaloRecoStatus.h:16
CaloRecoStatus::StatusIndicator
StatusIndicator
reconstruction status word
Definition: CaloRecoStatus.h:37
CaloRecoStatus::TAGGEDUNKNOWN
@ TAGGEDUNKNOWN
Definition: CaloRecoStatus.h:41
CaloRecoStatus::setStatus
virtual void setStatus(const StatusIndicator &statusIndicator)
Set status.
Definition: CaloRecoStatus.h:107
CaloRecoStatus::CALIBRATEDALT
@ CALIBRATEDALT
Definition: CaloRecoStatus.h:44
CaloRecoStatus::~CaloRecoStatus
virtual ~CaloRecoStatus()
Destructor.
Definition: CaloRecoStatus.h:104
CaloRecoStatus::TAGGEDMUON
@ TAGGEDMUON
Definition: CaloRecoStatus.h:40
CaloRecoStatus::CaloRecoStatus
CaloRecoStatus(StatusIndicator statusIndicator=UNKNOWNSTATUS)
Default constructor.
Definition: CaloRecoStatus.h:96
CaloRecoStatus::m_status
store_type m_status
Status store.
Definition: CaloRecoStatus.h:88
CaloRecoStatus::getStatus
virtual bool getStatus(std::vector< CaloRecoStatus::StatusIndicator > &pStatusList) const
retrieve all status indicators
Definition: CaloRecoStatus.cxx:7
CaloRecoStatus::checkStatus
virtual bool checkStatus(const StatusIndicator &statusIndicator) const
Check status.
Definition: CaloRecoStatus.h:117
CaloRecoStatus::CALIBRATED
@ CALIBRATED
Definition: CaloRecoStatus.h:42
CaloRecoStatus::TAGGEDEM
@ TAGGEDEM
Definition: CaloRecoStatus.h:38
CaloRecoStatus::getStatusWord
virtual const store_type & getStatusWord() const
retrieve the entire status word
Definition: CaloRecoStatus.h:112
CaloRecoStatus::UNKNOWNSTATUS
@ UNKNOWNSTATUS
Definition: CaloRecoStatus.h:45
CaloRecoStatus::TAGGEDHAD
@ TAGGEDHAD
Definition: CaloRecoStatus.h:39
CaloRecoStatus
reconstruction status indicator
Definition: CaloRecoStatus.h:12