IO for XML instances of Hcal/Castor Calibrations. More...
Functions | |
bool | dumpObject (std::ostream &fOutput, unsigned fRun, unsigned long fGMTIOVBegin, unsigned long fGMTIOVEnd, const std::string &fTag, unsigned fVersion, const CastorPedestals &fObject, const CastorPedestalWidths &fError) |
bool | dumpObject (std::ostream &fOutput, unsigned fRun, unsigned long fGMTIOVBegin, unsigned long fGMTIOVEnd, const std::string &fTag, unsigned fVersion, const CastorCalibrationQIEData &fObject) |
bool | dumpObject (std::ostream &fOutput, unsigned fRun, unsigned long fGMTIOVBegin, unsigned long fGMTIOVEnd, const std::string &fTag, unsigned fVersion, const CastorQIEData &fObject) |
bool | dumpObject (std::ostream &fOutput, unsigned fRun, unsigned long fGMTIOVBegin, unsigned long fGMTIOVEnd, const std::string &fTag, unsigned fVersion, const CastorElectronicsMap &fObject) |
bool | dumpObject (std::ostream &fOutput, unsigned fRun, unsigned long fGMTIOVBegin, unsigned long fGMTIOVEnd, const std::string &fTag, unsigned fVersion, const CastorGainWidths &fObject) |
bool | dumpObject (std::ostream &fOutput, unsigned fRun, unsigned long fGMTIOVBegin, unsigned long fGMTIOVEnd, const std::string &fTag, unsigned fVersion, const CastorGains &fObject) |
bool | dumpObject (std::ostream &fOutput, unsigned fRun, unsigned long fGMTIOVBegin, unsigned long fGMTIOVEnd, const std::string &fTag, unsigned fVersion, const CastorGains &fObject, const CastorGainWidths &fError) |
bool | dumpObject (std::ostream &fOutput, unsigned fRun, unsigned long fGMTIOVBegin, unsigned long fGMTIOVEnd, const std::string &fTag, unsigned fVersion, const CastorPedestalWidths &fObject) |
bool | dumpObject (std::ostream &fOutput, unsigned fRun, unsigned long fGMTIOVBegin, unsigned long fGMTIOVEnd, const std::string &fTag, unsigned fVersion, const CastorPedestals &fObject) |
IO for XML instances of Hcal/Castor Calibrations.
bool CastorDbXml::dumpObject | ( | std::ostream & | fOutput, |
unsigned | fRun, | ||
unsigned long | fGMTIOVBegin, | ||
unsigned long | fGMTIOVEnd, | ||
const std::string & | fTag, | ||
unsigned | fVersion, | ||
const CastorPedestals & | fObject, | ||
const CastorPedestalWidths & | fError | ||
) |
Definition at line 168 of file CastorDbXml.cc.
References benchmark_cfg::cerr, lumiQueryAPI::dumpData(), benchmark_cfg::errors, CastorCondObjectContainer< Item >::getAllChannels(), CastorCondObjectContainer< Item >::getValues(), CastorPedestal::getValues(), CastorText2DetIdConverter::toString(), and makeHLTPrescaleTable::values.
{ const std::string KIND = "HCAL_PEDESTALS_V2"; dumpProlog (fOutput); dumpHeader (fOutput, fRun, KIND, KIND); std::vector<DetId> channels = fObject.getAllChannels (); for (std::vector<DetId>::iterator channel = channels.begin (); channel != channels.end (); channel++) { DetId chId = *channel; const float* values = fObject.getValues (chId)->getValues (); const CastorPedestalWidth* errors = fError.getValues (chId); if (!values) { std::cerr << "CastorDbXml::dumpObject-> Can not get data for channel " << CastorText2DetIdConverter(chId).toString () << std::endl; continue; } if (!errors) { std::cerr << "CastorDbXml::dumpObject-> Can not get errors for channel " << CastorText2DetIdConverter(chId).toString () << ". Use defaults" << std::endl; continue; } dumpDataset (fOutput, fVersion, "", ""); dumpChannelId (fOutput,chId); dumpData (fOutput, values, *errors); endDataset (fOutput); } dumpMapping (fOutput, fRun, KIND, fGMTIOVBegin, fGMTIOVEnd, fTag, fVersion, channels); dumpFooter (fOutput); return true; }
bool CastorDbXml::dumpObject | ( | std::ostream & | fOutput, |
unsigned | fRun, | ||
unsigned long | fGMTIOVBegin, | ||
unsigned long | fGMTIOVEnd, | ||
const std::string & | fTag, | ||
unsigned | fVersion, | ||
const CastorCalibrationQIEData & | fObject | ||
) |
Definition at line 38 of file CastorDbXml.h.
{return false;}
bool CastorDbXml::dumpObject | ( | std::ostream & | fOutput, |
unsigned | fRun, | ||
unsigned long | fGMTIOVBegin, | ||
unsigned long | fGMTIOVEnd, | ||
const std::string & | fTag, | ||
unsigned | fVersion, | ||
const CastorQIEData & | fObject | ||
) |
Definition at line 35 of file CastorDbXml.h.
{return false;}
bool CastorDbXml::dumpObject | ( | std::ostream & | fOutput, |
unsigned | fRun, | ||
unsigned long | fGMTIOVBegin, | ||
unsigned long | fGMTIOVEnd, | ||
const std::string & | fTag, | ||
unsigned | fVersion, | ||
const CastorElectronicsMap & | fObject | ||
) |
Definition at line 32 of file CastorDbXml.h.
{return false;}
bool CastorDbXml::dumpObject | ( | std::ostream & | fOutput, |
unsigned | fRun, | ||
unsigned long | fGMTIOVBegin, | ||
unsigned long | fGMTIOVEnd, | ||
const std::string & | fTag, | ||
unsigned | fVersion, | ||
const CastorGainWidths & | fObject | ||
) |
Definition at line 29 of file CastorDbXml.h.
{return false;}
bool CastorDbXml::dumpObject | ( | std::ostream & | fOutput, |
unsigned | fRun, | ||
unsigned long | fGMTIOVBegin, | ||
unsigned long | fGMTIOVEnd, | ||
const std::string & | fTag, | ||
unsigned | fVersion, | ||
const CastorGains & | fObject | ||
) |
Definition at line 202 of file CastorDbXml.cc.
References CastorCondObjectContainer< Item >::addValues(), gather_cfg::cout, CastorDbASCIIIO::dumpObject(), and CastorCondObjectContainer< Item >::getAllChannels().
{ float dummyErrors [4] = {0., 0., 0., 0.}; std::cout << "CastorDbXml::dumpObject-> set default errors: 4 x 0.0" << std::endl; CastorGainWidths widths; std::vector<DetId> channels = fObject.getAllChannels (); for (std::vector<DetId>::iterator channel = channels.begin (); channel != channels.end (); channel++) { CastorGainWidth item(*channel,dummyErrors[0],dummyErrors[1],dummyErrors[2],dummyErrors[3]); widths.addValues(item); } return dumpObject (fOutput, fRun, fGMTIOVBegin, fGMTIOVEnd, fTag, fVersion, fObject, widths); }
bool CastorDbXml::dumpObject | ( | std::ostream & | fOutput, |
unsigned | fRun, | ||
unsigned long | fGMTIOVBegin, | ||
unsigned long | fGMTIOVEnd, | ||
const std::string & | fTag, | ||
unsigned | fVersion, | ||
const CastorGains & | fObject, | ||
const CastorGainWidths & | fError | ||
) |
Definition at line 219 of file CastorDbXml.cc.
References benchmark_cfg::cerr, lumiQueryAPI::dumpData(), benchmark_cfg::errors, CastorCondObjectContainer< Item >::getAllChannels(), CastorCondObjectContainer< Item >::getValues(), CastorGain::getValues(), CastorGainWidth::getValues(), CastorText2DetIdConverter::toString(), and makeHLTPrescaleTable::values.
{ const std::string KIND = "HCAL Gains"; const std::string TABLE = "HCAL_GAIN_PEDSTL_CALIBRATIONS"; dumpProlog (fOutput); dumpHeader (fOutput, fRun, TABLE, KIND); std::vector<DetId> channels = fObject.getAllChannels (); for (std::vector<DetId>::iterator channel = channels.begin (); channel != channels.end (); channel++) { DetId chId = *channel; const float* values = fObject.getValues (chId)->getValues (); const float* errors = fError.getValues (chId)->getValues (); if (!values) { std::cerr << "CastorDbXml::dumpObject-> Can not get data for channel " << CastorText2DetIdConverter(chId).toString () << std::endl; continue; } if (!errors) { std::cerr << "CastorDbXml::dumpObject-> Can not get errors for channel " << CastorText2DetIdConverter(chId).toString () << ". Use defaults" << std::endl; continue; } dumpDataset (fOutput, fVersion, "", ""); dumpChannelId (fOutput,chId); dumpData (fOutput, values, errors); endDataset (fOutput); } dumpMapping (fOutput, fRun, KIND, fGMTIOVBegin, fGMTIOVEnd, fTag, fVersion, channels); dumpFooter (fOutput); return true; }
bool CastorDbXml::dumpObject | ( | std::ostream & | fOutput, |
unsigned | fRun, | ||
unsigned long | fGMTIOVBegin, | ||
unsigned long | fGMTIOVEnd, | ||
const std::string & | fTag, | ||
unsigned | fVersion, | ||
const CastorPedestalWidths & | fObject | ||
) |
Definition at line 20 of file CastorDbXml.h.
{return false;}
bool CastorDbXml::dumpObject | ( | std::ostream & | fOutput, |
unsigned | fRun, | ||
unsigned long | fGMTIOVBegin, | ||
unsigned long | fGMTIOVEnd, | ||
const std::string & | fTag, | ||
unsigned | fVersion, | ||
const CastorPedestals & | fObject | ||
) |
Definition at line 147 of file CastorDbXml.cc.
References gather_cfg::cout, CastorDbASCIIIO::dumpObject(), CastorCondObjectContainer< Item >::getAllChannels(), CastorPedestals::isADC(), and CastorPedestalWidth::setSigma().
{ float dummyError = 0.0001; std::cout << "CastorDbXml::dumpObject-> set default errors: 0.0001, 0.0001, 0.0001, 0.0001" << std::endl; CastorPedestalWidths widths(fObject.isADC() ); std::vector<DetId> channels = fObject.getAllChannels (); for (std::vector<DetId>::iterator channel = channels.begin (); channel != channels.end (); channel++) { CastorPedestalWidth item(*channel); for (int iCapId = 1; iCapId <= 4; iCapId++) { item.setSigma (iCapId, iCapId, dummyError*dummyError); } widths.addValues(item); } return dumpObject (fOutput, fRun, fGMTIOVBegin, fGMTIOVEnd, fTag, fVersion, fObject, widths); }