ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4BlockGeomContainer.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4BlockGeomContainer.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef G4DETECTORS_PHG4BLOCKGEOMCONTAINER_H
4 #define G4DETECTORS_PHG4BLOCKGEOMCONTAINER_H
5 
6 #include <phool/PHObject.h>
7 
8 #include <iostream> // for cout, ostream
9 #include <map>
10 #include <utility> // for make_pair, pair
11 
12 class PHG4BlockGeom;
13 
15 {
16  public:
17  typedef std::map<int,PHG4BlockGeom *> 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  ~PHG4BlockGeomContainer() override;
25 
26 // from PHObject
27  void identify(std::ostream& os = std::cout) const override;
28 
29  int AddLayerGeom(const int i, PHG4BlockGeom *mygeom);
30  int AddLayerGeom(PHG4BlockGeom *mygeom);
31  PHG4BlockGeom *GetLayerGeom(const int i);
32  int get_NLayers() const {return _layergeoms.size();}
33  std::pair<std::map<int,PHG4BlockGeom *>::const_iterator, std::map<int,PHG4BlockGeom *>::const_iterator> get_begin_end() const {return std::make_pair(_layergeoms.begin(), _layergeoms.end());}
34 
35  protected:
36  std::map<int,PHG4BlockGeom *> _layergeoms;
37  float _magfield;
38 
39  ClassDefOverride(PHG4BlockGeomContainer,1)
40 };
41 
42 #endif