ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RawTowerZDCContainer.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file RawTowerZDCContainer.h
1 #ifndef EICZDCBASE_RAWTOWERZDCCONTAINER_H
2 #define EICZDCBASE_RAWTOWERZDCCONTAINER_H
3 
4 #include "RawTowerZDCDefs.h"
5 
6 #include <phool/PHObject.h>
7 
8 #include <iostream>
9 #include <map>
10 #include <utility>
11 
12 class RawTowerZDC;
13 
15 {
16  public:
17  typedef std::map<RawTowerZDCDefs::keytype, RawTowerZDC *> 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  ~RawTowerZDCContainer() 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, const unsigned int il, RawTowerZDC *twr);
39 
42 
43  RawTowerZDC *getTower(const unsigned int ieta, const unsigned int iphi, const unsigned int il );
44  const RawTowerZDC *getTower(const unsigned int ieta, const unsigned int iphi, const unsigned int il) const;
45 
47  ConstRange getTowers(void) const;
48  Range getTowers(void);
49 
50  unsigned int size() const { return _towers.size(); }
51  void compress(const double emin);
52  double getTotalEdep() const;
53 
54  protected:
57 
58  ClassDefOverride(RawTowerZDCContainer, 1)
59 };
60 
61 #endif