1 #ifndef CondTools_L1Trigger_L1ConfigOnlineProdBase_h 2 #define CondTools_L1Trigger_L1ConfigOnlineProdBase_h 51 template<
class TRcd,
class TData >
57 virtual std::shared_ptr< TData >
produce(
const TRcd& iRecord);
59 virtual std::shared_ptr< TData >
newObject(
74 std::shared_ptr< TData >
data,
83 template<
class TRcd,
class TData >
96 if( iConfig.
exists(
"copyFromCondDB" ) )
118 template<
class TRcd,
class TData >
127 template<
class TRcd,
class TData >
128 std::shared_ptr< TData >
132 std::shared_ptr< TData > pData ;
142 iRecord.template getRecord< L1TriggerKeyListRcd >() ;
144 keyListRcd.
get( keyList ) ;
150 keyList->token( recordName, dataType, key ) ;
153 <<
"Copying payload for " << recordName
154 <<
"@" << dataType <<
" obj key " << key
157 <<
"TOKEN " << payloadToken ;
161 if( !payloadToken.empty() )
174 if( pData == std::shared_ptr< TData >() )
179 dataType +
" for key " + key +
188 " for key " + key +
" already in CondDB." ) ;
195 template<
class TRcd,
class TData >
199 std::shared_ptr< TData >
data,
204 record.template getRecord< L1TriggerKeyRcd >() ;
227 objectKey = key->get( recordName, dataType ) ;
239 <<
"Problem getting last L1TriggerKeyList" ;
T getParameter(std::string const &) const
cond::persistency::Session m_dbSession
void start(bool readOnly=true)
bool exists(std::string const ¶meterName) const
checks if a parameter exists
Transaction & transaction()
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
bool getObjectKey(const TRcd &record, std::shared_ptr< TData > data, std::string &objectKey)
void get(HolderT &iHolder) const
Session createSession(const std::string &connectionString, bool writeCapable=false)
l1t::OMDSReader m_omdsReader
bool fillLastTriggerKeyList(L1TriggerKeyList &output)
void connect(const std::string &connectString, const std::string &authenticationPath)
~L1ConfigOnlineProdBase()
L1ConfigOnlineProdBase(const edm::ParameterSet &)
std::string token(const std::string &tscKey) const
virtual std::shared_ptr< TData > produce(const TRcd &iRecord)
char data[epos_bytes_allocation]
void setAuthenticationPath(const std::string &p)
std::shared_ptr< T > fetchPayload(const cond::Hash &payloadHash)
virtual std::shared_ptr< TData > newObject(const std::string &objectKey)=0