CMS 3D CMS Logo

HcalDbASCIIIO.h
Go to the documentation of this file.
1 //
2 // F.Ratnikov (UMd), Jul. 19, 2005
3 //
4 #ifndef HcalDbASCIIIO_h
5 #define HcalDbASCIIIO_h
6 
7 #include <iostream>
8 #include <memory>
13 
54 namespace HcalDbASCIIIO {
55  //alternate function for creating certain objects
56  template <class T>
57  std::unique_ptr<T> createObject(std::istream& fInput) {
58  assert(0); //no general case, relies on specializations defined in cc file
59  return std::make_unique<T>();
60  }
61 
62  bool getObject(std::istream& fInput, HcalPedestals* fObject);
63  bool dumpObject(std::ostream& fOutput, const HcalPedestals& fObject);
64  bool getObject(std::istream& fInput, HcalPedestalWidths* fObject);
65  bool dumpObject(std::ostream& fOutput, const HcalPedestalWidths& fObject);
66  bool getObject(std::istream& fInput, HcalGains* fObject);
67  bool dumpObject(std::ostream& fOutput, const HcalGains& fObject);
68  bool getObject(std::istream& fInput, HcalGainWidths* fObject);
69  bool dumpObject(std::ostream& fOutput, const HcalGainWidths& fObject);
70  bool getObject(std::istream& fInput, HcalQIEData* fObject);
71  bool dumpObject(std::ostream& fOutput, const HcalQIEData& fObject);
72  bool getObject(std::istream& fInput, HcalCalibrationQIEData* fObject);
73  bool dumpObject(std::ostream& fOutput, const HcalCalibrationQIEData& fObject);
74  bool getObject(std::istream& fInput, HcalQIETypes* fObject);
75  bool dumpObject(std::ostream& fOutput, const HcalQIETypes& fObject);
76  template <>
77  std::unique_ptr<HcalElectronicsMap> createObject<HcalElectronicsMap>(std::istream& fInput);
78  bool dumpObject(std::ostream& fOutput, const HcalElectronicsMap& fObject);
79  bool getObject(std::istream& fInput, HcalChannelQuality* fObject);
80  bool dumpObject(std::ostream& fOutput, const HcalChannelQuality& fObject);
81  bool getObject(std::istream& fInput, HcalRespCorrs* fObject);
82  bool dumpObject(std::ostream& fOutput, const HcalRespCorrs& fObject);
83  bool getObject(std::istream& fInput, HcalLUTCorrs* fObject);
84  bool dumpObject(std::ostream& fOutput, const HcalLUTCorrs& fObject);
85  bool getObject(std::istream& fInput, HcalPFCorrs* fObject);
86  bool dumpObject(std::ostream& fOutput, const HcalPFCorrs& fObject);
87  bool getObject(std::istream& fInput, HcalTimeCorrs* fObject);
88  bool dumpObject(std::ostream& fOutput, const HcalTimeCorrs& fObject);
89  bool getObject(std::istream& fInput, HcalZSThresholds* fObject);
90  bool dumpObject(std::ostream& fOutput, const HcalZSThresholds& fObject);
91  bool getObject(std::istream& fInput, HcalL1TriggerObjects* fObject);
92  bool dumpObject(std::ostream& fOutput, const HcalL1TriggerObjects& fObject);
93  template <>
94  std::unique_ptr<HcalFrontEndMap> createObject<HcalFrontEndMap>(std::istream& fInput);
95  bool dumpObject(std::ostream& fOutput, const HcalFrontEndMap& fObject);
96 
97  bool getObject(std::istream& fInput, HcalValidationCorrs* fObject);
98  bool dumpObject(std::ostream& fOutput, const HcalValidationCorrs& fObject);
99  bool getObject(std::istream& fInput, HcalLutMetadata* fObject);
100  bool dumpObject(std::ostream& fOutput, const HcalLutMetadata& fObject);
101  bool getObject(std::istream& fInput, HcalDcsValues* fObject);
102  bool dumpObject(std::ostream& fOutput, const HcalDcsValues& fObject);
103  template <>
104  std::unique_ptr<HcalDcsMap> createObject<HcalDcsMap>(std::istream& fInput);
105  bool dumpObject(std::ostream& fOutput, const HcalDcsMap& fObject);
106 
107  bool getObject(std::istream& fInput, HcalRecoParams* fObject);
108  bool dumpObject(std::ostream& fOutput, const HcalRecoParams& fObject);
109  bool getObject(std::istream& fInput, HcalLongRecoParams* fObject);
110  bool dumpObject(std::ostream& fOutput, const HcalLongRecoParams& fObject);
111 
112  bool getObject(std::istream& fInput, HcalZDCLowGainFractions* fObject);
113  bool dumpObject(std::ostream& fOutput, const HcalZDCLowGainFractions& fObject);
114 
115  bool getObject(std::istream& fInput, HcalTimingParams* fObject);
116  bool dumpObject(std::ostream& fOutput, const HcalTimingParams& fObject);
117 
118  bool getObject(std::istream& fInput, HcalMCParams* fObject);
119  bool dumpObject(std::ostream& fOutput, const HcalMCParams& fObject);
120 
121  // Getting/Dumping Hcal Flag information
122  bool getObject(std::istream& fInput, HcalFlagHFDigiTimeParams* fObject);
123  bool dumpObject(std::ostream& fOutput, const HcalFlagHFDigiTimeParams& fObject);
124 
125  bool getObject(std::istream& fInput, HcalSiPMParameters* fObject);
126  bool dumpObject(std::ostream& fOutput, const HcalSiPMParameters& fObject);
127  template <>
128  std::unique_ptr<HcalSiPMCharacteristics> createObject<HcalSiPMCharacteristics>(std::istream& fInput);
129  bool dumpObject(std::ostream& fOutput, const HcalSiPMCharacteristics& fObject);
130 
131  bool getObject(std::istream& fInput, HcalTPParameters* fObject);
132  bool dumpObject(std::ostream& fOutput, const HcalTPParameters& fObject);
133  bool getObject(std::istream& fInput, HcalTPChannelParameters* fObject);
134  bool dumpObject(std::ostream& fOutput, const HcalTPChannelParameters& fObject);
135 
136  bool dumpObject(std::ostream& fOutput, const HcalCalibrationsSet& fObject);
137  bool dumpObject(std::ostream& fOutput, const HcalCalibrationWidthsSet& fObject);
138 
139  DetId getId(const std::vector<std::string>& items);
140  void dumpId(std::ostream& fOutput, DetId id);
141  void dumpIdShort(std::ostream& fOutput, DetId id);
142 } // namespace HcalDbASCIIIO
143 #endif
void dumpIdShort(std::ostream &fOutput, DetId id)
std::unique_ptr< HcalFrontEndMap > createObject< HcalFrontEndMap >(std::istream &fInput)
assert(be >=bs)
void dumpId(std::ostream &fOutput, DetId id)
std::unique_ptr< HcalSiPMCharacteristics > createObject< HcalSiPMCharacteristics >(std::istream &fInput)
Definition: DetId.h:17
bool getObject(std::istream &fInput, HcalPedestals *fObject)
DetId getId(const std::vector< std::string > &items)
bool dumpObject(std::ostream &fOutput, const HcalPedestals &fObject)
std::unique_ptr< T > createObject(std::istream &fInput)
Definition: HcalDbASCIIIO.h:57
std::unique_ptr< HcalDcsMap > createObject< HcalDcsMap >(std::istream &fInput)
std::unique_ptr< HcalElectronicsMap > createObject< HcalElectronicsMap >(std::istream &fInput)