File indexing completed on 2023-03-30 22:37:55
0001
0002
0003
0004 #ifndef HcalDbASCIIIO_h
0005 #define HcalDbASCIIIO_h
0006
0007 #include <iostream>
0008 #include <memory>
0009 #include "DataFormats/HcalDetId/interface/HcalDetId.h"
0010 #include "CondFormats/HcalObjects/interface/AllObjects.h"
0011 #include "CalibFormats/HcalObjects/interface/HcalCalibrationsSet.h"
0012 #include "CalibFormats/HcalObjects/interface/HcalCalibrationWidthsSet.h"
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056 namespace HcalDbASCIIIO {
0057
0058 template <class T>
0059 std::unique_ptr<T> createObject(std::istream& fInput) {
0060 assert(0);
0061 return std::make_unique<T>();
0062 }
0063
0064 bool getObject(std::istream& fInput, HcalPedestals* fObject);
0065 bool dumpObject(std::ostream& fOutput, const HcalPedestals& fObject);
0066 bool getObject(std::istream& fInput, HcalPedestalWidths* fObject);
0067 bool dumpObject(std::ostream& fOutput, const HcalPedestalWidths& fObject);
0068 bool getObject(std::istream& fInput, HcalGains* fObject);
0069 bool dumpObject(std::ostream& fOutput, const HcalGains& fObject);
0070 bool getObject(std::istream& fInput, HcalGainWidths* fObject);
0071 bool dumpObject(std::ostream& fOutput, const HcalGainWidths& fObject);
0072 bool getObject(std::istream& fInput, HcalPFCuts* fObject);
0073 bool dumpObject(std::ostream& fOutput, const HcalPFCuts& fObject);
0074 bool getObject(std::istream& fInput, HcalQIEData* fObject);
0075 bool dumpObject(std::ostream& fOutput, const HcalQIEData& fObject);
0076 bool getObject(std::istream& fInput, HcalCalibrationQIEData* fObject);
0077 bool dumpObject(std::ostream& fOutput, const HcalCalibrationQIEData& fObject);
0078 bool getObject(std::istream& fInput, HcalQIETypes* fObject);
0079 bool dumpObject(std::ostream& fOutput, const HcalQIETypes& fObject);
0080 template <>
0081 std::unique_ptr<HcalElectronicsMap> createObject<HcalElectronicsMap>(std::istream& fInput);
0082 bool dumpObject(std::ostream& fOutput, const HcalElectronicsMap& fObject);
0083 bool getObject(std::istream& fInput, HcalChannelQuality* fObject);
0084 bool dumpObject(std::ostream& fOutput, const HcalChannelQuality& fObject);
0085 bool getObject(std::istream& fInput, HcalRespCorrs* fObject);
0086 bool dumpObject(std::ostream& fOutput, const HcalRespCorrs& fObject);
0087 bool getObject(std::istream& fInput, HcalLUTCorrs* fObject);
0088 bool dumpObject(std::ostream& fOutput, const HcalLUTCorrs& fObject);
0089 bool getObject(std::istream& fInput, HcalPFCorrs* fObject);
0090 bool dumpObject(std::ostream& fOutput, const HcalPFCorrs& fObject);
0091 bool getObject(std::istream& fInput, HcalTimeCorrs* fObject);
0092 bool dumpObject(std::ostream& fOutput, const HcalTimeCorrs& fObject);
0093 bool getObject(std::istream& fInput, HcalZSThresholds* fObject);
0094 bool dumpObject(std::ostream& fOutput, const HcalZSThresholds& fObject);
0095 bool getObject(std::istream& fInput, HcalL1TriggerObjects* fObject);
0096 bool dumpObject(std::ostream& fOutput, const HcalL1TriggerObjects& fObject);
0097 template <>
0098 std::unique_ptr<HcalFrontEndMap> createObject<HcalFrontEndMap>(std::istream& fInput);
0099 bool dumpObject(std::ostream& fOutput, const HcalFrontEndMap& fObject);
0100
0101 bool getObject(std::istream& fInput, HcalValidationCorrs* fObject);
0102 bool dumpObject(std::ostream& fOutput, const HcalValidationCorrs& fObject);
0103 bool getObject(std::istream& fInput, HcalLutMetadata* fObject);
0104 bool dumpObject(std::ostream& fOutput, const HcalLutMetadata& fObject);
0105 bool getObject(std::istream& fInput, HcalDcsValues* fObject);
0106 bool dumpObject(std::ostream& fOutput, const HcalDcsValues& fObject);
0107 template <>
0108 std::unique_ptr<HcalDcsMap> createObject<HcalDcsMap>(std::istream& fInput);
0109 bool dumpObject(std::ostream& fOutput, const HcalDcsMap& fObject);
0110
0111 bool getObject(std::istream& fInput, HcalRecoParams* fObject);
0112 bool dumpObject(std::ostream& fOutput, const HcalRecoParams& fObject);
0113 bool getObject(std::istream& fInput, HcalLongRecoParams* fObject);
0114 bool dumpObject(std::ostream& fOutput, const HcalLongRecoParams& fObject);
0115
0116 bool getObject(std::istream& fInput, HcalZDCLowGainFractions* fObject);
0117 bool dumpObject(std::ostream& fOutput, const HcalZDCLowGainFractions& fObject);
0118
0119 bool getObject(std::istream& fInput, HcalTimingParams* fObject);
0120 bool dumpObject(std::ostream& fOutput, const HcalTimingParams& fObject);
0121
0122 bool getObject(std::istream& fInput, HcalMCParams* fObject);
0123 bool dumpObject(std::ostream& fOutput, const HcalMCParams& fObject);
0124
0125
0126 bool getObject(std::istream& fInput, HcalFlagHFDigiTimeParams* fObject);
0127 bool dumpObject(std::ostream& fOutput, const HcalFlagHFDigiTimeParams& fObject);
0128
0129 bool getObject(std::istream& fInput, HcalSiPMParameters* fObject);
0130 bool dumpObject(std::ostream& fOutput, const HcalSiPMParameters& fObject);
0131 template <>
0132 std::unique_ptr<HcalSiPMCharacteristics> createObject<HcalSiPMCharacteristics>(std::istream& fInput);
0133 bool dumpObject(std::ostream& fOutput, const HcalSiPMCharacteristics& fObject);
0134
0135 bool getObject(std::istream& fInput, HcalTPParameters* fObject);
0136 bool dumpObject(std::ostream& fOutput, const HcalTPParameters& fObject);
0137 bool getObject(std::istream& fInput, HcalTPChannelParameters* fObject);
0138 bool dumpObject(std::ostream& fOutput, const HcalTPChannelParameters& fObject);
0139
0140 bool dumpObject(std::ostream& fOutput, const HcalCalibrationsSet& fObject);
0141 bool dumpObject(std::ostream& fOutput, const HcalCalibrationWidthsSet& fObject);
0142
0143 DetId getId(const std::vector<std::string>& items);
0144 void dumpId(std::ostream& fOutput, DetId id);
0145 void dumpIdShort(std::ostream& fOutput, DetId id);
0146 }
0147 #endif