Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RawTowerContainer.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file RawTowerContainer.h
1 #ifndef CALOBASE_RAWTOWERCONTAINER_H
2 #define CALOBASE_RAWTOWERCONTAINER_H
3 
4 #include "RawTowerDefs.h"
5 
6 #include <phool/PHObject.h>
7 
8 #include <iostream>
9 #include <map>
10 #include <utility>
11 
12 class RawTower;
13 
15 {
16  public:
17  typedef std::map<RawTowerDefs::keytype, RawTower *> Map;
18  typedef Map::iterator Iterator;
19  typedef Map::const_iterator ConstIterator;
20  typedef std::pair<Iterator, Iterator> Range;
21  typedef std::pair<ConstIterator, ConstIterator> ConstRange;
22 
24  : _caloid(caloid)
25  {
26  }
27 
28  ~RawTowerContainer() override {}
29 
30  void Reset() override;
31  int isValid() const override;
32  void identify(std::ostream &os = std::cout) const override;
33 
36 
37  ConstIterator AddTower(const unsigned int ieta, const unsigned int iphi, RawTower *twr);
39 
41  const RawTower *getTower(RawTowerDefs::keytype key) const;
42 
43  RawTower *getTower(const unsigned int ieta, const unsigned int iphi);
44  const RawTower *getTower(const unsigned int ieta, const unsigned int iphi) const;
45 
46  RawTower *getTower(const unsigned int ieta, const unsigned int iphi, const unsigned int il);
47  const RawTower *getTower(const unsigned int ieta, const unsigned int iphi, const unsigned int il) const;
48 
50  ConstRange getTowers(void) const;
51  Range getTowers(void);
52 
53  unsigned int size() const { return _towers.size(); }
54  void compress(const double emin);
55  double getTotalEdep() const;
56 
57  protected:
60 
61  ClassDefOverride(RawTowerContainer, 1)
62 };
63 
64 #endif