ATLAS Offline Software
TBTriggerPatternUnit.h
Go to the documentation of this file.
1 //Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef TBEVENT_TBTRIGGERPATTERNUNIT_H
8 #define TBEVENT_TBTRIGGERPATTERNUNIT_H
9 // //
11 // Trigger pattern for an event.
12 // //
14 
15 #include "GaudiKernel/MsgStream.h"
16 #include "AthenaKernel/CLASS_DEF.h"
17 
18 
19 
20 
21 #include <vector>
22 
23 
24 
25 
27 {
28  public:
29 
30 
32  // Constructors and Destructor //
34 
36 
37 
39 
41  // Data Manipulation //
43 
44  // void setBit(int i,bool status){if(i<m_triggers.size()) m_triggers[i]=status;}
45  void setTriggerWord(unsigned int word);
46 
47  bool getBit(unsigned int i) const {return i<m_triggers.size()? m_triggers[i]:false ;}
48  const std::vector<bool>& getTriggers() const { return m_triggers; }
49 
50  unsigned int getTriggerWord() const {return m_triggerWord;}
51 
52  // copied from Peter Loch code :
53 
54  inline bool isParticle() const
55  { return ( m_triggerWord & 0x00000100 ) != 0; }
56  inline bool isRandom() const
57  { return ( m_triggerWord & 0x00000200 ) != 0; }
58  inline bool isPedestal() const { return this->isRandom(); }
59  inline bool isMonitor() const
60  { return ( m_triggerWord & 0x00000400 ) != 0; }
61  inline bool isCalib() const { return this->isMonitor(); }
62 
63  // specifics
64  inline bool hasS1() const
65  { return ( m_triggerWord & 0x00000001 ) != 0; }
66  inline bool hasS2() const
67  { return ( m_triggerWord & 0x00000002 ) != 0; }
68  inline bool hasS3() const
69  { return ( m_triggerWord & 0x00000004 ) != 0; }
70  inline bool hasVeto() const
71  { return ( m_triggerWord & 0x00000008 ) != 0; }
72  inline bool hasTCFront() const
73  { return ( m_triggerWord & 0x00000010 ) != 0; }
74  bool hasTCBack() const
75  { return ( m_triggerWord & 0x00000020 ) != 0; }
76  inline bool hasMuon() const
77  { return ( m_triggerWord & 0x00000040 ) != 0; }
78  inline bool hasFibre() const
79  { return ( m_triggerWord & 0x00000080 ) != 0; }
80  inline bool hasLatePileUp() const
81  { return ( m_triggerWord & 0x00000800 ) != 0; }
82  inline bool hasEarlyPileUp() const
83  { return ( m_triggerWord & 0x00001000 ) != 0; }
84  inline bool hasCedar6of8() const
85  { return ( m_triggerWord & 0x00002000 ) != 0; }
86  inline bool hasCedar7of8() const
87  { return ( m_triggerWord & 0x00004000 ) != 0; }
88  inline bool hasCedar8of8() const
89  { return ( m_triggerWord & 0x00008000 ) != 0; }
90 
91 
92 
93  private:
95 
96  unsigned int m_triggerWord;
97  std::vector<bool> m_triggers;
98 };
99 
100 
101 CLASS_DEF( TBTriggerPatternUnit , 214386007 , 1 )
102 #endif
TBTriggerPatternUnit::hasTCFront
bool hasTCFront() const
Definition: TBTriggerPatternUnit.h:72
TBTriggerPatternUnit::TBTriggerPatternUnit
TBTriggerPatternUnit()
Definition: TBTriggerPatternUnit.cxx:11
TBTriggerPatternUnit::isRandom
bool isRandom() const
Definition: TBTriggerPatternUnit.h:56
TBTriggerPatternUnit::~TBTriggerPatternUnit
~TBTriggerPatternUnit()
Definition: TBTriggerPatternUnit.cxx:18
TBTriggerPatternUnit::hasTCBack
bool hasTCBack() const
Definition: TBTriggerPatternUnit.h:74
TBTriggerPatternUnit::hasS3
bool hasS3() const
Definition: TBTriggerPatternUnit.h:68
TBTriggerPatternUnit::getTriggerWord
unsigned int getTriggerWord() const
Definition: TBTriggerPatternUnit.h:50
TBTriggerPatternUnit::hasS1
bool hasS1() const
Definition: TBTriggerPatternUnit.h:64
TBTriggerPatternUnit::isParticle
bool isParticle() const
Definition: TBTriggerPatternUnit.h:54
TBTriggerPatternUnit::hasFibre
bool hasFibre() const
Definition: TBTriggerPatternUnit.h:78
TBTriggerPatternUnit::hasEarlyPileUp
bool hasEarlyPileUp() const
Definition: TBTriggerPatternUnit.h:82
TBTriggerPatternUnit::hasCedar8of8
bool hasCedar8of8() const
Definition: TBTriggerPatternUnit.h:88
TBTriggerPatternUnit::hasVeto
bool hasVeto() const
Definition: TBTriggerPatternUnit.h:70
lumiFormat.i
int i
Definition: lumiFormat.py:85
TBTriggerPatternUnit::getTriggers
const std::vector< bool > & getTriggers() const
Definition: TBTriggerPatternUnit.h:48
TBTriggerPatternUnit::hasS2
bool hasS2() const
Definition: TBTriggerPatternUnit.h:66
TBTriggerPatternUnit::isMonitor
bool isMonitor() const
Definition: TBTriggerPatternUnit.h:59
TBTriggerPatternUnit::hasMuon
bool hasMuon() const
Definition: TBTriggerPatternUnit.h:76
TBTriggerPatternUnit::hasCedar7of8
bool hasCedar7of8() const
Definition: TBTriggerPatternUnit.h:86
TBTriggerPatternUnit::m_triggerWord
unsigned int m_triggerWord
Definition: TBTriggerPatternUnit.h:96
TBTriggerPatternUnit::setTriggerWord
void setTriggerWord(unsigned int word)
Definition: TBTriggerPatternUnit.cxx:26
TBTriggerPatternUnit::m_triggers
std::vector< bool > m_triggers
Definition: TBTriggerPatternUnit.h:97
TBTriggerPatternUnitCnv_p1
Definition: TBTriggerPatternUnitCnv_p1.h:22
TBTriggerPatternUnit::hasCedar6of8
bool hasCedar6of8() const
Definition: TBTriggerPatternUnit.h:84
TBTriggerPatternUnit::isCalib
bool isCalib() const
Definition: TBTriggerPatternUnit.h:61
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
TBTriggerPatternUnit::hasLatePileUp
bool hasLatePileUp() const
Definition: TBTriggerPatternUnit.h:80
TBTriggerPatternUnit::getBit
bool getBit(unsigned int i) const
Definition: TBTriggerPatternUnit.h:47
TBTriggerPatternUnit
Definition: TBTriggerPatternUnit.h:27
CLASS_DEF.h
macros to associate a CLID to a type
TBTriggerPatternUnit::isPedestal
bool isPedestal() const
Definition: TBTriggerPatternUnit.h:58