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

Member Typedef Documentation

◆ Container

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

Definition at line 43 of file PopConSourceHandler.h.

◆ OldContainer

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

Definition at line 45 of file PopConSourceHandler.h.

◆ self

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

Definition at line 33 of file PopConSourceHandler.h.

◆ Summary

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

Definition at line 35 of file PopConSourceHandler.h.

◆ Time_t

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

Definition at line 34 of file PopConSourceHandler.h.

◆ value_type

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

Definition at line 32 of file PopConSourceHandler.h.

Constructor & Destructor Documentation

◆ PopConSourceHandler()

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

Definition at line 74 of file PopConSourceHandler.h.

74 : m_tagInfo(nullptr), m_logDBEntry(nullptr) {}

◆ ~PopConSourceHandler()

template<class T>
virtual popcon::PopConSourceHandler< T >::~PopConSourceHandler ( )
inlinevirtual

Definition at line 76 of file PopConSourceHandler.h.

76 {}

Member Function Documentation

◆ add()

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

◆ convertFromOld()

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

Definition at line 133 of file PopConSourceHandler.h.

133  {
134  std::for_each(m_to_transfer.begin(),
135  m_to_transfer.end(),
136  std::bind(&self::add,
137  this,
138  std::bind(&OldContainer::value_type::first, std::placeholders::_1),
139  std::bind(&self::dummySummary, this, std::placeholders::_1),
140  std::bind(&OldContainer::value_type::second, std::placeholders::_1)));
141  }

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

◆ dbSession()

template<class T>
cond::persistency::Session& popcon::PopConSourceHandler< T >::dbSession ( ) const
inlineprotected

◆ dummySummary()

template<class T>
Summary* popcon::PopConSourceHandler< T >::dummySummary ( typename OldContainer::value_type const &  ) const
inline

Definition at line 129 of file PopConSourceHandler.h.

129  {
130  return new cond::GenericSummary("not supplied");
131  }

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

◆ getNewObjects()

template<class T>
virtual void popcon::PopConSourceHandler< T >::getNewObjects ( )
pure virtual

Implemented in popcon::EcalChannelStatusHandler, popcon::EcalDCSHandler, DTKeyedConfigHandler, DTUserKeyedConfigHandler, popcon::EcalTPGLutGroupHandler, popcon::EcalTPGSpikeThresholdHandler, popcon::EcalPedestalsHandler, popcon::EcalTPGFineGrainStripEEHandler, popcon::EcalTPGPedestalsHandler, DTHVStatusHandler, popcon::EcalADCToGeVHandler, popcon::EcalLaser_weekly_Handler, popcon::EcalLaserHandler, popcon::EcalTPGOddWeightGroupHandler, popcon::EcalTPGSlidingWindowHandler, popcon::EcalTPGWeightGroupHandler, popcon::EcalIntercalibHandler, popcon::EcalPFRecHitThresholdsHandler, popcon::EcalTPGFineGrainEBGroupHandler, popcon::EcalTPGFineGrainTowerEEHandler, popcon::SiStripPopConHandlerUnitTestGain< T >, popcon::SiStripPopConHandlerUnitTestNoise< T >, popcon::EcalDAQHandler, popcon::EcalTPGBadXTHandler, popcon::EcalTPGLinPed, popcon::EcalTPGPedfromFile, popcon::EcalTPGBadStripHandler, popcon::EcalTPGBadTTHandler, popcon::EcalTPGFineGrainEBIdMapHandler, popcon::EcalTPGLinConstHandler, popcon::EcalTPGLutIdMapHandler, popcon::EcalTPGOddWeightIdMapHandler, popcon::EcalTPGPhysicsConstHandler, popcon::EcalTPGTPModeHandler, popcon::EcalTPGWeightIdMapHandler, DTLVStatusHandler, DTDeadFlagHandler, DTPerformanceHandler, DTRangeT0Handler, DTReadOutMappingHandler, DTStatusFlagHandler, DTT0Handler, DTTPGParametersHandler, popcon::EcalLaser_weekly_Linearization, popcon::EcalLaser_weekly_Linearization_Check, popcon::EcalTPGPhysicsConstfromFile, popcon::EcalPulseShapesHandler, popcon::EcalPulseSymmCovariancesHandler, popcon::EcalSRPHandler, popcon::EcalTPGSpikeThresholdfromFile, popcon::RPCEMapSourceHandler, popcon::SiStripPopConConfigDbObjHandler< T >, EcalMappingElectronicsHandler, popcon::L1RPCHwConfigSourceHandler, SiStripDQMPopConSourceHandler< T >, SiStripDQMPopConSourceHandler< SiStripPedestals >, SiStripDQMPopConSourceHandler< SiStripNoises >, SiStripDQMPopConSourceHandler< SiStripBadStrip >, EcalFloatCondObjectContainerHandler, PixelPopConSourceHandler< T >, PixelPopConSourceHandler< SiPixelCalibConfiguration >, PixelPopConSourceHandler< SiPixelFedCablingMap >, PixelPopConSourceHandler< bool >, PixelPopConSourceHandler< SiPixelDisabledModules >, HcalLutMetadataHandler, popcon::RpcDataFebmap, popcon::RpcDataGasMix, popcon::RpcObGasData, popcon::RPCObPVSSmapData, popcon::RpcDataI, popcon::RpcDataS, popcon::RpcDataT, popcon::RpcDataUXC, popcon::RpcDataV, RPCDBHandler, RPCLBLinkMapHandler, CastorChannelQualityHandler, CastorElectronicsMapHandler, 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, popcon::EcalTPGFineGrainStripfromFile, popcon::EcalTPGFineGrainTowerfromFile, CastorSaturationCorrsHandler, HcalFrontEndMapHandler, HcalSiPMCharacteristicsHandler, HcalSiPMParametersHandler, HcalTPChannelParametersHandler, HcalTPParametersHandler, HcalZDCLowGainFractionsHandler, RPCAMCLinkMapHandler, RPCDCCLinkMapHandler, RPCDBPerformanceHandler, EcalCondHandler< Payload, XMLTranslator >, popcon::DQMSummarySourceHandler, popcon::DQMXMLFileSourceHandler, BeamSpotOnlinePopConSourceHandler, popcon::DQMReferenceHistogramRootFileSourceHandler, FillInfoPopConSourceHandler, LHCInfoPopConSourceHandler, RunInfoHandler, RunSummaryHandler, L1TriggerScalerHandler, popcon::PopConESTransitionSourceHandler< T >, popcon::PopConBTransitionSourceHandler< T >, and popcon::SiStripPopConHandlerUnitTest< T >.

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

◆ id()

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

Implemented in popcon::SiStripPopConHandlerUnitTestGain< T >, popcon::SiStripPopConHandlerUnitTestNoise< T >, popcon::SiStripPopConConfigDbObjHandler< T >, popcon::EcalChannelStatusHandler, popcon::EcalDCSHandler, popcon::EcalPedestalsHandler, DTKeyedConfigHandler, DTUserKeyedConfigHandler, popcon::EcalLaserHandler, popcon::EcalTPGLutGroupHandler, popcon::EcalTPGSpikeThresholdHandler, popcon::EcalLaser_weekly_Handler, popcon::EcalIntercalibHandler, popcon::EcalTPGFineGrainStripEEHandler, popcon::EcalTPGPedestalsHandler, popcon::EcalADCToGeVHandler, popcon::EcalPFRecHitThresholdsHandler, popcon::EcalTPGFineGrainTowerEEHandler, popcon::EcalTPGOddWeightGroupHandler, popcon::EcalTPGSlidingWindowHandler, popcon::EcalTPGWeightGroupHandler, DTHVStatusHandler, popcon::EcalTPGLinPed, popcon::EcalTPGPedfromFile, popcon::EcalTPGBadStripHandler, popcon::EcalTPGBadTTHandler, popcon::EcalTPGFineGrainEBGroupHandler, popcon::EcalTPGBadXTHandler, popcon::EcalDAQHandler, popcon::EcalLaser_weekly_Linearization, popcon::EcalLaser_weekly_Linearization_Check, popcon::EcalTPGFineGrainEBIdMapHandler, popcon::EcalTPGLinConstHandler, popcon::EcalTPGLutIdMapHandler, popcon::EcalTPGOddWeightIdMapHandler, popcon::EcalTPGPhysicsConstHandler, popcon::EcalTPGTPModeHandler, popcon::EcalTPGWeightIdMapHandler, popcon::EcalTPGSpikeThresholdfromFile, DTLVStatusHandler, popcon::EcalTPGPhysicsConstfromFile, DTDeadFlagHandler, DTPerformanceHandler, DTRangeT0Handler, DTReadOutMappingHandler, DTStatusFlagHandler, DTT0Handler, DTTPGParametersHandler, popcon::EcalPulseShapesHandler, popcon::EcalPulseSymmCovariancesHandler, popcon::EcalSRPHandler, popcon::RPCEMapSourceHandler, PixelPopConSourceHandler< T >, PixelPopConSourceHandler< SiPixelCalibConfiguration >, PixelPopConSourceHandler< SiPixelFedCablingMap >, PixelPopConSourceHandler< bool >, PixelPopConSourceHandler< SiPixelDisabledModules >, EcalMappingElectronicsHandler, popcon::L1RPCHwConfigSourceHandler, PixelPopConCalibSourceHandler, SiStripDQMPopConSourceHandler< T >, SiStripDQMPopConSourceHandler< SiStripPedestals >, SiStripDQMPopConSourceHandler< SiStripNoises >, SiStripDQMPopConSourceHandler< SiStripBadStrip >, EcalFloatCondObjectContainerHandler, HcalLutMetadataHandler, popcon::RpcDataFebmap, popcon::RpcDataGasMix, popcon::RpcObGasData, popcon::RPCObPVSSmapData, popcon::RpcDataI, popcon::RpcDataS, popcon::RpcDataT, popcon::RpcDataUXC, popcon::RpcDataV, RPCDBHandler, RPCLBLinkMapHandler, popcon::EcalTPGFineGrainStripfromFile, popcon::EcalTPGFineGrainTowerfromFile, CastorChannelQualityHandler, CastorElectronicsMapHandler, 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, EcalCondHandler< Payload, XMLTranslator >, CastorSaturationCorrsHandler, HcalFrontEndMapHandler, HcalSiPMCharacteristicsHandler, HcalSiPMParametersHandler, HcalTPChannelParametersHandler, HcalTPParametersHandler, HcalZDCLowGainFractionsHandler, RPCAMCLinkMapHandler, RPCDBPerformanceHandler, RPCDCCLinkMapHandler, popcon::DQMSummarySourceHandler, popcon::DQMXMLFileSourceHandler, BeamSpotOnlinePopConSourceHandler, popcon::DQMReferenceHistogramRootFileSourceHandler, FillInfoPopConSourceHandler, LHCInfoPopConSourceHandler, RunInfoHandler, RunSummaryHandler, L1TriggerScalerHandler, popcon::PopConESTransitionSourceHandler< T >, popcon::PopConBTransitionSourceHandler< T >, and popcon::SiStripPopConHandlerUnitTest< T >.

◆ initialize()

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

89  {
91  m_tagInfo = &tagInfo;
93  }

◆ lastPayload()

template<class T>
Ref popcon::PopConSourceHandler< T >::lastPayload ( ) const
inline

Definition at line 81 of file PopConSourceHandler.h.

81 { return Ref(m_session, tagInfo().lastInterval.payloadId); }

◆ logDBEntry()

template<class T>
cond::LogDBEntry_t const& popcon::PopConSourceHandler< T >::logDBEntry ( ) const
inline

◆ operator()()

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

98  {
99  const_cast<self*>(this)->initialize(session, tagInfo, logDBEntry);
100  return std::pair<Container const*, std::string const>(&(const_cast<self*>(this)->returnData()), userTextLog());
101  }

◆ returnData()

template<class T>
Container const& popcon::PopConSourceHandler< T >::returnData ( )
inline

Definition at line 103 of file PopConSourceHandler.h.

103  {
104  getNewObjects();
105  if (!m_to_transfer.empty())
106  convertFromOld();
107  sort();
108  return m_triplets;
109  }

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

◆ sort()

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

Definition at line 120 of file PopConSourceHandler.h.

120  {
121  std::sort(m_triplets.begin(),
122  m_triplets.end(),
123  std::bind(std::less<cond::Time_t>(),
124  std::bind(&Container::value_type::time, std::placeholders::_1),
125  std::bind(&Container::value_type::time, std::placeholders::_2)));
126  }

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

◆ tagInfo()

template<class T>
cond::TagInfo_t const& popcon::PopConSourceHandler< T >::tagInfo ( ) const
inline

◆ userTextLog()

template<class T>
std::string const& popcon::PopConSourceHandler< T >::userTextLog ( ) const
inline

Member Data Documentation

◆ m_logDBEntry

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

◆ m_session

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

◆ m_tagInfo

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

◆ m_to_transfer

template<class T>
OldContainer popcon::PopConSourceHandler< T >::m_to_transfer
protected

◆ m_triplets

template<class T>
Container popcon::PopConSourceHandler< T >::m_triplets
private

◆ m_userTextLog

template<class T>
std::string popcon::PopConSourceHandler< T >::m_userTextLog
protected
popcon::PopConSourceHandler::m_logDBEntry
cond::LogDBEntry_t const * m_logDBEntry
Definition: PopConSourceHandler.h:157
popcon::PopConSourceHandler::m_to_transfer
OldContainer m_to_transfer
Definition: PopConSourceHandler.h:162
popcon::PopConSourceHandler::getNewObjects
virtual void getNewObjects()=0
popcon::PopConSourceHandler::dbSession
cond::persistency::Session & dbSession() const
Definition: PopConSourceHandler.h:144
protons_cff.time
time
Definition: protons_cff.py:39
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
jets_cff.payload
payload
Definition: jets_cff.py:32
popcon::PopConSourceHandler::returnData
Container const & returnData()
Definition: PopConSourceHandler.h:103
popcon::PopConSourceHandler::m_tagInfo
cond::TagInfo_t const * m_tagInfo
Definition: PopConSourceHandler.h:155
first
auto first
Definition: CAHitNtupletGeneratorKernelsImpl.h:112
popcon::PopConSourceHandler::tagInfo
cond::TagInfo_t const & tagInfo() const
Definition: PopConSourceHandler.h:78
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
edmLumisInFiles.summary
summary
Definition: edmLumisInFiles.py:39
popcon::PopConSourceHandler::convertFromOld
void convertFromOld()
Definition: PopConSourceHandler.h:133
popcon::PopConSourceHandler::add
int add(value_type *payload, Summary *summary, Time_t time)
Definition: PopConSourceHandler.h:146
reco::JetExtendedAssociation::Ref
edm::Ref< Container > Ref
Definition: JetExtendedAssociation.h:32
popcon::PopConSourceHandler::m_session
cond::persistency::Session m_session
Definition: PopConSourceHandler.h:153
popcon::PopConSourceHandler::dummySummary
Summary * dummySummary(typename OldContainer::value_type const &) const
Definition: PopConSourceHandler.h:129
cond::GenericSummary
Definition: GenericSummary.h:12
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
popcon::PopConSourceHandler::m_userTextLog
std::string m_userTextLog
Definition: PopConSourceHandler.h:168
popcon::PopConSourceHandler::logDBEntry
cond::LogDBEntry_t const & logDBEntry() const
Definition: PopConSourceHandler.h:84
popcon::PopConSourceHandler::sort
void sort()
Definition: PopConSourceHandler.h:120
popcon::PopConSourceHandler::userTextLog
std::string const & userTextLog() const
Definition: PopConSourceHandler.h:111
popcon::PopConSourceHandler::m_triplets
Container m_triplets
Definition: PopConSourceHandler.h:165