1 #ifndef CondTools_L1TriggerExt_L1ConfigOnlineProdBaseExt_h 2 #define CondTools_L1TriggerExt_L1ConfigOnlineProdBaseExt_h 32 template<
class TRcd,
class TData >
38 std::unique_ptr< const TData >
produce(
const TRcd& iRecord);
40 virtual std::unique_ptr< const TData >
newObject(
41 const std::string& objectKey,
const TRcd& iRecord) = 0 ;
63 template<
class TRcd,
class TData >
76 if( iConfig.
exists(
"copyFromCondDB" ) )
98 template<
class TRcd,
class TData >
107 template<
class TRcd,
class TData >
108 std::unique_ptr< const TData >
111 std::unique_ptr< const TData > pData ;
123 iRecord.template getRecord< L1TriggerKeyListExtRcd >() ;
128 keyListRcd.
get( keyList ) ;
134 keyList->token( recordName, dataType, key ) ;
137 <<
"Copying payload for " << recordName
138 <<
"@" << dataType <<
" obj key " << key
141 <<
"TOKEN " << payloadToken ;
145 if( !payloadToken.empty() )
158 if( pData == std::unique_ptr< const TData >() )
163 dataType +
" for key " + key +
172 " for key " + key +
" already in CondDB." ) ;
179 template<
class TRcd,
class TData >
187 record.template getRecord< L1TriggerKeyExtRcd >() ;
210 objectKey = key->get( recordName, dataType ) ;
225 <<
"Problem getting last L1TriggerKeyListExt" ;
232 keyList.
token( recordName, dataType, objectKey ).empty() ;
T getParameter(std::string const &) const
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
bool fillLastTriggerKeyList(L1TriggerKeyListExt &output)
cond::persistency::Session m_dbSession
void start(bool readOnly=true)
bool exists(std::string const ¶meterName) const
checks if a parameter exists
std::unique_ptr< T > fetchPayload(const cond::Hash &payloadHash)
Transaction & transaction()
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
l1t::OMDSReader m_omdsReader
L1ConfigOnlineProdBaseExt(const edm::ParameterSet &)
bool getObjectKey(const TRcd &record, std::string &objectKey)
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Session createSession(const std::string &connectionString, bool writeCapable=false)
void connect(const std::string &connectString, const std::string &authenticationPath)
~L1ConfigOnlineProdBaseExt() override
std::unique_ptr< const TData > produce(const TRcd &iRecord)
virtual std::unique_ptr< const TData > newObject(const std::string &objectKey, const TRcd &iRecord)=0
void setAuthenticationPath(const std::string &p)
std::string token(const std::string &tscKey) const