Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:51:02

0001 /*
0002  *  See header file for a description of this class.
0003  *
0004  *  $Date: 2010/03/18 16:03:17 $
0005  *  $Revision: 1.1.2.1 $
0006  *  \author Paolo Ronchese INFN Padova
0007  *
0008  */
0009 
0010 //-----------------------
0011 // This Class' Header --
0012 //-----------------------
0013 #include "CondFormats/DTObjects/interface/DTKeyedConfig.h"
0014 
0015 //-------------------------------
0016 // Collaborating Class Headers --
0017 //-------------------------------
0018 
0019 //---------------
0020 // C++ Headers --
0021 //---------------
0022 #include <iostream>
0023 
0024 //-------------------
0025 // Initializations --
0026 //-------------------
0027 
0028 //----------------
0029 // Constructors --
0030 //----------------
0031 DTKeyedConfig::DTKeyedConfig() {}
0032 
0033 DTKeyedConfig::DTKeyedConfig(const DTKeyedConfig& obj) : cond::BaseKeyed::BaseKeyed(obj) {
0034   cfgId = obj.cfgId;
0035   data_iterator d_iter = obj.dataList.begin();
0036   data_iterator d_iend = obj.dataList.end();
0037   while (d_iter != d_iend)
0038     dataList.push_back(*d_iter++);
0039   link_iterator l_iter = obj.linkList.begin();
0040   link_iterator l_iend = obj.linkList.end();
0041   while (l_iter != l_iend)
0042     linkList.push_back(*l_iter++);
0043 }
0044 
0045 //--------------
0046 // Destructor --
0047 //--------------
0048 DTKeyedConfig::~DTKeyedConfig() {}
0049 
0050 //--------------
0051 // Operations --
0052 //--------------
0053 int DTKeyedConfig::getId() const { return cfgId; }
0054 
0055 void DTKeyedConfig::setId(int id) { cfgId = id; }
0056 
0057 void DTKeyedConfig::add(const std::string& data) { dataList.push_back(data); }
0058 
0059 void DTKeyedConfig::add(int id) { linkList.push_back(id); }
0060 
0061 DTKeyedConfig::data_iterator DTKeyedConfig::dataBegin() const { return dataList.begin(); }
0062 
0063 DTKeyedConfig::data_iterator DTKeyedConfig::dataEnd() const { return dataList.end(); }
0064 
0065 DTKeyedConfig::link_iterator DTKeyedConfig::linkBegin() const { return linkList.begin(); }
0066 
0067 DTKeyedConfig::link_iterator DTKeyedConfig::linkEnd() const { return linkList.end(); }