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