File indexing completed on 2025-08-06 08:17:57
0001 #ifndef PARTICLEFLOW_PARTICLEFLOWELEMENTCONTAINER_H
0002 #define PARTICLEFLOW_PARTICLEFLOWELEMENTCONTAINER_H
0003
0004
0005
0006
0007
0008
0009
0010 #include <phool/PHObject.h>
0011
0012 #include <iostream>
0013 #include <map>
0014
0015 class ParticleFlowElement;
0016
0017 class ParticleFlowElementContainer : public PHObject
0018 {
0019 public:
0020 typedef std::map<int, ParticleFlowElement *> Map;
0021 typedef Map::iterator Iterator;
0022 typedef Map::const_iterator ConstIterator;
0023 typedef std::pair<Iterator, Iterator> Range;
0024 typedef std::pair<ConstIterator, ConstIterator> ConstRange;
0025
0026 ParticleFlowElementContainer()
0027 {
0028 }
0029
0030 ~ParticleFlowElementContainer() override {}
0031
0032 void Reset() override;
0033 int isValid() const override;
0034 void identify(std::ostream &os = std::cout) const override;
0035
0036 void AddParticleFlowElement(int index, ParticleFlowElement *pflowElement);
0037 ParticleFlowElement *getParticleFlowElement(int index);
0038 const ParticleFlowElement *getParticleFlowElement(int index) const;
0039
0040
0041 ConstRange getParticleFlowElements(void) const;
0042 Range getParticleFlowElements(void);
0043
0044 unsigned int size() const { return _pflowElementMap.size(); }
0045
0046 protected:
0047 Map _pflowElementMap;
0048
0049 ClassDefOverride(ParticleFlowElementContainer, 1)
0050 };
0051
0052 #endif