1 #ifndef CondTools_L1TriggerExt_L1ConfigOnlineProdBaseExt_h 2 #define CondTools_L1TriggerExt_L1ConfigOnlineProdBaseExt_h 32 template<
class TRcd,
class TData >
38 std::shared_ptr< TData >
produce(
const TRcd& iRecord);
40 virtual std::shared_ptr< TData >
newObject(
41 const std::string& objectKey,
const TRcd& iRecord) = 0 ;
55 std::shared_ptr< TData >
data,
64 template<
class TRcd,
class TData >
77 if( iConfig.
exists(
"copyFromCondDB" ) )
99 template<
class TRcd,
class TData >
108 template<
class TRcd,
class TData >
109 std::shared_ptr< TData >
113 std::shared_ptr< TData > pData ;
125 iRecord.template getRecord< L1TriggerKeyListExtRcd >() ;
130 keyListRcd.
get( keyList ) ;
136 keyList->token( recordName, dataType, key ) ;
139 <<
"Copying payload for " << recordName
140 <<
"@" << dataType <<
" obj key " << key
143 <<
"TOKEN " << payloadToken ;
147 if( !payloadToken.empty() )
160 if( pData == std::shared_ptr< TData >() )
165 dataType +
" for key " + key +
174 " for key " + key +
" already in CondDB." ) ;
181 template<
class TRcd,
class TData >
185 std::shared_ptr< TData >
data,
190 record.template getRecord< L1TriggerKeyExtRcd >() ;
213 objectKey = key->get( recordName, dataType ) ;
228 <<
"Problem getting last L1TriggerKeyListExt" ;
T getParameter(std::string const &) const
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
bool fillLastTriggerKeyList(L1TriggerKeyListExt &output)
virtual std::shared_ptr< TData > newObject(const std::string &objectKey, const TRcd &iRecord)=0
cond::persistency::Session m_dbSession
void start(bool readOnly=true)
bool exists(std::string const ¶meterName) const
checks if a parameter exists
bool getObjectKey(const TRcd &record, std::shared_ptr< TData > data, std::string &objectKey)
std::unique_ptr< T > fetchPayload(const cond::Hash &payloadHash)
Transaction & transaction()
l1t::OMDSReader m_omdsReader
L1ConfigOnlineProdBaseExt(const edm::ParameterSet &)
Session createSession(const std::string &connectionString, bool writeCapable=false)
void connect(const std::string &connectString, const std::string &authenticationPath)
~L1ConfigOnlineProdBaseExt() override
char data[epos_bytes_allocation]
void setAuthenticationPath(const std::string &p)
std::shared_ptr< TData > produce(const TRcd &iRecord)
std::string token(const std::string &tscKey) const
bool get(HolderT &iHolder) const