00001 #ifndef DataFormats_LaserAlignment_LASAlignmentParameterCollection_h 00002 #define DataFormats_LaserAlignment_LASAlignmentParameterCollection_h 00003 00012 #include "DataFormats/LaserAlignment/interface/LASAlignmentParameter.h" 00013 #include <vector> 00014 #include <map> 00015 00016 class LASAlignmentParameterCollection 00017 { 00018 public: 00019 typedef std::vector<LASAlignmentParameter>::const_iterator ContainerIterator; 00020 typedef std::pair<ContainerIterator, ContainerIterator> Range; 00021 typedef std::pair<unsigned int, unsigned int> IndexRange; 00022 typedef std::map<std::string, IndexRange> Registry; 00023 typedef std::map<std::string, IndexRange>::const_iterator RegistryIterator; 00024 00025 // typedef for map of Detector labels to their associated LASAlignmentParameter 00026 typedef std::map< std::string, std::vector<LASAlignmentParameter> > LASAlignmentParameterContainer; 00027 00029 LASAlignmentParameterCollection() {} 00031 void put(Range input, std::string name_); 00033 const Range get(std::string name_) const; 00035 const std::vector<std::string> names() const; 00036 00038 void add(std::string & name_, std::vector<LASAlignmentParameter>& alignmentParameters); 00039 00041 void alignmentParameter(std::string & name_, std::vector<LASAlignmentParameter>& alignmentParameters) const; 00042 00044 void names(std::vector<std::string>& names_) const; 00045 00047 int size() const; 00048 00049 private: 00050 mutable std::vector<LASAlignmentParameter> container_; 00051 mutable Registry map_; 00052 00053 // map of detector labels to their associated LASAlignmentParameter 00054 mutable LASAlignmentParameterContainer parameterMap_; 00055 00056 }; 00057 #endif