CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_2_9_HLT1_bphpatch4/src/OnlineDB/EcalCondDB/interface/LMFDefFabric.h

Go to the documentation of this file.
00001 #ifndef _LMFDEFFABRIC_H_
00002 #define _LMFDEFFABRIC_H_
00003 
00004 /*
00005   This class is used to get once all the definitions from the ECAL LMF
00006   database and return them in various forms.
00007 
00008   Copyright (c) Giovanni.Organtini@roma1.infn.it 2010
00009 */
00010 
00011 #include "OnlineDB/EcalCondDB/interface/IDBObject.h"
00012 #include "OnlineDB/Oracle/interface/Oracle.h"
00013 #include "OnlineDB/EcalCondDB/interface/EcalDBConnection.h"
00014 #include "OnlineDB/EcalCondDB/interface/LMFColor.h"
00015 #include "OnlineDB/EcalCondDB/interface/LMFTrigType.h"
00016 #include "OnlineDB/EcalCondDB/interface/LMFRunTag.h"
00017 #include "OnlineDB/EcalCondDB/interface/LMFPrimVers.h"
00018 #include "OnlineDB/EcalCondDB/interface/LMFCorrVers.h"
00019 #include "OnlineDB/EcalCondDB/interface/LMFSeqVers.h"
00020 #include "OnlineDB/EcalCondDB/interface/LMFUnique.h"
00021 
00022 #include <string>
00023 #include <list>
00024 
00025 class LMFDefFabric: public IDBObject {
00026  public:
00027   LMFDefFabric();
00028   LMFDefFabric(oracle::occi::Environment* env,
00029                oracle::occi::Connection* conn);
00030   LMFDefFabric(EcalDBConnection *c);
00031   ~LMFDefFabric();
00032   
00033   LMFColor getColor(std::string name) const;
00034   LMFColor getColor(int color_index) const;
00035   LMFColor getColorFromID(int color_id) const;
00036   int getColorID(std::string name) const;
00037   int getColorID(int color_index) const;
00038   LMFTrigType getTrigType(std::string sname) const;
00039   LMFTrigType getTrigTypeFromID(int trigType_id) const;
00040   int getTrigTypeID(std::string sname) const;
00041   LMFRunTag getRunTag(std::string tag, int version) const;
00042   LMFRunTag getRunTagFromID(int runTag_id) const;
00043   int getRunTagID(std::string tag, int version) const;
00044 
00045   std::list<LMFColor>    getColors() const;
00046   std::list<LMFTrigType> getTriggerTypes() const;
00047   std::list<LMFRunTag>   getRunTags() const;
00048 
00049   void initialize() throw(std::runtime_error);
00050   void debug();
00051   void noDebug();
00052 
00053   void dump();
00054 
00055  protected:
00056 
00057   bool _debug;
00058 
00059   std::list<LMFColor>    _lmfColors;
00060   std::list<LMFTrigType> _lmfTrigTypes;
00061   std::list<LMFRunTag>   _lmfRunTags;
00062   std::list<LMFPrimVers> _lmfPrimVersions;  
00063   std::list<LMFSeqVers>  _lmfSeqVersions;  
00064   std::list<LMFCorrVers> _lmfCorrVersions;  
00065 };
00066 
00067 #endif