CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes
popcon::PopConSourceHandler< T > Class Template Referenceabstract

#include <PopConSourceHandler.h>

Inheritance diagram for popcon::PopConSourceHandler< T >:
PixelPopConSourceHandler< T > popcon::PopConBTransitionSourceHandler< T > popcon::PopConESTransitionSourceHandler< T > popcon::SiStripPopConConfigDbObjHandler< T > popcon::SiStripPopConHandlerUnitTest< T > popcon::SiStripPopConHandlerUnitTestGain< T > popcon::SiStripPopConHandlerUnitTestNoise< T > SiStripDQMPopConSourceHandler< T >

Classes

class  Ref
 
struct  Triplet
 

Public Types

typedef std::vector< TripletContainer
 
typedef std::vector< std::pair< T *, cond::Time_t > > OldContainer
 
typedef PopConSourceHandler< Tself
 
typedef cond::Summary Summary
 
typedef cond::Time_t Time_t
 
typedef T value_type
 

Public Member Functions

void convertFromOld ()
 
SummarydummySummary (typename OldContainer::value_type const &) const
 
virtual void getNewObjects ()=0
 
virtual std::string id () const =0
 
void initialize (const cond::persistency::Session &dbSession, cond::TagInfo_t const &tagInfo, cond::LogDBEntry_t const &logDBEntry)
 
Ref lastPayload () const
 
cond::LogDBEntry_t const & logDBEntry () const
 
std::pair< Container const *, std::string const > operator() (const cond::persistency::Session &session, cond::TagInfo_t const &tagInfo, cond::LogDBEntry_t const &logDBEntry) const
 
 PopConSourceHandler ()
 
Container const & returnData ()
 
void sort ()
 
cond::TagInfo_t const & tagInfo () const
 
std::string const & userTextLog () const
 
virtual ~PopConSourceHandler ()
 

Protected Member Functions

int add (value_type *payload, Summary *summary, Time_t time)
 
cond::persistency::SessiondbSession () const
 

Protected Attributes

OldContainer m_to_transfer
 
std::string m_userTextLog
 

Private Attributes

cond::LogDBEntry_t const * m_logDBEntry
 
cond::persistency::Session m_session
 
cond::TagInfo_t const * m_tagInfo
 
Container m_triplets
 

Detailed Description

template<class T>
class popcon::PopConSourceHandler< T >

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 32 of file PopConSourceHandler.h.

Member Typedef Documentation

template<class T>
typedef std::vector<Triplet> popcon::PopConSourceHandler< T >::Container

Definition at line 45 of file PopConSourceHandler.h.

template<class T>
typedef std::vector<std::pair<T*, cond::Time_t> > popcon::PopConSourceHandler< T >::OldContainer

Definition at line 47 of file PopConSourceHandler.h.

template<class T>
typedef PopConSourceHandler<T> popcon::PopConSourceHandler< T >::self

Definition at line 35 of file PopConSourceHandler.h.

template<class T>
typedef cond::Summary popcon::PopConSourceHandler< T >::Summary

Definition at line 37 of file PopConSourceHandler.h.

template<class T>
typedef cond::Time_t popcon::PopConSourceHandler< T >::Time_t

Definition at line 36 of file PopConSourceHandler.h.

template<class T>
typedef T popcon::PopConSourceHandler< T >::value_type

Definition at line 34 of file PopConSourceHandler.h.

Constructor & Destructor Documentation

template<class T>
popcon::PopConSourceHandler< T >::PopConSourceHandler ( )
inline

Definition at line 90 of file PopConSourceHandler.h.

90  :
91  m_tagInfo(nullptr),
92  m_logDBEntry(nullptr)
93  {}
cond::LogDBEntry_t const * m_logDBEntry
cond::TagInfo_t const * m_tagInfo
template<class T>
virtual popcon::PopConSourceHandler< T >::~PopConSourceHandler ( )
inlinevirtual

Definition at line 95 of file PopConSourceHandler.h.

95  {
96  }

Member Function Documentation

template<class T>
int popcon::PopConSourceHandler< T >::add ( value_type payload,
Summary summary,
Time_t  time 
)
inlineprotected

Definition at line 171 of file PopConSourceHandler.h.

Referenced by counter.Counter::register(), SequenceTypes.Task::remove(), and SequenceTypes.Task::replace().

171  {
172  Triplet t = {payload,summary,time};
173  m_triplets.push_back(t);
174  return m_triplets.size();
175  }
template<class T>
void popcon::PopConSourceHandler< T >::convertFromOld ( )
inline

Definition at line 156 of file PopConSourceHandler.h.

156  {
157  std::for_each( m_to_transfer.begin(), m_to_transfer.end(),
158  boost::bind(&self::add, this,
159  boost::bind(&OldContainer::value_type::first,_1),
160  boost::bind(&self::dummySummary, this, _1),
161  boost::bind(&OldContainer::value_type::second,_1)
162  ));
163  }
U second(std::pair< T, U > const &p)
Summary * dummySummary(typename OldContainer::value_type const &) const
int add(value_type *payload, Summary *summary, Time_t time)
template<class T>
cond::persistency::Session& popcon::PopConSourceHandler< T >::dbSession ( ) const
inlineprotected
template<class T>
Summary* popcon::PopConSourceHandler< T >::dummySummary ( typename OldContainer::value_type const &  ) const
inline

Definition at line 152 of file PopConSourceHandler.h.

152  {
153  return new cond::GenericSummary("not supplied");
154  }
template<class T>
virtual void popcon::PopConSourceHandler< T >::getNewObjects ( )
pure virtual

Implemented in popcon::PopConESTransitionSourceHandler< T >, popcon::PopConBTransitionSourceHandler< T >, popcon::EcalChannelStatusHandler, popcon::EcalDCSHandler, popcon::EcalADCToGeVHandler, DTKeyedConfigHandler, DTUserKeyedConfigHandler, popcon::EcalTPGLutGroupHandler, popcon::EcalTPGSpikeThresholdHandler, popcon::EcalTPGFineGrainStripEEHandler, popcon::EcalTPGPedestalsHandler, popcon::EcalTPGSlidingWindowHandler, popcon::EcalLaser_weekly_Handler, popcon::EcalLaserHandler, popcon::EcalPedestalsHandler, popcon::EcalIntercalibHandler, popcon::EcalTPGFineGrainEBGroupHandler, popcon::EcalTPGFineGrainTowerEEHandler, popcon::EcalTPGBadXTHandler, DTHVStatusHandler, popcon::EcalTPGBadStripHandler, popcon::EcalTPGBadTTHandler, popcon::EcalTPGFineGrainEBIdMapHandler, popcon::EcalTPGLinConstHandler, popcon::EcalTPGLutIdMapHandler, popcon::EcalTPGPhysicsConstHandler, popcon::EcalTPGWeightGroupHandler, popcon::EcalDAQHandler, popcon::EcalTPGLinPed, popcon::EcalTPGPedfromFile, popcon::EcalLaser_weekly_Linearization, popcon::EcalLaser_weekly_Linearization_Check, popcon::SiStripPopConHandlerUnitTestGain< T >, popcon::SiStripPopConHandlerUnitTestNoise< T >, DTLVStatusHandler, popcon::EcalTPGWeightIdMapHandler, popcon::SiStripPopConHandlerUnitTest< T >, popcon::EcalTPGPhysicsConstfromFile, DTDeadFlagHandler, DTPerformanceHandler, DTRangeT0Handler, DTReadOutMappingHandler, DTStatusFlagHandler, DTT0Handler, DTTPGParametersHandler, popcon::EcalPulseShapesHandler, popcon::EcalPulseSymmCovariancesHandler, popcon::RPCEMapSourceHandler, popcon::EcalSRPHandler, popcon::EcalTPGSpikeThresholdfromFile, popcon::SiStripPopConConfigDbObjHandler< T >, EcalMappingElectronicsHandler, popcon::L1RPCHwConfigSourceHandler, EcalFloatCondObjectContainerHandler, HcalLutMetadataHandler, SiStripDQMPopConSourceHandler< T >, SiStripDQMPopConSourceHandler< SiStripPedestals >, SiStripDQMPopConSourceHandler< HDQMSummary >, SiStripDQMPopConSourceHandler< SiStripNoises >, SiStripDQMPopConSourceHandler< SiStripBadStrip >, PixelPopConSourceHandler< T >, RPCDBHandler, PixelPopConSourceHandler< SiPixelCalibConfiguration >, PixelPopConSourceHandler< SiPixelFedCablingMap >, PixelPopConSourceHandler< bool >, PixelPopConSourceHandler< SiPixelDisabledModules >, CastorElectronicsMapHandler, popcon::RpcDataFebmap, popcon::RpcDataGasMix, popcon::RpcObGasData, popcon::RPCObPVSSmapData, popcon::RpcDataI, popcon::RpcDataS, popcon::RpcDataT, popcon::RpcDataUXC, popcon::RpcDataV, CastorChannelQualityHandler, CastorGainsHandler, CastorGainWidthsHandler, CastorPedestalsHandler, CastorPedestalWidthsHandler, CastorQIEDataHandler, CastorRecoParamsHandler, HcalChannelQualityHandler, HcalDcsMapHandler, HcalDcsValuesHandler, HcalElectronicsMapHandler, HcalFlagHFDigiTimeParamsHandler, HcalGainsHandler, HcalGainWidthsHandler, HcalL1TriggerObjectsHandler, HcalLongRecoParamsHandler, HcalLUTCorrsHandler, HcalMCParamsHandler, HcalPedestalsHandler, HcalPedestalWidthsHandler, HcalPFCorrsHandler, HcalQIEDataHandler, HcalQIETypesHandler, HcalRecoParamsHandler, HcalRespCorrsHandler, HcalTimeCorrsHandler, HcalTimingParamsHandler, HcalValidationCorrsHandler, HcalZSThresholdsHandler, RPCLBLinkMapHandler, CastorSaturationCorrsHandler, HcalFrontEndMapHandler, HcalSiPMCharacteristicsHandler, HcalSiPMParametersHandler, HcalTPChannelParametersHandler, HcalTPParametersHandler, HcalZDCLowGainFractionsHandler, RPCAMCLinkMapHandler, RPCDCCLinkMapHandler, popcon::EcalTPGFineGrainStripfromFile, popcon::EcalTPGFineGrainTowerfromFile, RPCDBPerformanceHandler, EcalCondHandler< Payload, XMLTranslator >, popcon::DQMReferenceHistogramRootFileSourceHandler, popcon::DQMSummarySourceHandler, popcon::DQMXMLFileSourceHandler, FillInfoPopConSourceHandler, LHCInfoPopConSourceHandler, RunInfoHandler, RunSummaryHandler, and L1TriggerScalerHandler.

template<class T>
virtual std::string popcon::PopConSourceHandler< T >::id ( ) const
pure virtual

Implemented in popcon::SiStripPopConHandlerUnitTest< T >, popcon::SiStripPopConHandlerUnitTestGain< T >, popcon::SiStripPopConHandlerUnitTestNoise< T >, popcon::SiStripPopConConfigDbObjHandler< T >, popcon::EcalChannelStatusHandler, popcon::EcalPedestalsHandler, popcon::EcalDCSHandler, popcon::EcalADCToGeVHandler, popcon::EcalLaserHandler, popcon::EcalTPGLutGroupHandler, popcon::EcalTPGSpikeThresholdHandler, DTKeyedConfigHandler, DTUserKeyedConfigHandler, popcon::EcalLaser_weekly_Handler, popcon::EcalTPGFineGrainStripEEHandler, popcon::EcalTPGPedestalsHandler, popcon::EcalTPGSlidingWindowHandler, popcon::EcalIntercalibHandler, popcon::EcalTPGFineGrainTowerEEHandler, popcon::EcalTPGBadStripHandler, popcon::EcalTPGBadTTHandler, popcon::EcalTPGFineGrainEBGroupHandler, popcon::EcalTPGBadXTHandler, popcon::EcalTPGFineGrainEBIdMapHandler, popcon::EcalTPGLinConstHandler, popcon::EcalTPGLinPed, popcon::EcalTPGLutIdMapHandler, popcon::EcalTPGPedfromFile, popcon::EcalTPGPhysicsConstHandler, popcon::EcalTPGWeightGroupHandler, DTHVStatusHandler, popcon::EcalLaser_weekly_Linearization, popcon::EcalLaser_weekly_Linearization_Check, popcon::EcalDAQHandler, popcon::EcalTPGWeightIdMapHandler, DTLVStatusHandler, popcon::EcalTPGPhysicsConstfromFile, DTDeadFlagHandler, DTPerformanceHandler, DTRangeT0Handler, DTReadOutMappingHandler, DTStatusFlagHandler, DTT0Handler, DTTPGParametersHandler, popcon::EcalPulseShapesHandler, popcon::EcalPulseSymmCovariancesHandler, popcon::EcalTPGSpikeThresholdfromFile, popcon::RPCEMapSourceHandler, popcon::EcalSRPHandler, PixelPopConSourceHandler< T >, PixelPopConSourceHandler< SiPixelCalibConfiguration >, PixelPopConSourceHandler< SiPixelFedCablingMap >, PixelPopConSourceHandler< bool >, PixelPopConSourceHandler< SiPixelDisabledModules >, EcalMappingElectronicsHandler, popcon::L1RPCHwConfigSourceHandler, PixelPopConCalibSourceHandler, EcalFloatCondObjectContainerHandler, popcon::PopConESTransitionSourceHandler< T >, HcalLutMetadataHandler, SiStripDQMPopConSourceHandler< T >, SiStripDQMPopConSourceHandler< SiStripPedestals >, SiStripDQMPopConSourceHandler< HDQMSummary >, SiStripDQMPopConSourceHandler< SiStripNoises >, SiStripDQMPopConSourceHandler< SiStripBadStrip >, popcon::PopConBTransitionSourceHandler< T >, RPCDBHandler, CastorElectronicsMapHandler, popcon::RpcDataFebmap, popcon::RpcDataGasMix, popcon::RpcObGasData, popcon::RPCObPVSSmapData, popcon::RpcDataI, popcon::RpcDataS, popcon::RpcDataT, popcon::RpcDataUXC, popcon::RpcDataV, EcalCondHandler< Payload, XMLTranslator >, CastorChannelQualityHandler, CastorGainsHandler, CastorGainWidthsHandler, CastorPedestalsHandler, CastorPedestalWidthsHandler, CastorQIEDataHandler, CastorRecoParamsHandler, HcalChannelQualityHandler, HcalDcsMapHandler, HcalDcsValuesHandler, HcalElectronicsMapHandler, HcalFlagHFDigiTimeParamsHandler, HcalGainsHandler, HcalGainWidthsHandler, HcalL1TriggerObjectsHandler, HcalLongRecoParamsHandler, HcalLUTCorrsHandler, HcalMCParamsHandler, HcalPedestalsHandler, HcalPedestalWidthsHandler, HcalPFCorrsHandler, HcalQIEDataHandler, HcalQIETypesHandler, HcalRecoParamsHandler, HcalRespCorrsHandler, HcalTimeCorrsHandler, HcalTimingParamsHandler, HcalValidationCorrsHandler, HcalZSThresholdsHandler, RPCLBLinkMapHandler, CastorSaturationCorrsHandler, popcon::EcalTPGFineGrainStripfromFile, popcon::EcalTPGFineGrainTowerfromFile, HcalFrontEndMapHandler, HcalSiPMCharacteristicsHandler, HcalSiPMParametersHandler, HcalTPChannelParametersHandler, HcalTPParametersHandler, HcalZDCLowGainFractionsHandler, RPCDBPerformanceHandler, RPCAMCLinkMapHandler, RPCDCCLinkMapHandler, popcon::DQMReferenceHistogramRootFileSourceHandler, popcon::DQMSummarySourceHandler, popcon::DQMXMLFileSourceHandler, FillInfoPopConSourceHandler, LHCInfoPopConSourceHandler, RunInfoHandler, RunSummaryHandler, and L1TriggerScalerHandler.

template<class T>
void popcon::PopConSourceHandler< T >::initialize ( const cond::persistency::Session dbSession,
cond::TagInfo_t const &  tagInfo,
cond::LogDBEntry_t const &  logDBEntry 
)
inline

Definition at line 110 of file PopConSourceHandler.h.

111  {
113  m_tagInfo = &tagInfo;
115  }
cond::persistency::Session & dbSession() const
cond::LogDBEntry_t const * m_logDBEntry
cond::LogDBEntry_t const & logDBEntry() const
cond::TagInfo_t const * m_tagInfo
cond::persistency::Session m_session
cond::TagInfo_t const & tagInfo() const
template<class T>
Ref popcon::PopConSourceHandler< T >::lastPayload ( ) const
inline

Definition at line 102 of file PopConSourceHandler.h.

102  {
103  return Ref(m_session,tagInfo().lastPayloadToken);
104  }
cond::persistency::Session m_session
cond::TagInfo_t const & tagInfo() const
template<class T>
cond::LogDBEntry_t const& popcon::PopConSourceHandler< T >::logDBEntry ( ) const
inline
template<class T>
std::pair<Container const *, std::string const> popcon::PopConSourceHandler< T >::operator() ( const cond::persistency::Session session,
cond::TagInfo_t const &  tagInfo,
cond::LogDBEntry_t const &  logDBEntry 
) const
inline

Definition at line 118 of file PopConSourceHandler.h.

120  {
121  const_cast<self*>(this)->initialize(session, tagInfo, logDBEntry);
122  return std::pair<Container const *, std::string const>(&(const_cast<self*>(this)->returnData()), userTextLog());
123  }
PopConSourceHandler< T > self
std::string const & userTextLog() const
cond::LogDBEntry_t const & logDBEntry() const
void initialize(const cond::persistency::Session &dbSession, cond::TagInfo_t const &tagInfo, cond::LogDBEntry_t const &logDBEntry)
cond::TagInfo_t const & tagInfo() const
template<class T>
Container const& popcon::PopConSourceHandler< T >::returnData ( )
inline

Definition at line 125 of file PopConSourceHandler.h.

125  {
126  getNewObjects();
127  if (!m_to_transfer.empty()) convertFromOld();
128  sort();
129  return m_triplets;
130  }
virtual void getNewObjects()=0
template<class T>
void popcon::PopConSourceHandler< T >::sort ( )
inline

Definition at line 141 of file PopConSourceHandler.h.

141  {
142  std::sort(m_triplets.begin(),m_triplets.end(),
143  boost::bind(std::less<cond::Time_t>(),
144  boost::bind(&Container::value_type::time,_1),
145  boost::bind(&Container::value_type::time,_2)
146  )
147  );
148  }
template<class T>
cond::TagInfo_t const& popcon::PopConSourceHandler< T >::tagInfo ( ) const
inline
template<class T>
std::string const& popcon::PopConSourceHandler< T >::userTextLog ( ) const
inline

Member Data Documentation

template<class T>
cond::LogDBEntry_t const* popcon::PopConSourceHandler< T >::m_logDBEntry
private

Definition at line 183 of file PopConSourceHandler.h.

template<class T>
cond::persistency::Session popcon::PopConSourceHandler< T >::m_session
mutableprivate

Definition at line 179 of file PopConSourceHandler.h.

template<class T>
cond::TagInfo_t const* popcon::PopConSourceHandler< T >::m_tagInfo
private

Definition at line 181 of file PopConSourceHandler.h.

template<class T>
OldContainer popcon::PopConSourceHandler< T >::m_to_transfer
protected
template<class T>
Container popcon::PopConSourceHandler< T >::m_triplets
private

Definition at line 193 of file PopConSourceHandler.h.

template<class T>
std::string popcon::PopConSourceHandler< T >::m_userTextLog
protected