File indexing completed on 2024-04-06 12:23:18
0001
0002 #ifndef OnlineDB_SiStripESSources_SiStripFedCablingBuilderFromDb_H
0003 #define OnlineDB_SiStripESSources_SiStripFedCablingBuilderFromDb_H
0004
0005 #include "CalibTracker/SiStripESProducers/interface/SiStripFedCablingESProducer.h"
0006 #include "DataFormats/SiStripCommon/interface/SiStripConstants.h"
0007 #include "FWCore/Framework/interface/EventSetupRecordIntervalFinder.h"
0008 #include <vector>
0009 #include <string>
0010 #include <cstdint>
0011
0012 class SiStripFedCablingRcd;
0013 class SiStripFedCabling;
0014 class SiStripFecCabling;
0015 class SiStripConfigDb;
0016 class TkDcuInfo;
0017
0018 class SiStripFedCablingBuilderFromDb : public SiStripFedCablingESProducer, public edm::EventSetupRecordIntervalFinder {
0019 public:
0020
0021
0022 SiStripFedCablingBuilderFromDb(const edm::ParameterSet&);
0023 ~SiStripFedCablingBuilderFromDb() override;
0024
0025
0026
0027
0028 SiStripFedCabling* make(const SiStripFedCablingRcd&) override;
0029
0030
0031
0032
0033
0034 static void getFedCabling(const SiStripFecCabling& in, SiStripFedCabling& out);
0035
0036
0037
0038 static void getFecCabling(const SiStripFedCabling& in, SiStripFecCabling& out);
0039
0040
0041
0042
0043
0044
0045 static void buildFecCabling(SiStripConfigDb* const, SiStripFecCabling&, const sistrip::CablingSource&);
0046
0047
0048
0049
0050 static void buildFecCabling(SiStripConfigDb* const, SiStripFecCabling&);
0051
0052
0053
0054
0055 static void buildFecCablingFromFedConnections(SiStripConfigDb* const, SiStripFecCabling&);
0056
0057
0058
0059
0060 static void buildFecCablingFromDevices(SiStripConfigDb* const, SiStripFecCabling&);
0061
0062
0063
0064
0065 static void buildFecCablingFromDetIds(SiStripConfigDb* const, SiStripFecCabling&);
0066
0067 protected:
0068
0069 void setIntervalFor(const edm::eventsetup::EventSetupRecordKey&,
0070 const edm::IOVSyncValue&,
0071 edm::ValidityInterval&) override;
0072
0073
0074 static void assignDcuAndDetIds(SiStripFecCabling&, const std::vector<std::pair<uint32_t, TkDcuInfo*> >&);
0075
0076
0077
0078 virtual void writeFedCablingToCondDb(const SiStripFedCabling&) { ; }
0079
0080
0081 SiStripConfigDb* db_;
0082
0083
0084 sistrip::CablingSource source_;
0085 };
0086
0087 #endif