IO for XML instances of Hcal Calibrations. More...
Functions | |
bool | dumpObject (std::ostream &fOutput, unsigned fRun, unsigned long fGMTIOVBegin, unsigned long fGMTIOVEnd, const std::string &fTag, unsigned fVersion, const HcalPedestals &fObject, const HcalPedestalWidths &fError) |
bool | dumpObject (std::ostream &fOutput, unsigned fRun, unsigned long fGMTIOVBegin, unsigned long fGMTIOVEnd, const std::string &fTag, const HcalCalibrationQIEData &fObject) |
bool | dumpObject (std::ostream &fOutput, unsigned fRun, unsigned long fGMTIOVBegin, unsigned long fGMTIOVEnd, const std::string &fTag, const HcalQIEData &fObject) |
bool | dumpObject (std::ostream &fOutput, unsigned fRun, unsigned long fGMTIOVBegin, unsigned long fGMTIOVEnd, const std::string &fTag, const HcalElectronicsMap &fObject) |
bool | dumpObject (std::ostream &fOutput, unsigned fRun, unsigned long fGMTIOVBegin, unsigned long fGMTIOVEnd, const std::string &fTag, const HcalGainWidths &fObject) |
bool | dumpObject (std::ostream &fOutput, unsigned fRun, unsigned long fGMTIOVBegin, unsigned long fGMTIOVEnd, const std::string &fTag, const HcalRawGains &fObject) |
bool | dumpObject (std::ostream &fOutput, unsigned fRun, unsigned long fGMTIOVBegin, unsigned long fGMTIOVEnd, const std::string &fTag, const HcalGains &fObject) |
bool | dumpObject (std::ostream &fOutput, unsigned fRun, unsigned long fGMTIOVBegin, unsigned long fGMTIOVEnd, const std::string &fTag, const HcalGains &fObject, const HcalGainWidths &fError) |
bool | dumpObject (std::ostream &fOutput, unsigned fRun, unsigned long fGMTIOVBegin, unsigned long fGMTIOVEnd, const std::string &fTag, const HcalPedestalWidths &fObject) |
bool | dumpObject (std::ostream &fOutput, unsigned fRun, unsigned long fGMTIOVBegin, unsigned long fGMTIOVEnd, const std::string &fTag, const HcalPedestals &fObject) |
bool | dumpObject (std::ostream &fOutput, unsigned fRun, unsigned long fGMTIOVBegin, unsigned long fGMTIOVEnd, const std::string &fTag, const HcalPedestals &fObject, const HcalPedestalWidths &fError) |
bool | dumpObject (std::ostream &fOutput, unsigned fRun, unsigned long fGMTIOVBegin, unsigned long fGMTIOVEnd, const std::string &fTag, unsigned fVersion, const HcalCalibrationQIEData &fObject) |
bool | dumpObject (std::ostream &fOutput, unsigned fRun, unsigned long fGMTIOVBegin, unsigned long fGMTIOVEnd, const std::string &fTag, unsigned fVersion, const HcalQIEData &fObject) |
bool | dumpObject (std::ostream &fOutput, unsigned fRun, unsigned long fGMTIOVBegin, unsigned long fGMTIOVEnd, const std::string &fTag, unsigned fVersion, const HcalElectronicsMap &fObject) |
bool | dumpObject (std::ostream &fOutput, unsigned fRun, unsigned long fGMTIOVBegin, unsigned long fGMTIOVEnd, const std::string &fTag, unsigned fVersion, const HcalGainWidths &fObject) |
bool | dumpObject (std::ostream &fOutput, unsigned fRun, unsigned long fGMTIOVBegin, unsigned long fGMTIOVEnd, const std::string &fTag, unsigned fVersion, const HcalGains &fObject) |
bool | dumpObject (std::ostream &fOutput, unsigned fRun, unsigned long fGMTIOVBegin, unsigned long fGMTIOVEnd, const std::string &fTag, unsigned fVersion, const HcalGains &fObject, const HcalGainWidths &fError) |
bool | dumpObject (std::ostream &fOutput, unsigned fRun, unsigned long fGMTIOVBegin, unsigned long fGMTIOVEnd, const std::string &fTag, unsigned fVersion, const HcalPedestalWidths &fObject) |
bool | dumpObject (std::ostream &fOutput, unsigned fRun, unsigned long fGMTIOVBegin, unsigned long fGMTIOVEnd, const std::string &fTag, unsigned fVersion, const HcalPedestals &fObject) |
IO for XML instances of Hcal Calibrations.
bool HcalDbXml::dumpObject | ( | std::ostream & | fOutput, |
unsigned | fRun, | ||
unsigned long | fGMTIOVBegin, | ||
unsigned long | fGMTIOVEnd, | ||
const std::string & | fTag, | ||
unsigned | fVersion, | ||
const HcalPedestals & | fObject, | ||
const HcalPedestalWidths & | fError | ||
) |
Definition at line 168 of file HcalDbXml.cc.
References benchmark_cfg::cerr, lumiQueryAPI::dumpData(), benchmark_cfg::errors, HcalCondObjectContainer< Item >::getAllChannels(), HcalCondObjectContainer< Item >::getValues(), HcalPedestal::getValues(), HcalText2DetIdConverter::toString(), and makeHLTPrescaleTable::values.
Referenced by copyObject().
{ 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 HcalPedestalWidth* errors = fError.getValues (chId); if (!values) { std::cerr << "HcalDbXml::dumpObject-> Can not get data for channel " << HcalText2DetIdConverter(chId).toString () << std::endl; continue; } if (!errors) { std::cerr << "HcalDbXml::dumpObject-> Can not get errors for channel " << HcalText2DetIdConverter(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 HcalDbXml::dumpObject | ( | std::ostream & | fOutput, |
unsigned | fRun, | ||
unsigned long | fGMTIOVBegin, | ||
unsigned long | fGMTIOVEnd, | ||
const std::string & | fTag, | ||
const HcalCalibrationQIEData & | fObject | ||
) | [inline] |
Definition at line 46 of file HcalDbXml.h.
{return false;}
bool HcalDbXml::dumpObject | ( | std::ostream & | fOutput, |
unsigned | fRun, | ||
unsigned long | fGMTIOVBegin, | ||
unsigned long | fGMTIOVEnd, | ||
const std::string & | fTag, | ||
const HcalQIEData & | fObject | ||
) | [inline] |
Definition at line 43 of file HcalDbXml.h.
{return false;}
bool HcalDbXml::dumpObject | ( | std::ostream & | fOutput, |
unsigned | fRun, | ||
unsigned long | fGMTIOVBegin, | ||
unsigned long | fGMTIOVEnd, | ||
const std::string & | fTag, | ||
const HcalElectronicsMap & | fObject | ||
) | [inline] |
Definition at line 40 of file HcalDbXml.h.
{return false;}
bool HcalDbXml::dumpObject | ( | std::ostream & | fOutput, |
unsigned | fRun, | ||
unsigned long | fGMTIOVBegin, | ||
unsigned long | fGMTIOVEnd, | ||
const std::string & | fTag, | ||
const HcalGainWidths & | fObject | ||
) | [inline] |
Definition at line 37 of file HcalDbXml.h.
{return false;}
bool HcalDbXml::dumpObject | ( | std::ostream & | fOutput, |
unsigned | fRun, | ||
unsigned long | fGMTIOVBegin, | ||
unsigned long | fGMTIOVEnd, | ||
const std::string & | fTag, | ||
const HcalRawGains & | fObject | ||
) |
Definition at line 391 of file HcalDbXml.cc.
References dumpObject_().
{ return dumpObject_ (fOutput, fRun, fGMTIOVBegin, fGMTIOVEnd, fTag, &fObject, (const HcalGainWidths*)0); }
bool HcalDbXml::dumpObject | ( | std::ostream & | fOutput, |
unsigned | fRun, | ||
unsigned long | fGMTIOVBegin, | ||
unsigned long | fGMTIOVEnd, | ||
const std::string & | fTag, | ||
const HcalGains & | fObject | ||
) |
Definition at line 378 of file HcalDbXml.cc.
References HcalCondObjectContainer< Item >::addValues(), CastorDbASCIIIO::dumpObject(), and HcalCondObjectContainer< Item >::getAllChannels().
{ HcalGainWidths widths; std::vector<DetId> channels = fObject.getAllChannels (); for (std::vector<DetId>::iterator channel = channels.begin (); channel != channels.end (); channel++) { HcalGainWidth item(*channel,0,0,0,0); widths.addValues(item); // no error } return dumpObject (fOutput, fRun, fGMTIOVBegin, fGMTIOVEnd, fTag, fObject, widths); }
bool HcalDbXml::dumpObject | ( | std::ostream & | fOutput, |
unsigned | fRun, | ||
unsigned long | fGMTIOVBegin, | ||
unsigned long | fGMTIOVEnd, | ||
const std::string & | fTag, | ||
const HcalGains & | fObject, | ||
const HcalGainWidths & | fError | ||
) |
Definition at line 372 of file HcalDbXml.cc.
References dumpObject_().
{ return dumpObject_ (fOutput, fRun, fGMTIOVBegin, fGMTIOVEnd, fTag, &fObject, &fError); }
bool HcalDbXml::dumpObject | ( | std::ostream & | fOutput, |
unsigned | fRun, | ||
unsigned long | fGMTIOVBegin, | ||
unsigned long | fGMTIOVEnd, | ||
const std::string & | fTag, | ||
const HcalPedestalWidths & | fObject | ||
) |
Definition at line 25 of file HcalDbXml.h.
{return false;}
bool HcalDbXml::dumpObject | ( | std::ostream & | fOutput, |
unsigned | fRun, | ||
unsigned long | fGMTIOVBegin, | ||
unsigned long | fGMTIOVEnd, | ||
const std::string & | fTag, | ||
const HcalPedestals & | fObject | ||
) |
Definition at line 352 of file HcalDbXml.cc.
References gather_cfg::cout, CastorDbASCIIIO::dumpObject(), HcalCondObjectContainer< Item >::getAllChannels(), HcalPedestals::isADC(), and HcalPedestalWidth::setSigma().
{ float dummyError = 0.0001; std::cout << "HcalDbXml::dumpObject-> set default errors: 0.0001, 0.0001, 0.0001, 0.0001" << std::endl; HcalPedestalWidths widths(fObject.isADC() ); std::vector<DetId> channels = fObject.getAllChannels (); for (std::vector<DetId>::iterator channel = channels.begin (); channel != channels.end (); channel++) { HcalPedestalWidth item(*channel); for (int iCapId = 0; iCapId < 4; iCapId++) { item.setSigma (iCapId, iCapId, dummyError*dummyError); } widths.addValues(item); } return dumpObject (fOutput, fRun, fGMTIOVBegin, fGMTIOVEnd, fTag, fObject, widths); }
bool HcalDbXml::dumpObject | ( | std::ostream & | fOutput, |
unsigned | fRun, | ||
unsigned long | fGMTIOVBegin, | ||
unsigned long | fGMTIOVEnd, | ||
const std::string & | fTag, | ||
const HcalPedestals & | fObject, | ||
const HcalPedestalWidths & | fError | ||
) |
Definition at line 346 of file HcalDbXml.cc.
References dumpObject_().
{ return dumpObject_ (fOutput, fRun, fGMTIOVBegin, fGMTIOVEnd, fTag, &fObject, &fError); }
bool HcalDbXml::dumpObject | ( | std::ostream & | fOutput, |
unsigned | fRun, | ||
unsigned long | fGMTIOVBegin, | ||
unsigned long | fGMTIOVEnd, | ||
const std::string & | fTag, | ||
unsigned | fVersion, | ||
const HcalCalibrationQIEData & | fObject | ||
) |
Definition at line 43 of file HcalDbXml.h.
{return false;}
bool HcalDbXml::dumpObject | ( | std::ostream & | fOutput, |
unsigned | fRun, | ||
unsigned long | fGMTIOVBegin, | ||
unsigned long | fGMTIOVEnd, | ||
const std::string & | fTag, | ||
unsigned | fVersion, | ||
const HcalQIEData & | fObject | ||
) |
Definition at line 40 of file HcalDbXml.h.
References HcalCondObjectContainer< Item >::exists(), HcalCondObjectContainer< Item >::getAllChannels(), and HcalQIEData::getCoder().
{return false;}
bool HcalDbXml::dumpObject | ( | std::ostream & | fOutput, |
unsigned | fRun, | ||
unsigned long | fGMTIOVBegin, | ||
unsigned long | fGMTIOVEnd, | ||
const std::string & | fTag, | ||
unsigned | fVersion, | ||
const HcalElectronicsMap & | fObject | ||
) |
Definition at line 37 of file HcalDbXml.h.
{return false;}
bool HcalDbXml::dumpObject | ( | std::ostream & | fOutput, |
unsigned | fRun, | ||
unsigned long | fGMTIOVBegin, | ||
unsigned long | fGMTIOVEnd, | ||
const std::string & | fTag, | ||
unsigned | fVersion, | ||
const HcalGainWidths & | fObject | ||
) |
Definition at line 34 of file HcalDbXml.h.
References HcalCondObjectContainer< Item >::exists(), HcalCondObjectContainer< Item >::getAllChannels(), and HcalCondObjectContainer< Item >::getValues().
{return false;}
bool HcalDbXml::dumpObject | ( | std::ostream & | fOutput, |
unsigned | fRun, | ||
unsigned long | fGMTIOVBegin, | ||
unsigned long | fGMTIOVEnd, | ||
const std::string & | fTag, | ||
unsigned | fVersion, | ||
const HcalGains & | fObject | ||
) |
Definition at line 202 of file HcalDbXml.cc.
References HcalCondObjectContainer< Item >::addValues(), gather_cfg::cout, CastorDbASCIIIO::dumpObject(), and HcalCondObjectContainer< Item >::getAllChannels().
{ float dummyErrors [4] = {0., 0., 0., 0.}; std::cout << "HcalDbXml::dumpObject-> set default errors: 4 x 0.0" << std::endl; HcalGainWidths widths; std::vector<DetId> channels = fObject.getAllChannels (); for (std::vector<DetId>::iterator channel = channels.begin (); channel != channels.end (); channel++) { HcalGainWidth item(*channel,dummyErrors[0],dummyErrors[1],dummyErrors[2],dummyErrors[3]); widths.addValues(item); } return dumpObject (fOutput, fRun, fGMTIOVBegin, fGMTIOVEnd, fTag, fVersion, fObject, widths); }
bool HcalDbXml::dumpObject | ( | std::ostream & | fOutput, |
unsigned | fRun, | ||
unsigned long | fGMTIOVBegin, | ||
unsigned long | fGMTIOVEnd, | ||
const std::string & | fTag, | ||
unsigned | fVersion, | ||
const HcalGains & | fObject, | ||
const HcalGainWidths & | fError | ||
) |
Definition at line 219 of file HcalDbXml.cc.
References benchmark_cfg::cerr, lumiQueryAPI::dumpData(), benchmark_cfg::errors, HcalCondObjectContainer< Item >::getAllChannels(), HcalGainWidth::getValues(), HcalCondObjectContainer< Item >::getValues(), HcalGain::getValues(), HcalText2DetIdConverter::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 << "HcalDbXml::dumpObject-> Can not get data for channel " << HcalText2DetIdConverter(chId).toString () << std::endl; continue; } if (!errors) { std::cerr << "HcalDbXml::dumpObject-> Can not get errors for channel " << HcalText2DetIdConverter(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 HcalDbXml::dumpObject | ( | std::ostream & | fOutput, |
unsigned | fRun, | ||
unsigned long | fGMTIOVBegin, | ||
unsigned long | fGMTIOVEnd, | ||
const std::string & | fTag, | ||
unsigned | fVersion, | ||
const HcalPedestalWidths & | fObject | ||
) |
Definition at line 25 of file HcalDbXml.h.
{return false;}
bool HcalDbXml::dumpObject | ( | std::ostream & | fOutput, |
unsigned | fRun, | ||
unsigned long | fGMTIOVBegin, | ||
unsigned long | fGMTIOVEnd, | ||
const std::string & | fTag, | ||
unsigned | fVersion, | ||
const HcalPedestals & | fObject | ||
) |
Definition at line 147 of file HcalDbXml.cc.
References gather_cfg::cout, CastorDbASCIIIO::dumpObject(), HcalCondObjectContainer< Item >::getAllChannels(), HcalPedestals::isADC(), and HcalPedestalWidth::setSigma().
{ float dummyError = 0.0001; std::cout << "HcalDbXml::dumpObject-> set default errors: 0.0001, 0.0001, 0.0001, 0.0001" << std::endl; HcalPedestalWidths widths(fObject.isADC() ); std::vector<DetId> channels = fObject.getAllChannels (); for (std::vector<DetId>::iterator channel = channels.begin (); channel != channels.end (); channel++) { HcalPedestalWidth 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); }