Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:57:33

0001 #ifndef CastorDbASCIIIO_h
0002 #define CastorDbASCIIIO_h
0003 
0004 #include <iostream>
0005 
0006 #include "DataFormats/HcalDetId/interface/HcalDetId.h"
0007 #include "CondFormats/CastorObjects/interface/AllObjects.h"
0008 
0009 /**
0010    \class CastorDbASCIIIO
0011    \brief IO for ASCII instances of Castor/HCAL Calibrations
0012    
0013 Text file formats for different data types is as following:
0014 - # in first column comments the line
0015 - CastorPedestals, CastorGains, CastorGainWidths have identical formats:
0016   eta(int)  phi(int) depth(int) det(HB,HE,HF) cap1_value(float) cap2_value(float) cap3_value(float) cap4_value(float)  HcalDetId(int,optional)
0017 - CastorPedestalWidths:
0018   eta(int)  phi(int) depth(int) det(HB,HE,HF) sigma_1_1(float) sigma_2_1 sigma_2_2 sigma_3_1 sigma_3_2 sigma_3_3 sigma_4_1 sigma_4_2 sigma_4_3 sigma_4_4
0019 - CastorQIEShape:
0020   33 x floats - low edges for first 33 channels of ideal QIE
0021 - CastorQIEData:
0022   eta phi depth det 4x offsets_cap1 4x offsets_cap2 4x offsets_cap3 4x offsets_cap4 4x slopes_cap1 4x slopes_cap2 4x slopes_cap3 4x slopes_cap4
0023 - CastorChannelQuality:
0024   eta phi depth det status(GOOD/BAD/HOT/DEAD)
0025 - CastorElectronicsMap:
0026   line#  crate HTR_slot top_bottom(t/b) dcc# dcc_spigot fiber fiberchan subdet(HB/HE/HF/HO/HT) eta phi depth
0027   line#  crate HTR_slot top_bottom(t/b) dcc# dcc_spigot fiber fiberchan "CBOX" 
0028                                  sector(HBM/HBP/HEM/HEP/HO0/HO1P/HO1M/HO2P/HO2M/HFP/HFM) rbx#(wage) channel
0029   calibration channel type association see HcalCalibDetId.h
0030   if electronics channel is known to be unconnected, either "subdet" or "eta" should be NA
0031 - CastorRecoParams
0032   eta(int)  phi(int) depth(int) det(HB,HE,HF) firstSample(unsigned int) samplesToAdd(unsigned int)  HcalDetId(int,optional)
0033 - CastorSaturationCorrs
0034   eta(int)  phi(int) depth(int) det(HB,HE,HF) SatCorr(float) HcalDetId(int,optional)
0035   
0036 */
0037 namespace CastorDbASCIIIO {
0038   bool getObject(std::istream& fInput, CastorPedestals& fObject);
0039   bool dumpObject(std::ostream& fOutput, const CastorPedestals& fObject);
0040   bool getObject(std::istream& fInput, CastorPedestalWidths& fObject);
0041   bool dumpObject(std::ostream& fOutput, const CastorPedestalWidths& fObject);
0042   bool getObject(std::istream& fInput, CastorGains& fObject);
0043   bool dumpObject(std::ostream& fOutput, const CastorGains& fObject);
0044   bool getObject(std::istream& fInput, CastorGainWidths& fObject);
0045   bool dumpObject(std::ostream& fOutput, const CastorGainWidths& fObject);
0046   bool getObject(std::istream& fInput, CastorQIEData& fObject);
0047   bool dumpObject(std::ostream& fOutput, const CastorQIEData& fObject);
0048   bool getObject(std::istream& fInput, CastorCalibrationQIEData& fObject);
0049   bool dumpObject(std::ostream& fOutput, const CastorCalibrationQIEData& fObject);
0050   bool getObject(std::istream& fInput, CastorElectronicsMap& fObject);
0051   bool dumpObject(std::ostream& fOutput, const CastorElectronicsMap& fObject);
0052   bool getObject(std::istream& fInput, CastorChannelQuality& fObject);
0053   bool dumpObject(std::ostream& fOutput, const CastorChannelQuality& fObject);
0054   bool getObject(std::istream& fInput, CastorRecoParams& fObject);
0055   bool dumpObject(std::ostream& fOutput, const CastorRecoParams& fObject);
0056   bool getObject(std::istream& fInput, CastorSaturationCorrs& fObject);
0057   bool dumpObject(std::ostream& fOutput, const CastorSaturationCorrs& fObject);
0058   DetId getId(const std::vector<std::string>& items);
0059   void dumpId(std::ostream& fOutput, DetId id);
0060 }  // namespace CastorDbASCIIIO
0061 #endif