Class Reference for E1039 Core & Analysis Software
TrigRoads.h
Go to the documentation of this file.
1 #ifndef _TRIG_ROADS__H_
2 #define _TRIG_ROADS__H_
3 #include <string>
4 #include <vector>
5 #include <unordered_map>
6 #include "TrigRoad.h"
7 
8 namespace UtilTrigger {
9 
10 class TrigRoads {
11  std::string m_file_name;
12  int m_pol; // mu+ = +1, mu- = -1
13  int m_top_bot; // Top = +1, Bottom = -1
14  std::vector<TrigRoad> m_roads;
15  std::unordered_map<int, int> m_idx_map;
16 
17  public:
18  TrigRoads(const int pol, const int top_bot); // const std::string file_name
19  virtual ~TrigRoads() {;}
20 
21  unsigned int GetNumRoads() const { return m_roads.size(); }
22  TrigRoad* GetRoad(const int idx);
23  TrigRoad* FindRoad(const int road_id);
24 
25  int Charge() const { return m_pol; }
26  int TopBot() const { return m_top_bot; }
27  int LoadConfig(const std::string file_name);
28 
29  std::string str(const int level=0) const;
30 };
31 
32 }; // namespace UtilTrigger
33 
34 #endif // _TRIG_ROADS__H_
TrigRoads(const int pol, const int top_bot)
Definition: TrigRoads.cc:10
int LoadConfig(const std::string file_name)
Definition: TrigRoads.cc:31
TrigRoad * FindRoad(const int road_id)
Definition: TrigRoads.cc:24
int Charge() const
Definition: TrigRoads.h:25
std::string str(const int level=0) const
Definition: TrigRoads.cc:60
virtual ~TrigRoads()
Definition: TrigRoads.h:19
unsigned int GetNumRoads() const
Definition: TrigRoads.h:21
TrigRoad * GetRoad(const int idx)
Definition: TrigRoads.cc:18
int TopBot() const
Definition: TrigRoads.h:26