ATLAS Offline Software
Lvl1Item.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 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_Lvl1Item_H
23 #define TRIGSTEERINGEVENT_Lvl1Item_H
24 
25 #include <stdint.h>
26 #include <string>
27 #include <vector>
28 #include "xAODCore/CLASS_DEF.h"
29 
30 namespace LVL1CTP {
31 
37  class Lvl1Item {
38 
39  public:
40 
41  Lvl1Item( const std::string& n, unsigned int hash, bool passBP = false,
42  bool passAP = true, bool passAV = true, float factor = 1) :
43  m_name(n), m_hashId(hash), m_passBP(passBP), m_passAP(passAP), m_passAV(passAV),
44  m_prescaleFactor(factor) {}
45 
46  std::string name() const { return m_name; }
47  unsigned int hashId() const { return m_hashId; }
48 
49  bool isPassedBeforePrescale() const { return m_passBP; }
50  bool isPassedAfterPrescale() const { return m_passAP; }
51  bool isPassedAfterVeto() const { return m_passAV; }
52 
53  bool isPassed() const { return isPassedAfterVeto(); }
54 
55  bool isPrescaled() const { return isPassedBeforePrescale() && ! isPassedAfterPrescale(); }
56  bool isVeto() const { return isPassedAfterPrescale() && ! isPassedAfterVeto(); }
57 
58  float prescaleFactor() const { return m_prescaleFactor; }
59 
60  void setName (const std::string& name) { m_name = name; }
61  void setHashId(unsigned int hash) { m_hashId = hash; }
62  void setPrescaleFactor(float factor) { m_prescaleFactor = factor; }
63 
64  private:
65 
66  std::string m_name;
67  unsigned int m_hashId;
70  };
71 
72 } // end of namespace
73 
74 #endif
LVL1CTP::Lvl1Item::Lvl1Item
Lvl1Item(const std::string &n, unsigned int hash, bool passBP=false, bool passAP=true, bool passAV=true, float factor=1)
Definition: Lvl1Item.h:41
LVL1CTP::Lvl1Item::m_hashId
unsigned int m_hashId
Definition: Lvl1Item.h:67
LVL1CTP::Lvl1Item::setName
void setName(const std::string &name)
Definition: Lvl1Item.h:60
LVL1CTP::Lvl1Item::isPassed
bool isPassed() const
Definition: Lvl1Item.h:53
LVL1CTP::Lvl1Item::setPrescaleFactor
void setPrescaleFactor(float factor)
Definition: Lvl1Item.h:62
LVL1CTP::Lvl1Item::m_name
std::string m_name
Definition: Lvl1Item.h:66
LVL1CTP::Lvl1Item::name
std::string name() const
Definition: Lvl1Item.h:46
LVL1CTP::Lvl1Item::isVeto
bool isVeto() const
Definition: Lvl1Item.h:56
LVL1CTP::Lvl1Item::m_passAP
bool m_passAP
Definition: Lvl1Item.h:68
LVL1CTP::Lvl1Item::isPassedAfterPrescale
bool isPassedAfterPrescale() const
Definition: Lvl1Item.h:50
LVL1CTP::Lvl1Item
Definition: Lvl1Item.h:37
LVL1CTP::Lvl1Item::setHashId
void setHashId(unsigned int hash)
Definition: Lvl1Item.h:61
beamspotman.n
n
Definition: beamspotman.py:731
LVL1CTP::Lvl1Item::m_passBP
bool m_passBP
Definition: Lvl1Item.h:68
CLASS_DEF.h
File providing the different SG_BASE macros.
LVL1CTP::Lvl1Item::m_passAV
bool m_passAV
Definition: Lvl1Item.h:68
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
LVL1CTP::Lvl1Item::isPassedAfterVeto
bool isPassedAfterVeto() const
Definition: Lvl1Item.h:51
LVL1CTP::Lvl1Item::isPassedBeforePrescale
bool isPassedBeforePrescale() const
Definition: Lvl1Item.h:49
LVL1CTP::Lvl1Item::m_prescaleFactor
float m_prescaleFactor
Definition: Lvl1Item.h:69
LVL1CTP::Lvl1Item::hashId
unsigned int hashId() const
Definition: Lvl1Item.h:47
LVL1CTP
Definition: Lvl1ResultAccessTool.h:20
LVL1CTP::Lvl1Item::prescaleFactor
float prescaleFactor() const
Definition: Lvl1Item.h:58
LVL1CTP::Lvl1Item::isPrescaled
bool isPrescaled() const
Definition: Lvl1Item.h:55