CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MetaData.h
Go to the documentation of this file.
1 #ifndef CondCore_MetaDataService_METADATA_H
2 #define CondCore_MetaDataService_METADATA_H
3 #include <string>
4 #include <vector>
7 #include "MetaDataEntry.h"
8 //
9 // Package: MetaDataService
10 // Class : MetaData
11 //
15 //
16 // Author: Zhen Xie
17 //
18 namespace cond{
19  class MetaData {
20  public:
21  // constructor
22  explicit MetaData( cond::DbSession& userSession );
23  // destructor
24  ~MetaData();
25  // add metadata entry
26  bool addMapping(const std::string& name, const std::string& token,cond::TimeType timetype=cond::runnumber);
27  // replace iov token associated with a given tag
28  //bool replaceToken(const std::string& name, const std::string& newtoken);
29  // if given iov tag exists
30  bool hasTag( const std::string& name ) const;
31  // list all tags
32  void listAllTags( std::vector<std::string>& result ) const;
33  // list all entries in the metadata table
34  //void listAllEntries( std::vector<cond::MetaDataEntry>& result ) const;
35  // get iov token associated with given tag
36  const std::string getToken( const std::string& tagname ) const;
37  // get the metadata table entry by tag name
38  //void getEntryByTag( const std::string& tagname, cond::MetaDataEntry& result )const;
39  // delete all entries in the metadata table
40  void deleteAllEntries();
41  // delete metadata entry selected by iov token
42  //void deleteEntryByToken( const std::string& token );
43  // delete metadata entry selected by tag name
44  void deleteEntryByTag( const std::string& tag );
45  private:
46  // create metadata table
47  //void createTable(const std::string& tabname);
49  };
50 }
51 #endif
52 
void deleteAllEntries()
Definition: MetaData.cc:92
cond::DbSession m_userSession
Definition: MetaData.h:48
const std::string getToken(const std::string &tagname) const
Definition: MetaData.cc:53
TimeType
Definition: Time.h:21
MetaData(cond::DbSession &userSession)
Definition: MetaData.cc:31
bool addMapping(const std::string &name, const std::string &token, cond::TimeType timetype=cond::runnumber)
Definition: MetaData.cc:36
bool hasTag(const std::string &name) const
Definition: MetaData.cc:70
tuple result
Definition: query.py:137
void deleteEntryByTag(const std::string &tag)
Definition: MetaData.cc:100
void listAllTags(std::vector< std::string > &result) const
Definition: MetaData.cc:83