#include <PopConSourceHandler.h>
Classes | |
class | Ref |
struct | Triplet |
Public Types | |
typedef std::vector< Triplet > | Container |
typedef std::vector< std::pair < T *, cond::Time_t > > | OldContainer |
typedef PopConSourceHandler< T > | self |
typedef cond::Summary | Summary |
typedef cond::Time_t | Time_t |
typedef T | value_type |
Public Member Functions | |
void | convertFromOld () |
Summary * | dummySummary (typename OldContainer::value_type const &) const |
virtual void | getNewObjects ()=0 |
virtual std::string | id () const =0 |
void | initialize (cond::DbSession dbSession, cond::TagInfo const &tagInfo, cond::LogDBEntry const &logDBEntry) |
Ref | lastPayload () const |
cond::LogDBEntry const & | logDBEntry () const |
std::pair< Container const *, std::string const > | operator() (cond::DbSession session, cond::TagInfo const &tagInfo, cond::LogDBEntry const &logDBEntry) const |
PopConSourceHandler () | |
Container const & | returnData () |
void | sort () |
cond::TagInfo const & | tagInfo () const |
std::string const & | userTextLog () const |
virtual | ~PopConSourceHandler () |
Protected Member Functions | |
int | add (value_type *payload, Summary *summary, Time_t time) |
Protected Attributes | |
OldContainer | m_to_transfer |
std::string | m_userTextLog |
Private Attributes | |
cond::LogDBEntry const * | m_logDBEntry |
cond::DbSession | m_session |
cond::TagInfo const * | m_tagInfo |
Container | m_triplets |
Online DB source handler, aims at returning the vector of data to be transferred to the online database Subdetector developers inherit over this class with template parameter of payload class; need just to implement the getNewObjects method that loads the calibs, the sourceId methods that return a text identifier of the source, and provide a constructor that accept a ParameterSet
Definition at line 35 of file PopConSourceHandler.h.
typedef std::vector<Triplet> popcon::PopConSourceHandler< T >::Container |
Definition at line 48 of file PopConSourceHandler.h.
typedef std::vector<std::pair<T*, cond::Time_t> > popcon::PopConSourceHandler< T >::OldContainer |
Definition at line 50 of file PopConSourceHandler.h.
typedef PopConSourceHandler<T> popcon::PopConSourceHandler< T >::self |
Definition at line 38 of file PopConSourceHandler.h.
typedef cond::Summary popcon::PopConSourceHandler< T >::Summary |
Definition at line 40 of file PopConSourceHandler.h.
typedef cond::Time_t popcon::PopConSourceHandler< T >::Time_t |
Definition at line 39 of file PopConSourceHandler.h.
typedef T popcon::PopConSourceHandler< T >::value_type |
Definition at line 37 of file PopConSourceHandler.h.
popcon::PopConSourceHandler< T >::PopConSourceHandler | ( | ) | [inline] |
Definition at line 93 of file PopConSourceHandler.h.
: m_tagInfo(0), m_logDBEntry(0){}
virtual popcon::PopConSourceHandler< T >::~PopConSourceHandler | ( | ) | [inline, virtual] |
Definition at line 97 of file PopConSourceHandler.h.
{ }
int popcon::PopConSourceHandler< T >::add | ( | value_type * | payload, |
Summary * | summary, | ||
Time_t | time | ||
) | [inline, protected] |
Definition at line 170 of file PopConSourceHandler.h.
Referenced by popcon::PopConSourceHandler< CastorPedestals >::convertFromOld().
{ Triplet t = {payload,summary,time}; m_triplets.push_back(t); return m_triplets.size(); }
void popcon::PopConSourceHandler< T >::convertFromOld | ( | ) | [inline] |
Definition at line 158 of file PopConSourceHandler.h.
Referenced by popcon::PopConSourceHandler< CastorPedestals >::returnData().
{ std::for_each( m_to_transfer.begin(), m_to_transfer.end(), boost::bind(&self::add, this, boost::bind(&OldContainer::value_type::first,_1), boost::bind(&self::dummySummary, this, _1), boost::bind(&OldContainer::value_type::second,_1) )); }
Summary* popcon::PopConSourceHandler< T >::dummySummary | ( | typename OldContainer::value_type const & | ) | const [inline] |
Definition at line 154 of file PopConSourceHandler.h.
Referenced by popcon::PopConSourceHandler< CastorPedestals >::convertFromOld().
{ return new cond::GenericSummary("not supplied"); }
virtual void popcon::PopConSourceHandler< T >::getNewObjects | ( | ) | [pure virtual] |
Implemented in popcon::SiStripDetVOffHandler, popcon::DQMReferenceHistogramRootFileSourceHandler, popcon::DQMSummarySourceHandler, popcon::DQMXMLFileSourceHandler, DTDeadFlagHandler, DTHVStatusHandler, DTKeyedConfigHandler, DTLVStatusHandler, DTMtimeHandler, DTPerformanceHandler, DTRangeT0Handler, DTReadOutMappingHandler, DTStatusFlagHandler, DTT0Handler, DTTPGParametersHandler, DTTtrigHandler, DTUserKeyedConfigHandler, popcon::EcalADCToGeVHandler, popcon::EcalChannelStatusHandler, EcalCondHandler< Payload, XMLTranslator >, popcon::EcalDAQHandler, popcon::EcalDCSHandler, EcalFloatCondObjectContainerHandler, popcon::EcalIntercalibHandler, popcon::EcalLaserHandler, EcalMappingElectronicsHandler, popcon::EcalPedestalsHandler, popcon::EcalSRPHandler, popcon::EcalTPGBadStripHandler, popcon::EcalTPGBadTTHandler, popcon::EcalTPGBadXTHandler, popcon::EcalTPGFineGrainEBGroupHandler, popcon::EcalTPGFineGrainEBIdMapHandler, popcon::EcalTPGFineGrainStripEEHandler, popcon::EcalTPGFineGrainTowerEEHandler, popcon::EcalTPGLinConstHandler, popcon::EcalTPGLutGroupHandler, popcon::EcalTPGLutIdMapHandler, popcon::EcalTPGPedestalsHandler, popcon::EcalTPGPhysicsConstHandler, popcon::EcalTPGSlidingWindowHandler, popcon::EcalTPGSpikeThresholdHandler, popcon::EcalTPGWeightGroupHandler, popcon::EcalTPGWeightIdMapHandler, CastorChannelQualityHandler, CastorElectronicsMapHandler, CastorGainsHandler, CastorGainWidthsHandler, CastorPedestalsHandler, CastorPedestalWidthsHandler, CastorQIEDataHandler, CastorRecoParamsHandler, CastorSaturationCorrsHandler, HcalChannelQualityHandler, HcalCholeskyMatricesHandler, HcalCovarianceMatricesHandler, HcalDcsMapHandler, HcalDcsValuesHandler, HcalElectronicsMapHandler, HcalFlagHFDigiTimeParamsHandler, HcalGainsHandler, HcalGainWidthsHandler, HcalL1TriggerObjectsHandler, HcalLongRecoParamsHandler, HcalLUTCorrsHandler, HcalLutMetadataHandler, HcalMCParamsHandler, HcalPedestalsHandler, HcalPedestalWidthsHandler, HcalPFCorrsHandler, HcalQIEDataHandler, HcalRecoParamsHandler, HcalRespCorrsHandler, HcalTimeCorrsHandler, HcalTimingParamsHandler, HcalValidationCorrsHandler, HcalZSThresholdsHandler, popcon::L1RPCHwConfigSourceHandler, RPCDBPerformanceHandler, popcon::RPCEMapSourceHandler, popcon::RpcDataFebmap, popcon::RpcDataGasMix, popcon::RpcObGasData, popcon::RPCObPVSSmapData, popcon::RpcDataI, popcon::RpcDataS, popcon::RpcDataT, popcon::RpcDataUXC, popcon::RpcDataV, FillInfoPopConSourceHandler, L1TriggerScalerHandler, RunInfoHandler, RunSummaryHandler, PixelPopConDCSSourceHandler< Type >, PixelPopConSourceHandler< T >, popcon::SiStripPopConDbObjHandler< T, U >, RPCDBHandler, popcon::DQMHistoryPopConHandler< U >, popcon::SiStripPopConConfigDbObjHandler< T >, popcon::SiStripPopConHandlerUnitTest< T >, popcon::SiStripPopConHandlerUnitTestGain< T >, popcon::SiStripPopConHandlerUnitTestNoise< T >, CentralityTableHandler, PixelPopConSourceHandler< SiPixelCalibConfiguration >, PixelPopConSourceHandler< SiPixelFedCablingMap >, PixelPopConSourceHandler< bool >, and PixelPopConSourceHandler< SiPixelDisabledModules >.
Referenced by popcon::PopConSourceHandler< CastorPedestals >::returnData().
virtual std::string popcon::PopConSourceHandler< T >::id | ( | ) | const [pure virtual] |
Implemented in popcon::SiStripDetVOffHandler, popcon::DQMReferenceHistogramRootFileSourceHandler, popcon::DQMSummarySourceHandler, popcon::DQMXMLFileSourceHandler, DTDeadFlagHandler, DTHVStatusHandler, DTKeyedConfigHandler, DTLVStatusHandler, DTMtimeHandler, DTPerformanceHandler, DTRangeT0Handler, DTReadOutMappingHandler, DTStatusFlagHandler, DTT0Handler, DTTPGParametersHandler, DTTtrigHandler, DTUserKeyedConfigHandler, popcon::EcalADCToGeVHandler, popcon::EcalChannelStatusHandler, EcalCondHandler< Payload, XMLTranslator >, popcon::EcalDAQHandler, popcon::EcalDCSHandler, EcalFloatCondObjectContainerHandler, popcon::EcalIntercalibHandler, popcon::EcalLaserHandler, EcalMappingElectronicsHandler, popcon::EcalPedestalsHandler, popcon::EcalSRPHandler, popcon::EcalTPGBadStripHandler, popcon::EcalTPGBadTTHandler, popcon::EcalTPGBadXTHandler, popcon::EcalTPGFineGrainEBGroupHandler, popcon::EcalTPGFineGrainEBIdMapHandler, popcon::EcalTPGFineGrainStripEEHandler, popcon::EcalTPGFineGrainTowerEEHandler, popcon::EcalTPGLinConstHandler, popcon::EcalTPGLutGroupHandler, popcon::EcalTPGLutIdMapHandler, popcon::EcalTPGPedestalsHandler, popcon::EcalTPGPhysicsConstHandler, popcon::EcalTPGSlidingWindowHandler, popcon::EcalTPGSpikeThresholdHandler, popcon::EcalTPGWeightGroupHandler, popcon::EcalTPGWeightIdMapHandler, CastorChannelQualityHandler, CastorElectronicsMapHandler, CastorGainsHandler, CastorGainWidthsHandler, CastorPedestalsHandler, CastorPedestalWidthsHandler, CastorQIEDataHandler, CastorRecoParamsHandler, CastorSaturationCorrsHandler, HcalChannelQualityHandler, HcalCholeskyMatricesHandler, HcalCovarianceMatricesHandler, HcalDcsMapHandler, HcalDcsValuesHandler, HcalElectronicsMapHandler, HcalFlagHFDigiTimeParamsHandler, HcalGainsHandler, HcalGainWidthsHandler, HcalL1TriggerObjectsHandler, HcalLongRecoParamsHandler, HcalLUTCorrsHandler, HcalLutMetadataHandler, HcalMCParamsHandler, HcalPedestalsHandler, HcalPedestalWidthsHandler, HcalPFCorrsHandler, HcalQIEDataHandler, HcalRecoParamsHandler, HcalRespCorrsHandler, HcalTimeCorrsHandler, HcalTimingParamsHandler, HcalValidationCorrsHandler, HcalZSThresholdsHandler, popcon::L1RPCHwConfigSourceHandler, RPCDBPerformanceHandler, popcon::RPCEMapSourceHandler, popcon::RpcDataFebmap, popcon::RpcDataGasMix, popcon::RpcObGasData, popcon::RPCObPVSSmapData, popcon::RpcDataI, popcon::RpcDataS, popcon::RpcDataT, popcon::RpcDataUXC, popcon::RpcDataV, FillInfoPopConSourceHandler, L1TriggerScalerHandler, RunInfoHandler, RunSummaryHandler, PixelPopConCalibSourceHandler, PixelPopConDCSSourceHandler< Type >, PixelPopConSourceHandler< T >, popcon::SiStripPopConDbObjHandler< T, U >, RPCDBHandler, popcon::DQMHistoryPopConHandler< U >, popcon::SiStripPopConConfigDbObjHandler< T >, popcon::SiStripPopConHandlerUnitTest< T >, popcon::SiStripPopConHandlerUnitTestGain< T >, popcon::SiStripPopConHandlerUnitTestNoise< T >, CentralityTableHandler, PixelPopConSourceHandler< SiPixelCalibConfiguration >, PixelPopConSourceHandler< SiPixelFedCablingMap >, PixelPopConSourceHandler< bool >, and PixelPopConSourceHandler< SiPixelDisabledModules >.
void popcon::PopConSourceHandler< T >::initialize | ( | cond::DbSession | dbSession, |
cond::TagInfo const & | tagInfo, | ||
cond::LogDBEntry const & | logDBEntry | ||
) | [inline] |
Definition at line 112 of file PopConSourceHandler.h.
Referenced by popcon::PopConSourceHandler< CastorPedestals >::operator()().
{ m_session = dbSession; m_tagInfo = &tagInfo; m_logDBEntry = &logDBEntry; }
Ref popcon::PopConSourceHandler< T >::lastPayload | ( | ) | const [inline] |
Definition at line 104 of file PopConSourceHandler.h.
cond::LogDBEntry const& popcon::PopConSourceHandler< T >::logDBEntry | ( | ) | const [inline] |
Definition at line 109 of file PopConSourceHandler.h.
Referenced by popcon::SiStripPopConHandlerUnitTestGain< T >::getNewObjects(), popcon::SiStripPopConHandlerUnitTestNoise< T >::getNewObjects(), popcon::SiStripPopConDbObjHandler< T, U >::getNewObjects(), popcon::SiStripPopConConfigDbObjHandler< T >::getNewObjects(), popcon::SiStripPopConHandlerUnitTest< T >::getNewObjects(), popcon::PopConSourceHandler< CastorPedestals >::initialize(), popcon::SiStripPopConDbObjHandler< T, U >::isTransferNeeded(), popcon::SiStripPopConHandlerUnitTestGain< T >::isTransferNeeded(), popcon::SiStripPopConConfigDbObjHandler< T >::isTransferNeeded(), popcon::SiStripPopConHandlerUnitTestNoise< T >::isTransferNeeded(), and popcon::SiStripPopConHandlerUnitTest< T >::isTransferNeeded().
{ return *m_logDBEntry; }
std::pair<Container const *, std::string const> popcon::PopConSourceHandler< T >::operator() | ( | cond::DbSession | session, |
cond::TagInfo const & | tagInfo, | ||
cond::LogDBEntry const & | logDBEntry | ||
) | const [inline] |
Definition at line 120 of file PopConSourceHandler.h.
{ const_cast<self*>(this)->initialize(session, tagInfo, logDBEntry); return std::pair<Container const *, std::string const>(&(const_cast<self*>(this)->returnData()), userTextLog()); }
Container const& popcon::PopConSourceHandler< T >::returnData | ( | ) | [inline] |
Definition at line 127 of file PopConSourceHandler.h.
Referenced by popcon::PopConSourceHandler< CastorPedestals >::operator()().
{ getNewObjects(); if (!m_to_transfer.empty()) convertFromOld(); sort(); return m_triplets; }
void popcon::PopConSourceHandler< T >::sort | ( | ) | [inline] |
Definition at line 143 of file PopConSourceHandler.h.
Referenced by popcon::PopConSourceHandler< CastorPedestals >::returnData(), and popcon::PopConSourceHandler< CastorPedestals >::sort().
{ std::sort(m_triplets.begin(),m_triplets.end(), boost::bind(std::less<cond::Time_t>(), boost::bind(&Container::value_type::time,_1), boost::bind(&Container::value_type::time,_2) ) ); }
cond::TagInfo const& popcon::PopConSourceHandler< T >::tagInfo | ( | ) | const [inline] |
Definition at line 101 of file PopConSourceHandler.h.
Referenced by popcon::SiStripPopConHandlerUnitTestGain< T >::getNewObjects(), popcon::SiStripPopConHandlerUnitTestNoise< T >::getNewObjects(), popcon::SiStripPopConDbObjHandler< T, U >::getNewObjects(), popcon::SiStripPopConConfigDbObjHandler< T >::getNewObjects(), popcon::SiStripPopConHandlerUnitTest< T >::getNewObjects(), popcon::PopConSourceHandler< CastorPedestals >::initialize(), popcon::SiStripPopConDbObjHandler< T, U >::isTransferNeeded(), popcon::SiStripPopConHandlerUnitTestGain< T >::isTransferNeeded(), popcon::SiStripPopConConfigDbObjHandler< T >::isTransferNeeded(), popcon::SiStripPopConHandlerUnitTestNoise< T >::isTransferNeeded(), popcon::SiStripPopConHandlerUnitTest< T >::isTransferNeeded(), popcon::PopConSourceHandler< CastorPedestals >::lastPayload(), popcon::SiStripPopConDbObjHandler< T, U >::setForTransfer(), popcon::SiStripPopConHandlerUnitTest< T >::setForTransfer(), popcon::SiStripPopConHandlerUnitTestGain< T >::setForTransfer(), popcon::SiStripPopConConfigDbObjHandler< T >::setForTransfer(), and popcon::SiStripPopConHandlerUnitTestNoise< T >::setForTransfer().
{ return *m_tagInfo; }
std::string const& popcon::PopConSourceHandler< T >::userTextLog | ( | ) | const [inline] |
Definition at line 134 of file PopConSourceHandler.h.
Referenced by popcon::SiStripPopConHandlerUnitTestGain< T >::getNewObjects(), popcon::SiStripPopConHandlerUnitTestNoise< T >::getNewObjects(), popcon::SiStripPopConDbObjHandler< T, U >::getNewObjects(), popcon::SiStripPopConConfigDbObjHandler< T >::getNewObjects(), popcon::SiStripPopConHandlerUnitTest< T >::getNewObjects(), and popcon::PopConSourceHandler< CastorPedestals >::operator()().
{ return m_userTextLog; }
cond::LogDBEntry const* popcon::PopConSourceHandler< T >::m_logDBEntry [private] |
Definition at line 182 of file PopConSourceHandler.h.
Referenced by popcon::PopConSourceHandler< CastorPedestals >::initialize(), and popcon::PopConSourceHandler< CastorPedestals >::logDBEntry().
cond::DbSession popcon::PopConSourceHandler< T >::m_session [mutable, private] |
Definition at line 178 of file PopConSourceHandler.h.
Referenced by popcon::PopConSourceHandler< CastorPedestals >::initialize(), and popcon::PopConSourceHandler< CastorPedestals >::lastPayload().
cond::TagInfo const* popcon::PopConSourceHandler< T >::m_tagInfo [private] |
Definition at line 180 of file PopConSourceHandler.h.
Referenced by popcon::PopConSourceHandler< CastorPedestals >::initialize(), and popcon::PopConSourceHandler< CastorPedestals >::tagInfo().
OldContainer popcon::PopConSourceHandler< T >::m_to_transfer [protected] |
Definition at line 189 of file PopConSourceHandler.h.
Referenced by popcon::PopConSourceHandler< CastorPedestals >::convertFromOld(), popcon::PopConSourceHandler< CastorPedestals >::returnData(), popcon::SiStripPopConDbObjHandler< T, U >::setForTransfer(), popcon::SiStripPopConHandlerUnitTest< T >::setForTransfer(), popcon::SiStripPopConHandlerUnitTestGain< T >::setForTransfer(), popcon::SiStripPopConConfigDbObjHandler< T >::setForTransfer(), and popcon::SiStripPopConHandlerUnitTestNoise< T >::setForTransfer().
Container popcon::PopConSourceHandler< T >::m_triplets [private] |
Definition at line 192 of file PopConSourceHandler.h.
Referenced by popcon::PopConSourceHandler< CastorPedestals >::add(), popcon::PopConSourceHandler< CastorPedestals >::returnData(), and popcon::PopConSourceHandler< CastorPedestals >::sort().
std::string popcon::PopConSourceHandler< T >::m_userTextLog [protected] |
Definition at line 195 of file PopConSourceHandler.h.
Referenced by popcon::SiStripPopConDbObjHandler< T, U >::isTransferNeeded(), popcon::SiStripPopConHandlerUnitTestGain< T >::isTransferNeeded(), popcon::SiStripPopConConfigDbObjHandler< T >::isTransferNeeded(), popcon::SiStripPopConHandlerUnitTestNoise< T >::isTransferNeeded(), popcon::SiStripPopConHandlerUnitTest< T >::isTransferNeeded(), and popcon::PopConSourceHandler< CastorPedestals >::userTextLog().