Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:17:42

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef G4DETECTORS_PHG4BLOCKCELLGEOMCONTAINER_H
0004 #define G4DETECTORS_PHG4BLOCKCELLGEOMCONTAINER_H
0005 
0006 #include <phool/PHObject.h>
0007 
0008 #include <iostream>  // for cout, ostream
0009 #include <map>
0010 #include <utility>  // for make_pair, pair
0011 
0012 class PHG4BlockCellGeom;
0013 
0014 class PHG4BlockCellGeomContainer : public PHObject
0015 {
0016  public:
0017   typedef std::map<int, PHG4BlockCellGeom *> Map;
0018   typedef Map::iterator Iterator;
0019   typedef Map::const_iterator ConstIterator;
0020   typedef std::pair<Iterator, Iterator> Range;
0021   typedef std::pair<ConstIterator, ConstIterator> ConstRange;
0022 
0023   PHG4BlockCellGeomContainer() {}
0024   ~PHG4BlockCellGeomContainer() override;
0025 
0026   // from PHObject
0027   void identify(std::ostream &os = std::cout) const override;
0028 
0029   int AddLayerCellGeom(const int i, PHG4BlockCellGeom *mygeom);
0030   int AddLayerCellGeom(PHG4BlockCellGeom *mygeom);
0031   PHG4BlockCellGeom *GetLayerCellGeom(const int i);
0032   int get_NLayers() const { return layergeoms.size(); }
0033   std::pair<std::map<int, PHG4BlockCellGeom *>::const_iterator, std::map<int, PHG4BlockCellGeom *>::const_iterator> get_begin_end() const { return std::make_pair(layergeoms.begin(), layergeoms.end()); }
0034 
0035  protected:
0036   std::map<int, PHG4BlockCellGeom *> layergeoms;
0037   ClassDefOverride(PHG4BlockCellGeomContainer, 1)
0038 };
0039 
0040 #endif