ATLAS Offline Software
Loading...
Searching...
No Matches
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):
20
40
41public:
44 m_CTPResultWord.reserve( 8 );
45 }
46
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
75 uint32_t getTriggerTypeWord() const { return m_triggerTypeWord; }
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
100 void setTriggerTypeWord( uint32_t word ) { m_triggerTypeWord = word; }
101
103 const std::string dump() const;
104
105private:
107 std::vector< uint32_t > m_CTPResultWord;
109
110}; // class CTP_Decision
111
112CLASS_DEF( CTP_Decision, 123529088, 1 )
113
114#endif // ANALYSISTRIGGEREVENT_CTP_DECISION_H
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Legacy data class representing the LVL1 CTP trigger decision.
virtual ~CTP_Decision()
Destructor.
void setItem(const items_type::value_type &item)
Set a fired LVL1 item.
bool isAccepted() const
Test if event was accepted at LVL1.
std::vector< std::string > items_type
Type storing the names of the passed LVL1 items.
void setWords(const std::vector< uint32_t > &words)
Set vector of CTP trigger words.
uint32_t getWord4() const
get 5.
std::vector< uint32_t > m_CTPResultWord
vector of CTP trigger words
uint32_t getWord7() const
get 8.
void setWord(const unsigned int i, const uint32_t word)
Set one CTP trigger word.
uint32_t getWord(const unsigned int i) const
Get one CTP trigger word.
void setWord1(const uint32_t word)
set 2.
uint32_t getWord3() const
get 4.
void setWord7(const uint32_t word)
set 8.
uint32_t getTriggerTypeWord() const
Get trigger type word.
uint32_t getWord6() const
get 7.
CTP_Decision()
Default (empty) constructor.
void setTriggerTypeWord(uint32_t word)
Set trigger type word.
const std::string dump() const
Dump raw content of object to string.
void setWord3(const uint32_t word)
set 4.
void setWord2(const uint32_t word)
set 3.
uint32_t getWord0() const
get 1.
void setWord5(const uint32_t word)
set 6.
items_type m_items
vector of fired LVL1 items
void setWord0(const uint32_t word)
set 1.
void setWord4(const uint32_t word)
set 5.
const items_type & getItems() const
Get a vector of fired LVL1 items.
uint32_t getWord1() const
get 2.
void setWord6(const uint32_t word)
set 7.
void setItems(const items_type &items)
Set vector of fired LVL1 items.
uint32_t m_triggerTypeWord
LVL1 trigger type word.
const std::vector< uint32_t > & getWords() const
Get vector of CTP trigger words.
uint32_t getWord5() const
get 6.
uint32_t getWord2() const
get 3.