Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:31:50

0001 #ifndef _LMFDEFFABRIC_H_
0002 #define _LMFDEFFABRIC_H_
0003 
0004 /*
0005   This class is used to get once all the definitions from the ECAL LMF
0006   database and return them in various forms.
0007 
0008   Last updated by  Giovanni.Organtini@roma1.infn.it 2010
0009 */
0010 
0011 #include "OnlineDB/EcalCondDB/interface/IDBObject.h"
0012 #include "OnlineDB/Oracle/interface/Oracle.h"
0013 #include "OnlineDB/EcalCondDB/interface/EcalDBConnection.h"
0014 #include "OnlineDB/EcalCondDB/interface/LMFColor.h"
0015 #include "OnlineDB/EcalCondDB/interface/LMFTrigType.h"
0016 #include "OnlineDB/EcalCondDB/interface/LMFRunTag.h"
0017 #include "OnlineDB/EcalCondDB/interface/LMFPrimVers.h"
0018 #include "OnlineDB/EcalCondDB/interface/LMFCorrVers.h"
0019 #include "OnlineDB/EcalCondDB/interface/LMFSeqVers.h"
0020 #include "OnlineDB/EcalCondDB/interface/LMFUnique.h"
0021 
0022 #include <string>
0023 #include <list>
0024 
0025 class LMFDefFabric : public IDBObject {
0026 public:
0027   LMFDefFabric();
0028   LMFDefFabric(oracle::occi::Environment* env, oracle::occi::Connection* conn);
0029   LMFDefFabric(EcalDBConnection* c);
0030   ~LMFDefFabric() override;
0031 
0032   LMFColor getColor(std::string name) const;
0033   LMFColor getColor(int color_index) const;
0034   LMFColor getColorFromID(int color_id) const;
0035   int getColorID(std::string name) const;
0036   int getColorID(int color_index) const;
0037   LMFTrigType getTrigType(std::string sname) const;
0038   LMFTrigType getTrigTypeFromID(int trigType_id) const;
0039   int getTrigTypeID(std::string sname) const;
0040   LMFRunTag getRunTag(std::string tag, int version) const;
0041   LMFRunTag getRunTagFromID(int runTag_id) const;
0042   int getRunTagID(std::string tag, int version) const;
0043 
0044   std::list<LMFColor> getColors() const;
0045   std::list<LMFTrigType> getTriggerTypes() const;
0046   std::list<LMFRunTag> getRunTags() const;
0047 
0048   void initialize() noexcept(false);
0049   void debug();
0050   void noDebug();
0051 
0052   void dump();
0053 
0054 protected:
0055   bool _debug;
0056 
0057   std::list<LMFColor> _lmfColors;
0058   std::list<LMFTrigType> _lmfTrigTypes;
0059   std::list<LMFRunTag> _lmfRunTags;
0060   std::list<LMFPrimVers> _lmfPrimVersions;
0061   std::list<LMFSeqVers> _lmfSeqVersions;
0062   std::list<LMFCorrVers> _lmfCorrVersions;
0063 };
0064 
0065 #endif