ATLAS Offline Software
CTP_Decision.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // $Id: CTP_Decision.h,v 1.10 2008-05-20 16:59:50 efeld Exp $
8 #ifndef ANALYSISTRIGGEREVENT_CTP_DECISION_H
9 #define ANALYSISTRIGGEREVENT_CTP_DECISION_H
10 
11 // Standard include(s):
12 #include <inttypes.h>
13 
14 // STL include(s):
15 #include <string>
16 #include <vector>
17 
18 // Gaudi/Athena include(s):
19 #include "AthenaKernel/CLASS_DEF.h"
20 
39 class CTP_Decision {
40 
41 public:
44  m_CTPResultWord.reserve( 8 );
45  }
47  virtual ~CTP_Decision() {}
48 
50  typedef std::vector< std::string > items_type;
51 
53  bool isAccepted() const { return m_items.size(); }
54 
56  const items_type& getItems() const { return m_items; }
57 
59  const std::vector< uint32_t >& getWords() const { return m_CTPResultWord; }
61  uint32_t getWord( const unsigned int i ) const {
62  return m_CTPResultWord.size() > i ? m_CTPResultWord[ i ] : 0;
63  }
64 
65  uint32_t getWord0() const { return getWord( 0 ); }
66  uint32_t getWord1() const { return getWord( 1 ); }
67  uint32_t getWord2() const { return getWord( 2 ); }
68  uint32_t getWord3() const { return getWord( 3 ); }
69  uint32_t getWord4() const { return getWord( 4 ); }
70  uint32_t getWord5() const { return getWord( 5 ); }
71  uint32_t getWord6() const { return getWord( 6 ); }
72  uint32_t getWord7() const { return getWord( 7 ); }
73 
76 
78  void setItems( const items_type& items ) { m_items = items; }
80  void setItem( const items_type::value_type &item ) { m_items.push_back(item); }
81 
83  void setWords( const std::vector< uint32_t >& words ) { m_CTPResultWord = words; }
85  void setWord( const unsigned int i, const uint32_t word ) {
86  if( m_CTPResultWord.size() <= i ) m_CTPResultWord.resize( i + 1 );
87  m_CTPResultWord[ i ] = word;
88  }
89 
90  void setWord0( const uint32_t word ) { setWord( 0, word ); }
91  void setWord1( const uint32_t word ) { setWord( 1, word ); }
92  void setWord2( const uint32_t word ) { setWord( 2, word ); }
93  void setWord3( const uint32_t word ) { setWord( 3, word ); }
94  void setWord4( const uint32_t word ) { setWord( 4, word ); }
95  void setWord5( const uint32_t word ) { setWord( 5, word ); }
96  void setWord6( const uint32_t word ) { setWord( 6, word ); }
97  void setWord7( const uint32_t word ) { setWord( 7, word ); }
98 
101 
103  const std::string dump() const;
104 
105 private:
107  std::vector< uint32_t > m_CTPResultWord;
109 
110 }; // class CTP_Decision
111 
112 CLASS_DEF( CTP_Decision, 123529088, 1 )
113 
114 #endif // ANALYSISTRIGGEREVENT_CTP_DECISION_H
CTP_Decision::setWords
void setWords(const std::vector< uint32_t > &words)
Set vector of CTP trigger words.
Definition: CTP_Decision.h:83
CTP_Decision::setWord4
void setWord4(const uint32_t word)
set 5.
Definition: CTP_Decision.h:94
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
CTP_Decision::getWord1
uint32_t getWord1() const
get 2.
Definition: CTP_Decision.h:66
CTP_Decision::m_triggerTypeWord
uint32_t m_triggerTypeWord
LVL1 trigger type word.
Definition: CTP_Decision.h:108
CTP_Decision::isAccepted
bool isAccepted() const
Test if event was accepted at LVL1.
Definition: CTP_Decision.h:53
CTP_Decision::setItems
void setItems(const items_type &items)
Set vector of fired LVL1 items.
Definition: CTP_Decision.h:78
CTP_Decision::m_CTPResultWord
std::vector< uint32_t > m_CTPResultWord
vector of CTP trigger words
Definition: CTP_Decision.h:107
CTP_Decision::dump
const std::string dump() const
Dump raw content of object to string.
Definition: CTP_Decision.cxx:14
CTP_Decision::items_type
std::vector< std::string > items_type
Type storing the names of the passed LVL1 items.
Definition: CTP_Decision.h:50
CTP_Decision::setWord5
void setWord5(const uint32_t word)
set 6.
Definition: CTP_Decision.h:95
CTP_Decision::getWords
const std::vector< uint32_t > & getWords() const
Get vector of CTP trigger words.
Definition: CTP_Decision.h:59
CTP_Decision::setItem
void setItem(const items_type::value_type &item)
Set a fired LVL1 item.
Definition: CTP_Decision.h:80
CTP_Decision
Legacy data class representing the LVL1 CTP trigger decision.
Definition: CTP_Decision.h:39
CTP_Decision::getWord2
uint32_t getWord2() const
get 3.
Definition: CTP_Decision.h:67
CTP_Decision::setWord3
void setWord3(const uint32_t word)
set 4.
Definition: CTP_Decision.h:93
lumiFormat.i
int i
Definition: lumiFormat.py:85
CTP_Decision::getWord4
uint32_t getWord4() const
get 5.
Definition: CTP_Decision.h:69
CTP_Decision::~CTP_Decision
virtual ~CTP_Decision()
Destructor.
Definition: CTP_Decision.h:47
CTP_Decision::getWord6
uint32_t getWord6() const
get 7.
Definition: CTP_Decision.h:71
CTP_Decision::getWord3
uint32_t getWord3() const
get 4.
Definition: CTP_Decision.h:68
CTP_Decision::setWord2
void setWord2(const uint32_t word)
set 3.
Definition: CTP_Decision.h:92
CTP_Decision::setWord
void setWord(const unsigned int i, const uint32_t word)
Set one CTP trigger word.
Definition: CTP_Decision.h:85
CTP_Decision::setWord6
void setWord6(const uint32_t word)
set 7.
Definition: CTP_Decision.h:96
CTP_Decision::getTriggerTypeWord
uint32_t getTriggerTypeWord() const
Get trigger type word.
Definition: CTP_Decision.h:75
CTP_Decision::setWord0
void setWord0(const uint32_t word)
set 1.
Definition: CTP_Decision.h:90
CTP_Decision::getWord5
uint32_t getWord5() const
get 6.
Definition: CTP_Decision.h:70
CTP_Decision::setWord1
void setWord1(const uint32_t word)
set 2.
Definition: CTP_Decision.h:91
TrigJetMonitorAlgorithm.items
items
Definition: TrigJetMonitorAlgorithm.py:79
item
Definition: ItemListSvc.h:43
CTP_Decision::getItems
const items_type & getItems() const
Get a vector of fired LVL1 items.
Definition: CTP_Decision.h:56
CTP_Decision::m_items
items_type m_items
vector of fired LVL1 items
Definition: CTP_Decision.h:106
CTP_Decision::setTriggerTypeWord
void setTriggerTypeWord(uint32_t word)
Set trigger type word.
Definition: CTP_Decision.h:100
CTP_Decision::getWord0
uint32_t getWord0() const
get 1.
Definition: CTP_Decision.h:65
CTP_Decision::setWord7
void setWord7(const uint32_t word)
set 8.
Definition: CTP_Decision.h:97
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
CTP_Decision::getWord7
uint32_t getWord7() const
get 8.
Definition: CTP_Decision.h:72
CTP_Decision::CTP_Decision
CTP_Decision()
Default (empty) constructor.
Definition: CTP_Decision.h:43
checkFileSG.words
words
Definition: checkFileSG.py:76
CLASS_DEF.h
macros to associate a CLID to a type
CTP_Decision::getWord
uint32_t getWord(const unsigned int i) const
Get one CTP trigger word.
Definition: CTP_Decision.h:61