Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:19:55

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef GLOBALVERTEX_GLOBALVERTEXMAP_H
0004 #define GLOBALVERTEX_GLOBALVERTEXMAP_H
0005 
0006 #include <phool/PHObject.h>
0007 #include "Vertex.h"
0008 #include "GlobalVertex.h"
0009 #include <iostream>
0010 #include <map>
0011 
0012 class GlobalVertexMap : public PHObject
0013 {
0014  public:
0015   typedef std::map<unsigned int, GlobalVertex*>::const_iterator ConstIter;
0016   typedef std::map<unsigned int, GlobalVertex*>::iterator Iter;
0017 
0018   ~GlobalVertexMap() override {}
0019 
0020   void identify(std::ostream& os = std::cout) const override { os << "GlobalVertexMap base class" << std::endl; }
0021   int isValid() const override { return 0; }
0022   virtual void CopyTo(GlobalVertexMap*) { return; }
0023 
0024   virtual bool empty() const { return true; }
0025   virtual size_t size() const { return 0; }
0026   virtual size_t count(unsigned int /*idkey*/) const { return 0; }
0027   virtual void clear() {}
0028 
0029   virtual const GlobalVertex* get(unsigned int /*idkey*/) const { return nullptr; }
0030   virtual GlobalVertex* get(unsigned int /*idkey*/) { return nullptr; }
0031   virtual std::vector<GlobalVertex*> get_gvtxs_with_type(std::vector<GlobalVertex::VTXTYPE> /*type*/) {return {}; }
0032   virtual std::vector<const Vertex*> get_vtxs_of_type(std::vector<GlobalVertex::VTXTYPE> /*type*/) { return {}; }
0033   virtual GlobalVertex* insert(GlobalVertex* /*vertex*/) { return nullptr; }
0034   virtual size_t erase(unsigned int /*idkey*/) { return 0; }
0035 
0036   virtual ConstIter begin() const;
0037   virtual ConstIter find(unsigned int idkey) const;
0038   virtual ConstIter end() const;
0039 
0040   virtual Iter begin();
0041   virtual Iter find(unsigned int idkey);
0042   virtual Iter end();
0043 
0044  protected:
0045   GlobalVertexMap() {}
0046 
0047  private:
0048   ClassDefOverride(GlobalVertexMap, 1);
0049 };
0050 
0051 #endif  // G4VERTEX_GLOBALVERTEXMAP_H