CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MappingDatabase.h
Go to the documentation of this file.
1 #ifndef INCLUDE_ORA_MAPPINGDATABASE_H
2 #define INCLUDE_ORA_MAPPINGDATABASE_H
3 
4 #include "Sequences.h"
5 //
6 #include <string>
7 #include <map>
8 #include <vector>
9 #include <set>
10 
11 namespace edm {
12  class TypeWithDict;
13 }
14 
15 namespace ora {
16 
17  class IDatabaseSchema;
18  class MappingTree;
19  class MappingElement;
20  class MappingRawData;
21  class MappingRawElement;
22 
28 
29  public:
30 
31  static std::string versionOfClass( const edm::TypeWithDict& dictionary );
32  public:
35 
38 
39  void setUp();
40 
42 
43  std::string newMappingVersionForDependentClass( const std::string& containerName, const std::string& className );
44 
46 
47  void removeMapping( const std::string& version );
48 
49  bool getMappingForContainer( const std::string& className, const std::string& classVersion, int containerId, MappingTree& destination );
50 
51  bool getBaseMappingForContainer( const std::string& className, int containerId, MappingTree& destination );
52 
53  bool getDependentMappingsForContainer( int containerId, std::vector<MappingElement>& destination );
54 
55  bool getDependentClassesForContainer( int containerId, std::set<std::string>& list );
56 
57  bool getClassVersionListForMappingVersion( const std::string& mappingVersion, std::set<std::string>& destination );
58 
59  bool getClassVersionListForContainer( int containerId, std::map<std::string,std::string>& versionMap );
60 
61  void insertClassVersion( const edm::TypeWithDict& dictionaryEntry, int dependencyIndex, int containerId, const std::string& mappingVersion, bool asBase=false );
62 
63  void insertClassVersion( const std::string& className, const std::string& classVersion, int dependencyIndex, int containerId, const std::string& mappingVersion, bool asBase=false );
64 
65  void setMappingVersionForClass( const edm::TypeWithDict& dictionaryEntry, int containerId, const std::string& mappingVersion , bool dependency=false);
66 
67  void storeMapping( const MappingTree& mappingStructure );
68 
69  bool getMappingVersionsForContainer( int containerId, std::set<std::string>& versionList );
70 
71  const std::set<std::string>& versions();
72 
73  void clear();
74 
75  private:
76  void buildElement( MappingElement& parentElement, const std::string& scopeName,
77  std::map<std::string,std::vector<MappingRawElement> >& innerElements );
78  void unfoldElement( const MappingElement& element, MappingRawData& destination );
79 
80  private:
81 
85  std::set<std::string> m_versions;
86  bool m_isLoaded;
87 
88  };
89 
90 }
91 
92 #endif
NamedSequence m_mappingSequence
bool getMappingForContainer(const std::string &className, const std::string &classVersion, int containerId, MappingTree &destination)
MappingDatabase(IDatabaseSchema &schema)
Constructor.
bool getDependentMappingsForContainer(int containerId, std::vector< MappingElement > &destination)
bool getBaseMappingForContainer(const std::string &className, int containerId, MappingTree &destination)
bool getClassVersionListForMappingVersion(const std::string &mappingVersion, std::set< std::string > &destination)
void buildElement(MappingElement &parentElement, const std::string &scopeName, std::map< std::string, std::vector< MappingRawElement > > &innerElements)
void unfoldElement(const MappingElement &element, MappingRawData &destination)
std::string newMappingVersionForDependentClass(const std::string &containerName, const std::string &className)
bool getMappingVersionsForContainer(int containerId, std::set< std::string > &versionList)
void storeMapping(const MappingTree &mappingStructure)
~MappingDatabase()
Destructor.
bool getClassVersionListForContainer(int containerId, std::map< std::string, std::string > &versionMap)
std::string newMappingVersionForContainer(const std::string &className)
bool getDependentClassesForContainer(int containerId, std::set< std::string > &list)
bool getMappingByVersion(const std::string &version, MappingTree &destination)
const std::set< std::string > & versions()
void insertClassVersion(const edm::TypeWithDict &dictionaryEntry, int dependencyIndex, int containerId, const std::string &mappingVersion, bool asBase=false)
std::set< std::string > m_versions
static std::string versionOfClass(const edm::TypeWithDict &dictionary)
IDatabaseSchema & m_schema
The schema in use.
void removeMapping(const std::string &version)
std::string className(const T &t)
Definition: ClassName.h:30
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
void setMappingVersionForClass(const edm::TypeWithDict &dictionaryEntry, int containerId, const std::string &mappingVersion, bool dependency=false)