File indexing completed on 2025-05-27 01:56:01
0001
0002
0003 #ifndef CondFormats_HGCalObjects_HGCalConfiguraton_h
0004 #define CondFormats_HGCalObjects_HGCalConfiguraton_h
0005 #include "CondFormats/Serialization/interface/Serializable.h"
0006 #include "CondFormats/HGCalObjects/interface/HGCalMappingModuleIndexer.h"
0007 #include <map>
0008 #include <vector>
0009
0010
0011 struct HGCalROCConfig {
0012 uint32_t charMode;
0013 COND_SERIALIZABLE;
0014 };
0015
0016
0017 struct HGCalECONDConfig {
0018
0019 uint32_t headerMarker;
0020 std::vector<HGCalROCConfig> rocs;
0021 COND_SERIALIZABLE;
0022 };
0023
0024
0025 struct HGCalFedConfig {
0026 bool mismatchPassthroughMode;
0027 uint32_t cbHeaderMarker;
0028 uint32_t slinkHeaderMarker;
0029 std::vector<HGCalECONDConfig> econds;
0030 COND_SERIALIZABLE;
0031 };
0032
0033
0034
0035
0036
0037
0038 class HGCalConfiguration {
0039 public:
0040 std::vector<HGCalFedConfig> feds;
0041
0042 private:
0043 COND_SERIALIZABLE;
0044 };
0045
0046 inline std::ostream& operator<<(std::ostream& os, const HGCalConfiguration& config) {
0047 uint32_t nfed = config.feds.size();
0048 uint32_t ntotmod = 0;
0049 uint32_t ntotroc = 0;
0050 for (auto const& fed : config.feds) {
0051 ntotmod += fed.econds.size();
0052 for (auto const& mod : fed.econds) {
0053 ntotroc += mod.rocs.size();
0054 }
0055 }
0056 os << "HGCalConfiguration(nfed=" << nfed << ",ntotmod=" << ntotmod << ",ntotroc=" << ntotroc << ")";
0057 return os;
0058 }
0059
0060 #endif