CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
DropBoxMetadata.cc
Go to the documentation of this file.
1 
2 /*
3  * See header file for a description of this class.
4  *
5  * $Date: 2011/02/23 16:55:18 $
6  * $Revision: 1.1 $
7  * \author G. Cerminara - CERN
8  */
9 
11 #include <algorithm> // for std::transform
12 
13 using std::map;
14 using std::string;
15 
17 
19 
20 void DropBoxMetadata::Parameters::addParameter(const string& key, const string& value) { theParameters[key] = value; }
21 
22 string DropBoxMetadata::Parameters::getParameter(const string& key) const {
23  string ret;
24  map<string, string>::const_iterator thePair = theParameters.find(key);
25  if (thePair != theParameters.end()) {
26  ret = (*thePair).second;
27  }
28  return ret;
29 }
30 
31 const map<string, string>& DropBoxMetadata::Parameters::getParameterMap() const { return theParameters; }
32 
35 }
36 
38  return recordSet.find(record)->second;
39 }
40 
42  if (recordSet.find(record) != recordSet.end())
43  return true;
44 
45  return false;
46 }
47 
48 const std::vector<std::string> DropBoxMetadata::getAllRecords() const {
49  std::vector<std::string> records;
50  std::transform(recordSet.begin(),
51  recordSet.end(),
52  std::inserter(records, records.end()),
53  [](std::pair<std::string, DropBoxMetadata::Parameters> recordSetEntry) -> std::string {
54  return recordSetEntry.first;
55  });
56  return records;
57 }
ret
prodAgent to be discontinued
const Parameters & getRecordParameters(const std::string &record) const
std::string getParameter(const std::string &key) const
std::map< std::string, std::string > theParameters
Definition: value.py:1
const std::vector< std::string > getAllRecords() const
void addParameter(const std::string &key, const std::string &vale)
const std::map< std::string, std::string > & getParameterMap() const
bool knowsRecord(const std::string &record) const
std::map< std::string, DropBoxMetadata::Parameters > recordSet
void addRecordParameters(const std::string &record, const Parameters &params)
virtual ~DropBoxMetadata()
Destructor.
DropBoxMetadata()
Constructor.
unsigned transform(const HcalDetId &id, unsigned transformCode)