Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:18:56

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef G4DETECTORS_PHG4CYLINDERCELLGEOMCONTAINER_H
0004 #define G4DETECTORS_PHG4CYLINDERCELLGEOMCONTAINER_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 PHG4CylinderCellGeom;
0013 
0014 class PHG4CylinderCellGeomContainer : public PHObject
0015 {
0016  public:
0017   typedef std::map<int, PHG4CylinderCellGeom *> 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   PHG4CylinderCellGeomContainer() {}
0024   ~PHG4CylinderCellGeomContainer() override;
0025 
0026   // from PHObject
0027   void identify(std::ostream &os = std::cout) const override;
0028 
0029   int AddLayerCellGeom(const int i, PHG4CylinderCellGeom *mygeom);
0030   int AddLayerCellGeom(PHG4CylinderCellGeom *mygeom);
0031   PHG4CylinderCellGeom *GetLayerCellGeom(const int i);
0032   PHG4CylinderCellGeom *GetFirstLayerCellGeom();
0033   int get_NLayers() const { return layergeoms.size(); }
0034   std::pair<std::map<int, PHG4CylinderCellGeom *>::const_iterator, std::map<int, PHG4CylinderCellGeom *>::const_iterator> get_begin_end() const { return std::make_pair(layergeoms.begin(), layergeoms.end()); }
0035 
0036  protected:
0037   std::map<int, PHG4CylinderCellGeom *> layergeoms;
0038   ClassDefOverride(PHG4CylinderCellGeomContainer, 1)
0039 };
0040 
0041 #endif