ATLAS Offline Software
Lvl1Result.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #pragma once
6 // -*- C++ -*-
7 /**********************************************************************************
8  * @Project: HLT
9  * @Package: TrigSteeringEvent
10  * @class : Lvl1Result
11  *
12  * @brief container for compact version of the results of all three trigger levels
13  *
14  * @author Nicolas Berger <Nicolas.Berger@cern.ch> - CERN
15  * @author Till Eifert <Till.Eifert@cern.ch> - U. of Geneva, Switzerland
16  * @author Ricardo Goncalo <Jose.Goncalo@cern.ch> - Royal Holloway, U. of London
17  *
18  * File and Version Information:
19  * $Id: Lvl1Result.h,v 1.8 2008-05-15 19:17:06 eifert Exp $
20  **********************************************************************************/
21 
22 #ifndef TRIGSTEERINGEVENT_Lvl1Result_H
23 #define TRIGSTEERINGEVENT_Lvl1Result_H
24 
25 #include <stdint.h>
26 #include "xAODCore/CLASS_DEF.h"
28 
29 namespace LVL1CTP {
30 
31  class Lvl1Result
32  {
33 
34  public:
35 
36  // default constructor
37  Lvl1Result(bool config = false) : m_configured(config) { }
38 
39  bool isConfigured() const { return m_configured; }
40  bool isAccepted() const;
41 
42  bool anyActiveL1ItemAfterVeto() const;
43 
44  bool isPassedBeforePrescale(unsigned int item) const;
45  bool isPassedAfterPrescale(unsigned int item) const;
46  bool isPassedAfterVeto(unsigned int item) const;
47  bool isPassedRaw(unsigned int item) const;
48 
49  bool isPrescaled(unsigned int item) const;
50  bool isVeto(unsigned int item) const;
51 
52  unsigned int nItems() const { return m_l1_itemsTAV.size()*32; }
53 
54  const std::vector<uint32_t>& itemsPassed() const { return m_l1_itemsTAV; }
55  const std::vector<uint32_t>& itemsBeforePrescale() const { return m_l1_itemsTBP; }
56  const std::vector<uint32_t>& itemsAfterPrescale() const { return m_l1_itemsTAP; }
57  const std::vector<uint32_t>& itemsAfterVeto() const { return m_l1_itemsTAV; }
58  // const std::vector<uint32_t>& itemsPrescaled() const { return m_l1_itemsPrescaled; }
59 
60  std::vector<uint32_t>& itemsPassed() { return m_l1_itemsTAV; }
61  std::vector<uint32_t>& itemsBeforePrescale() { return m_l1_itemsTBP; }
62  std::vector<uint32_t>& itemsAfterPrescale() { return m_l1_itemsTAP; }
63  std::vector<uint32_t>& itemsAfterVeto() { return m_l1_itemsTAV; }
64 
65 
66  private:
67 
69 
70  /* max 256 LVL1 items => 8 words */
71  // std::vector<uint32_t> m_l1_items; //!< Trigger level 1, Lvl1 items (=chains)
72  // std::vector<uint32_t> m_l1_itemsPrescaled; //!< Trigger level 1, Lvl1 items (=chains) after prescale
73  std::vector<uint32_t> m_l1_itemsTBP;
74  std::vector<uint32_t> m_l1_itemsTAP;
75  std::vector<uint32_t> m_l1_itemsTAV;
76  };
77 
78 } // end of namespace
79 
80 
81 CLASS_DEF( LVL1CTP::Lvl1Result, 21091893, 1)
82 
83 #endif
LVL1CTP::Lvl1Result::itemsPassed
std::vector< uint32_t > & itemsPassed()
Definition: Lvl1Result.h:60
LVL1CTP::Lvl1Result::itemsPassed
const std::vector< uint32_t > & itemsPassed() const
Definition: Lvl1Result.h:54
LVL1CTP::Lvl1Result::nItems
unsigned int nItems() const
Definition: Lvl1Result.h:52
LVL1CTP::Lvl1Result::isVeto
bool isVeto(unsigned int item) const
item isPassedAfterPrescale and not isPassedAfterVeto
Definition: Lvl1Result.cxx:58
LVL1CTP::Lvl1Result::isConfigured
bool isConfigured() const
is LVL1 configured ?
Definition: Lvl1Result.h:39
LVL1CTP::Lvl1Result::Lvl1Result
Lvl1Result(bool config=false)
Definition: Lvl1Result.h:37
LVL1CTP::Lvl1Result::m_l1_itemsTAP
std::vector< uint32_t > m_l1_itemsTAP
Trigger (level 1 items) After Prescale.
Definition: Lvl1Result.h:74
LVL1CTP::Lvl1Result::isPassedRaw
bool isPassedRaw(unsigned int item) const
same as isPassedBeforePrescale
Definition: Lvl1Result.cxx:47
LVL1CTP::Lvl1Result::anyActiveL1ItemAfterVeto
bool anyActiveL1ItemAfterVeto() const
any LVL1 item passed after prescale, veto ?
Definition: Lvl1Result.cxx:9
config
Definition: PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py:1
LVL1CTP::Lvl1Result::itemsBeforePrescale
const std::vector< uint32_t > & itemsBeforePrescale() const
Definition: Lvl1Result.h:55
LVL1CTP::Lvl1Result::itemsAfterVeto
const std::vector< uint32_t > & itemsAfterVeto() const
Definition: Lvl1Result.h:57
Lvl1Item.h
LVL1CTP::Lvl1Result::itemsAfterVeto
std::vector< uint32_t > & itemsAfterVeto()
Definition: Lvl1Result.h:63
LVL1CTP::Lvl1Result::isPassedAfterPrescale
bool isPassedAfterPrescale(unsigned int item) const
after prescale
Definition: Lvl1Result.cxx:32
LVL1CTP::Lvl1Result::isAccepted
bool isAccepted() const
final LVL1 decision && isConfigured
Definition: Lvl1Result.cxx:19
LVL1CTP::Lvl1Result::m_configured
bool m_configured
Definition: Lvl1Result.h:68
LVL1CTP::Lvl1Result::itemsAfterPrescale
std::vector< uint32_t > & itemsAfterPrescale()
Definition: Lvl1Result.h:62
LVL1CTP::Lvl1Result
Definition: Lvl1Result.h:32
LVL1CTP::Lvl1Result::isPrescaled
bool isPrescaled(unsigned int item) const
item isPassedBeforePrescale and not isPassedAfterPrescale
Definition: Lvl1Result.cxx:53
item
Definition: ItemListSvc.h:43
CLASS_DEF.h
File providing the different SG_BASE macros.
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
LVL1CTP::Lvl1Result::isPassedBeforePrescale
bool isPassedBeforePrescale(unsigned int item) const
raw L1 item
Definition: Lvl1Result.cxx:25
LVL1CTP::Lvl1Result::m_l1_itemsTAV
std::vector< uint32_t > m_l1_itemsTAV
Trigger (level 1 items) After Veto (==final L1 decision)
Definition: Lvl1Result.h:75
LVL1CTP
Definition: Lvl1ResultAccessTool.h:20
LVL1CTP::Lvl1Result::itemsBeforePrescale
std::vector< uint32_t > & itemsBeforePrescale()
Definition: Lvl1Result.h:61
LVL1CTP::Lvl1Result::m_l1_itemsTBP
std::vector< uint32_t > m_l1_itemsTBP
Trigger (level 1 items) Before Prescale.
Definition: Lvl1Result.h:73
LVL1CTP::Lvl1Result::isPassedAfterVeto
bool isPassedAfterVeto(unsigned int item) const
final L1 decision for this item
Definition: Lvl1Result.cxx:39
LVL1CTP::Lvl1Result::itemsAfterPrescale
const std::vector< uint32_t > & itemsAfterPrescale() const
Definition: Lvl1Result.h:56