test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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::SiStripPopConConfigDbObjHandler< T > popcon::SiStripPopConDbObjHandler< T, U > popcon::SiStripPopConHandlerUnitTest< T > popcon::SiStripPopConHandlerUnitTestGain< T > popcon::SiStripPopConHandlerUnitTestNoise< 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)
 

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

Member Typedef Documentation

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

Definition at line 44 of file PopConSourceHandler.h.

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

Definition at line 46 of file PopConSourceHandler.h.

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

Definition at line 34 of file PopConSourceHandler.h.

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

Definition at line 36 of file PopConSourceHandler.h.

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

Definition at line 35 of file PopConSourceHandler.h.

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

Definition at line 33 of file PopConSourceHandler.h.

Constructor & Destructor Documentation

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

Definition at line 89 of file PopConSourceHandler.h.

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

Definition at line 94 of file PopConSourceHandler.h.

94  {
95  }

Member Function Documentation

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

Definition at line 167 of file PopConSourceHandler.h.

Referenced by popcon::PopConSourceHandler< CastorPedestals >::convertFromOld(), and counter.Counter::register().

167  {
168  Triplet t = {payload,summary,time};
169  m_triplets.push_back(t);
170  return m_triplets.size();
171  }
Definition: Triplet.h:9
template<class T>
void popcon::PopConSourceHandler< T >::convertFromOld ( )
inline

Definition at line 155 of file PopConSourceHandler.h.

Referenced by popcon::PopConSourceHandler< CastorPedestals >::returnData().

155  {
156  std::for_each( m_to_transfer.begin(), m_to_transfer.end(),
157  boost::bind(&self::add, this,
158  boost::bind(&OldContainer::value_type::first,_1),
159  boost::bind(&self::dummySummary, this, _1),
160  boost::bind(&OldContainer::value_type::second,_1)
161  ));
162  }
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>
Summary* popcon::PopConSourceHandler< T >::dummySummary ( typename OldContainer::value_type const &  ) const
inline

Definition at line 151 of file PopConSourceHandler.h.

Referenced by popcon::PopConSourceHandler< CastorPedestals >::convertFromOld().

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

Implemented in popcon::EcalChannelStatusHandler, popcon::EcalDCSHandler, popcon::EcalADCToGeVHandler, popcon::EcalIntercalibHandler, popcon::EcalPedestalsHandler, popcon::EcalTPGLutGroupHandler, popcon::EcalTPGSpikeThresholdHandler, DTKeyedConfigHandler, DTUserKeyedConfigHandler, popcon::EcalTPGFineGrainStripEEHandler, popcon::EcalTPGPedestalsHandler, popcon::EcalTPGSlidingWindowHandler, popcon::EcalTPGWeightGroupHandler, popcon::EcalLaser_weekly_Handler, popcon::EcalLaserHandler, popcon::EcalTPGFineGrainEBGroupHandler, popcon::EcalTPGFineGrainTowerEEHandler, popcon::EcalTPGBadXTHandler, DTHVStatusHandler, popcon::EcalTPGBadStripHandler, popcon::EcalTPGBadTTHandler, popcon::EcalTPGFineGrainEBIdMapHandler, popcon::EcalTPGLinConstHandler, popcon::EcalTPGLutIdMapHandler, popcon::EcalTPGPhysicsConstHandler, popcon::EcalTPGWeightIdMapHandler, popcon::EcalDAQHandler, popcon::EcalTPGPedfromFile, popcon::EcalLaser_weekly_Linearization, popcon::EcalLaser_weekly_Linearization_Check, popcon::SiStripPopConHandlerUnitTestGain< T >, popcon::SiStripPopConHandlerUnitTestNoise< T >, DTLVStatusHandler, popcon::SiStripPopConHandlerUnitTest< T >, DTDeadFlagHandler, DTPerformanceHandler, DTRangeT0Handler, DTReadOutMappingHandler, DTStatusFlagHandler, DTT0Handler, DTTPGParametersHandler, popcon::EcalPulseShapesHandler, popcon::EcalPulseSymmCovariancesHandler, popcon::RPCEMapSourceHandler, popcon::EcalSRPHandler, popcon::EcalTPGFineGrainStripfromFile, popcon::EcalTPGSpikeThresholdfromFile, popcon::SiStripPopConConfigDbObjHandler< T >, EcalMappingElectronicsHandler, popcon::L1RPCHwConfigSourceHandler, popcon::DQMHistoryPopConHandler< U >, EcalFloatCondObjectContainerHandler, PixelPopConDCSSourceHandler< Type >, popcon::SiStripPopConDbObjHandler< T, U >, HcalLutMetadataHandler, 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, HcalCholeskyMatricesHandler, HcalCovarianceMatricesHandler, HcalDcsMapHandler, HcalDcsValuesHandler, HcalElectronicsMapHandler, HcalFlagHFDigiTimeParamsHandler, HcalGainsHandler, HcalGainWidthsHandler, HcalL1TriggerObjectsHandler, HcalLongRecoParamsHandler, HcalLUTCorrsHandler, HcalMCParamsHandler, HcalPedestalsHandler, HcalPedestalWidthsHandler, HcalPFCorrsHandler, HcalQIEDataHandler, HcalQIETypesHandler, HcalRecoParamsHandler, HcalRespCorrsHandler, HcalTimeCorrsHandler, HcalTimingParamsHandler, HcalValidationCorrsHandler, HcalZSThresholdsHandler, CastorSaturationCorrsHandler, HcalZDCLowGainFractionsHandler, RPCDBPerformanceHandler, EcalCondHandler< Payload, XMLTranslator >, popcon::DQMReferenceHistogramRootFileSourceHandler, popcon::DQMSummarySourceHandler, popcon::DQMXMLFileSourceHandler, FillInfoPopConSourceHandler, RunInfoHandler, RunSummaryHandler, and L1TriggerScalerHandler.

Referenced by popcon::PopConSourceHandler< CastorPedestals >::returnData().

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::DQMHistoryPopConHandler< U >, popcon::SiStripPopConConfigDbObjHandler< T >, popcon::EcalChannelStatusHandler, popcon::SiStripPopConDbObjHandler< T, U >, popcon::EcalDCSHandler, popcon::EcalADCToGeVHandler, popcon::EcalIntercalibHandler, popcon::EcalLaserHandler, popcon::EcalPedestalsHandler, popcon::EcalTPGLutGroupHandler, popcon::EcalTPGSpikeThresholdHandler, popcon::EcalLaser_weekly_Handler, popcon::EcalTPGFineGrainStripEEHandler, popcon::EcalTPGPedestalsHandler, popcon::EcalTPGSlidingWindowHandler, DTKeyedConfigHandler, DTUserKeyedConfigHandler, popcon::EcalTPGFineGrainTowerEEHandler, popcon::EcalTPGWeightGroupHandler, popcon::EcalTPGBadStripHandler, popcon::EcalTPGBadTTHandler, popcon::EcalTPGFineGrainEBGroupHandler, popcon::EcalTPGBadXTHandler, popcon::EcalTPGFineGrainEBIdMapHandler, popcon::EcalTPGLinConstHandler, popcon::EcalTPGLutIdMapHandler, popcon::EcalTPGPedfromFile, popcon::EcalTPGPhysicsConstHandler, popcon::EcalTPGWeightIdMapHandler, DTHVStatusHandler, popcon::EcalLaser_weekly_Linearization, popcon::EcalLaser_weekly_Linearization_Check, popcon::EcalDAQHandler, DTLVStatusHandler, DTDeadFlagHandler, DTPerformanceHandler, DTRangeT0Handler, DTReadOutMappingHandler, DTStatusFlagHandler, DTT0Handler, DTTPGParametersHandler, popcon::EcalPulseShapesHandler, popcon::EcalPulseSymmCovariancesHandler, popcon::EcalTPGFineGrainStripfromFile, popcon::EcalTPGSpikeThresholdfromFile, popcon::RPCEMapSourceHandler, popcon::EcalSRPHandler, PixelPopConSourceHandler< T >, PixelPopConSourceHandler< SiPixelCalibConfiguration >, PixelPopConSourceHandler< SiPixelFedCablingMap >, PixelPopConSourceHandler< bool >, PixelPopConSourceHandler< SiPixelDisabledModules >, EcalMappingElectronicsHandler, popcon::L1RPCHwConfigSourceHandler, PixelPopConCalibSourceHandler, PixelPopConDCSSourceHandler< Type >, EcalFloatCondObjectContainerHandler, HcalLutMetadataHandler, RPCDBHandler, 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, HcalCholeskyMatricesHandler, HcalCovarianceMatricesHandler, HcalDcsMapHandler, HcalDcsValuesHandler, HcalElectronicsMapHandler, HcalFlagHFDigiTimeParamsHandler, HcalGainsHandler, HcalGainWidthsHandler, HcalL1TriggerObjectsHandler, HcalLongRecoParamsHandler, HcalLUTCorrsHandler, HcalMCParamsHandler, HcalPedestalsHandler, HcalPedestalWidthsHandler, HcalPFCorrsHandler, HcalQIEDataHandler, HcalQIETypesHandler, HcalRecoParamsHandler, HcalRespCorrsHandler, HcalTimeCorrsHandler, HcalTimingParamsHandler, HcalValidationCorrsHandler, HcalZSThresholdsHandler, EcalCondHandler< Payload, XMLTranslator >, CastorSaturationCorrsHandler, HcalZDCLowGainFractionsHandler, RPCDBPerformanceHandler, popcon::DQMReferenceHistogramRootFileSourceHandler, popcon::DQMSummarySourceHandler, popcon::DQMXMLFileSourceHandler, FillInfoPopConSourceHandler, 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 109 of file PopConSourceHandler.h.

Referenced by popcon::PopConSourceHandler< CastorPedestals >::operator()().

110  {
111  m_session = dbSession;
112  m_tagInfo = &tagInfo;
114  }
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 101 of file PopConSourceHandler.h.

101  {
102  return Ref(m_session,tagInfo().lastPayloadToken);
103  }
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 117 of file PopConSourceHandler.h.

119  {
120  const_cast<self*>(this)->initialize(session, tagInfo, logDBEntry);
121  return std::pair<Container const *, std::string const>(&(const_cast<self*>(this)->returnData()), userTextLog());
122  }
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
template<class T>
void popcon::PopConSourceHandler< T >::sort ( )
inline

Definition at line 140 of file PopConSourceHandler.h.

Referenced by popcon::PopConSourceHandler< CastorPedestals >::returnData().

140  {
141  std::sort(m_triplets.begin(),m_triplets.end(),
142  boost::bind(std::less<cond::Time_t>(),
143  boost::bind(&Container::value_type::time,_1),
144  boost::bind(&Container::value_type::time,_2)
145  )
146  );
147  }
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
template<class T>
cond::persistency::Session popcon::PopConSourceHandler< T >::m_session
mutableprivate
template<class T>
cond::TagInfo_t const* popcon::PopConSourceHandler< T >::m_tagInfo
private
template<class T>
OldContainer popcon::PopConSourceHandler< T >::m_to_transfer
protected
template<class T>
Container popcon::PopConSourceHandler< T >::m_triplets
private
template<class T>
std::string popcon::PopConSourceHandler< T >::m_userTextLog
protected