ATLAS Offline Software
SpecialTrigger.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef TRIGT1CTP_ISPECIAL_TRIGGER_H
5 #define TRIGT1CTP_ISPECIAL_TRIGGER_H
6 
7 #include "CTPfragment/CTPdataformatVersion.h"
8 
9 // STL include(s):
10 #include <vector>
11 #include <string>
12 #include <map>
13 
14 namespace LVL1CTP {
15 
16  class ISpecialTrigger;
17  typedef std::map< std::string, const ISpecialTrigger*> InternalTriggerMap;
18 
19 
20  /* @brief Interface for internal trigger classes */
22  public:
23  virtual ~ISpecialTrigger() {}
24  virtual std::string name() const = 0;
25  virtual size_t pitPos() const = 0;
26  };
27 
28 
29 
30  class RandomTrigger : public ISpecialTrigger {
31  public:
32  RandomTrigger() = delete;
33  RandomTrigger( size_t rndmNr, const CTPdataformatVersion * ctpFormat);
34  virtual ~RandomTrigger() {}
35  std::string name() const
36  { return "RNDM" + std::to_string(m_rndmNr); }
37  size_t pitPos() const
38  {return m_pitPos; }
39  private:
40  size_t m_rndmNr;
41  size_t m_pitPos;
42  };
43 
44 
45 
46 
49  public:
50  BunchGroupTrigger() = delete;
51  BunchGroupTrigger( size_t bgrpNr,
52  const std::vector<unsigned int>& bunches,
53  const CTPdataformatVersion * ctpFormat);
54  virtual ~BunchGroupTrigger() {}
55  std::string name() const
56  { return "BGRP" + std::to_string(m_bgrpNr); }
57  size_t pitPos() const
58  {return m_pitPos; }
59  private:
60  std::vector<unsigned int> m_bunches;
61  size_t m_bgrpNr;
62  size_t m_pitPos;
63  };
64 
65 }
66 
67 
68 
69 
70 
71 
72 
73 
74 
75 
76 
77 
78 
79 
80 
81 
82 
83 
84 
85 #endif
LVL1CTP::BunchGroupTrigger::~BunchGroupTrigger
virtual ~BunchGroupTrigger()
Definition: SpecialTrigger.h:54
LVL1CTP::ISpecialTrigger
Definition: SpecialTrigger.h:21
LVL1CTP::BunchGroupTrigger::m_pitPos
size_t m_pitPos
global bit in the TIP vector
Definition: SpecialTrigger.h:62
LVL1CTP::BunchGroupTrigger::m_bunches
std::vector< unsigned int > m_bunches
list of bunch IDs
Definition: SpecialTrigger.h:60
LVL1CTP::BunchGroupTrigger
Class for simulating the internal bunch group trigger.
Definition: SpecialTrigger.h:48
LVL1CTP::RandomTrigger
Definition: SpecialTrigger.h:30
LVL1CTP::RandomTrigger::m_rndmNr
size_t m_rndmNr
nr of the bunchgroup 0..15
Definition: SpecialTrigger.h:40
LVL1CTP::RandomTrigger::name
std::string name() const
get name of internal trigger
Definition: SpecialTrigger.h:35
LVL1CTP::ISpecialTrigger::pitPos
virtual size_t pitPos() const =0
get signal position on PIT bus
LVL1CTP::RandomTrigger::~RandomTrigger
virtual ~RandomTrigger()
Definition: SpecialTrigger.h:34
LVL1CTP::InternalTriggerMap
std::map< std::string, const ISpecialTrigger * > InternalTriggerMap
Definition: SpecialTrigger.h:16
LVL1CTP::RandomTrigger::m_pitPos
size_t m_pitPos
global bit in the TIP vector
Definition: SpecialTrigger.h:41
LVL1CTP::RandomTrigger::RandomTrigger
RandomTrigger()=delete
LVL1CTP::BunchGroupTrigger::pitPos
size_t pitPos() const
get signal position on PIT bus
Definition: SpecialTrigger.h:57
LVL1CTP::ISpecialTrigger::~ISpecialTrigger
virtual ~ISpecialTrigger()
Definition: SpecialTrigger.h:23
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
LVL1CTP::BunchGroupTrigger::BunchGroupTrigger
BunchGroupTrigger()=delete
LVL1CTP::ISpecialTrigger::name
virtual std::string name() const =0
get name of internal trigger
LVL1CTP
Definition: Lvl1ResultAccessTool.h:20
LVL1CTP::BunchGroupTrigger::name
std::string name() const
get name of internal trigger
Definition: SpecialTrigger.h:55
LVL1CTP::BunchGroupTrigger::m_bgrpNr
size_t m_bgrpNr
nr of the bunchgroup 0..15
Definition: SpecialTrigger.h:61
LVL1CTP::RandomTrigger::pitPos
size_t pitPos() const
get signal position on PIT bus
Definition: SpecialTrigger.h:37