00001 #ifndef DataFormats_LaserAlignment_LASBeamProfileFitCollection_h 00002 #define DataFormats_LaserAlignment_LASBeamProfileFitCollection_h 00003 00012 #include "DataFormats/LaserAlignment/interface/LASBeamProfileFit.h" 00013 #include <vector> 00014 #include <map> 00015 00016 class LASBeamProfileFitCollection 00017 { 00018 public: 00019 typedef std::vector<LASBeamProfileFit>::const_iterator ContainerIterator; 00020 typedef std::pair<ContainerIterator, ContainerIterator> Range; 00021 typedef std::pair<unsigned int, unsigned int> IndexRange; 00022 typedef std::map<unsigned int, IndexRange> Registry; 00023 typedef std::map<unsigned int, IndexRange>::const_iterator RegistryIterator; 00024 00025 // typedef for map of DetIds to their associated LASBeamProfileFit 00026 typedef std::map< unsigned int, std::vector<LASBeamProfileFit> > LASBeamProfileFitContainer; 00027 00029 LASBeamProfileFitCollection() {} 00031 void put(Range input, unsigned int detID); 00033 const Range get(unsigned int detID) const; 00035 const std::vector<unsigned int> detIDs() const; 00036 00038 void add(unsigned int& det_id, std::vector<LASBeamProfileFit>& beamProfileFit); 00039 00041 void beamProfileFit(unsigned int& det_id, std::vector<LASBeamProfileFit>& beamProfileFit) const; 00042 00044 void detIDs(std::vector<unsigned int>& det_ids) const; 00045 00047 int size() const; 00048 00049 private: 00050 mutable std::vector<LASBeamProfileFit> container_; 00051 mutable Registry map_; 00052 00053 // map of DetIds to their associated LASBeamProfileFit 00054 mutable LASBeamProfileFitContainer fitMap_; 00055 00056 }; 00057 00058 #endif