#include <PixelPopConDCSSourceHandler.h>
Public Member Functions | |
virtual void | getNewObjects () |
Get data from DB by calling PixelDCSBase::getData(). | |
virtual std::string | id () const |
Name of this source handler. | |
PixelPopConDCSSourceHandler (const edm::ParameterSet &) | |
Init PixelDCSBase from cfg file. | |
Private Member Functions | |
virtual void | fillObject (coral::ICursor &) |
Fill object from all rows in DB. | |
template<> | |
void | setValue (CaenChannel &value, const coral::AttributeList &row) |
Static Private Member Functions | |
static void | setValue (Type &value, const coral::AttributeList &) |
Specialise this template to assign values to a non-POD object type from a row in DB. |
Template class for the source handler of DCS data.
Specify the object type via the template parameter Type.
Definition at line 24 of file PixelPopConDCSSourceHandler.h.
PixelPopConDCSSourceHandler< Type >::PixelPopConDCSSourceHandler | ( | const edm::ParameterSet & | cfg | ) |
Init PixelDCSBase from cfg file.
Definition at line 49 of file PixelPopConDCSSourceHandler.h.
: PixelDCSBase(cfg) { }
void PixelPopConDCSSourceHandler< Type >::fillObject | ( | coral::ICursor & | cursor | ) | [private, virtual] |
Fill object from all rows in DB.
Definition at line 87 of file PixelPopConDCSSourceHandler.h.
References data, PixelDCSObject< T >::items, PixelDCSObject< T >::Item::name, reco::JetExtendedAssociation::setValue(), and PixelDCSObject< T >::Item::value.
{ PixelDCSObject<Type>* data = new PixelDCSObject<Type>; while ( cursor.next() ) { const coral::AttributeList& row = cursor.currentRow(); typename PixelDCSObject<Type>::Item datum; datum.name = row["name"].data<std::string>(); setValue(datum.value, row); data->items.push_back(datum); } this->m_to_transfer.push_back( std::make_pair(data, 1) ); }
void PixelPopConDCSSourceHandler< Type >::getNewObjects | ( | ) | [virtual] |
Get data from DB by calling PixelDCSBase::getData().
Implements popcon::PopConSourceHandler< PixelDCSObject< Type > >.
Definition at line 106 of file PixelPopConDCSSourceHandler.h.
References AlCaHLTBitMon_QueryRunRegistry::getData().
{ getData(); }
std::string PixelPopConDCSSourceHandler< Type >::id | ( | void | ) | const [virtual] |
Name of this source handler.
Implements popcon::PopConSourceHandler< PixelDCSObject< Type > >.
Definition at line 112 of file PixelPopConDCSSourceHandler.h.
References mergeVDriftHistosByStation::name.
void PixelPopConDCSSourceHandler< Type >::setValue | ( | Type & | value, |
const coral::AttributeList & | row | ||
) | [inline, static, private] |
Specialise this template to assign values to a non-POD object type from a row in DB.
Definition at line 55 of file PixelPopConDCSSourceHandler.h.
References Exception.
{ const size_t nTable = row.size() - 1; // row includes name if (1 != nTable) { throw cms::Exception("PixelPopConDCSSourceHandler") << "Found " << nTable << " last value tables instead of 1. " << "Check your cfg.\n"; } value = row[0].data<float>(); }
void PixelPopConDCSSourceHandler< CaenChannel >::setValue | ( | CaenChannel & | value, |
const coral::AttributeList & | row | ||
) | [private] |
Definition at line 70 of file PixelPopConDCSSourceHandler.h.
References Exception, CaenChannel::iMon, CaenChannel::isOn, and CaenChannel::vMon.
{ const size_t nTable = row.size() - 1; // row includes name if (3 != nTable) { throw cms::Exception("PixelPopConDCSSourceHandler<CaenChannel>") << "CaenChannel has 3 values (isOn, iMon, vMon) " << "but your cfg has " << nTable << " last value tables.\n"; } value.isOn = row[0].data<float>(); value.iMon = row[1].data<float>(); value.vMon = row[2].data<float>(); }