ATLAS Offline Software
Database/APR/CollectionUtilities/CollectionUtilities/UtilityFuncs.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
12 
13 #include <string>
14 #include <map>
15 #include <set>
16 #include <vector>
17 
18 namespace pool {
19 
20  template <class KEY, class PAYLOAD>
21  std::vector<PAYLOAD> vectorizeMapPayload(const std::map<KEY,PAYLOAD>& m)
22  {
23  std::vector<PAYLOAD> outputs;
24  for (typename std::map<KEY,PAYLOAD>::const_iterator j = m.begin(); j != m.end(); ++j) {
25  outputs.push_back(j->second);
26  }
27  return outputs;
28  }
29 
30  // Funcs for manipulating CollectionMetadata
31  std::string getKey(const std::string& key, const std::string& encoded);
32  std::string getGroup(const std::string& encoded);
33  std::set<std::string> findGroups(const pool::ICollectionDescription& desc);
34 
35  // Funcs for manipulating CollectionDescriptions
40  const pool::ICollectionDescription& desc1,
41  const std::vector< std::pair<std::string,std::string> >& spec0,
42  const std::vector< std::pair<std::string,std::string> >& spec1,
43  const std::string& spectype);
44 
45  // Formatting
46  std::pair<unsigned int,unsigned int>
48 
49  void Tokenize(const std::string& str,
50  std::vector<std::string>& tokens,
51  const std::string& delimiters = " ");
52 
53 }
54 
pool::dumpTokens
void dumpTokens(const pool::ICollectionDescription &description)
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
pool::getColumnWidths
std::pair< unsigned int, unsigned int > getColumnWidths(const pool::ICollectionDescription &description, bool tokens)
pool
pool namespace
Definition: libname.h:15
pool::vectorizeMapPayload
std::vector< PAYLOAD > vectorizeMapPayload(const std::map< KEY, PAYLOAD > &m)
Definition: Database/APR/CollectionUtilities/CollectionUtilities/UtilityFuncs.h:21
pool::dumpOverlapEval
void dumpOverlapEval(const pool::ICollectionDescription &desc0, const pool::ICollectionDescription &desc1, const std::vector< std::pair< std::string, std::string > > &spec0, const std::vector< std::pair< std::string, std::string > > &spec1, const std::string &spectype)
beamspotman.tokens
tokens
Definition: beamspotman.py:1284
pool::getGroup
std::string getGroup(const std::string &encoded)
pool::findGroups
std::set< std::string > findGroups(const pool::ICollectionDescription &desc)
CaloCondBlobAlgs_fillNoiseFromASCII.desc
desc
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:54
pool::dumpGroups
void dumpGroups(const pool::ICollectionDescription &description)
pool::dumpAttributes
void dumpAttributes(const pool::ICollectionDescription &description)
python.CreateTierZeroArgdict.outputs
outputs
Definition: CreateTierZeroArgdict.py:189
pool::Tokenize
void Tokenize(const std::string &str, std::vector< std::string > &tokens, const std::string &delimiters=" ")
str
Definition: BTagTrackIpAccessor.cxx:11
pool::getKey
std::string getKey(const std::string &key, const std::string &encoded)
ICollectionDescription.h
pool::ICollectionDescription
Definition: ICollectionDescription.h:26
description
std::string description
glabal timer - how long have I taken so far?
Definition: hcg.cxx:88
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37