ATLAS Offline Software
Loading...
Searching...
No Matches
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
10// //
11// Trigger pattern for an event.
12// //
14
15#include "GaudiKernel/MsgStream.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
101CLASS_DEF( TBTriggerPatternUnit , 214386007 , 1 )
102#endif
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 setTriggerWord(unsigned int word)
unsigned int getTriggerWord() const
friend class TBTriggerPatternUnitCnv_p1
const std::vector< bool > & getTriggers() const
std::vector< bool > m_triggers
bool getBit(unsigned int i) const