1 #ifndef CalibTracker_SiStripESProducer_DummyCondDBWriter_h
2 #define CalibTracker_SiStripESProducer_DummyCondDBWriter_h
20 template<
typename TObject ,
typename TObjectO ,
typename TRecord>
36 template<
typename TObject ,
typename TObjectO ,
typename TRecord>
38 edm::LogInfo(
"DummyCondDBWriter") <<
"DummyCondDBWriter constructor for typename " <<
typeid(TObject).
name() <<
" and record " <<
typeid(TRecord).
name() << std::endl;
42 template<
typename TObject ,
typename TObjectO ,
typename TRecord >
44 edm::LogInfo(
"DummyCondDBWriter") <<
"DummyCondDBWriter::~DummyCondDBWriter()" << std::endl;
47 template<
typename TObject ,
typename TObjectO ,
typename TRecord >
52 if( cacheID == es.
get<TRecord>().cacheIdentifier()){
53 edm::LogInfo(
"DummyCondDBWriter") <<
"not needed to store objects with Record "<< rcdName <<
" at run " << run.
run() << std::endl;
return;
55 cacheID = es.
get<TRecord>().cacheIdentifier();
58 es.
get<TRecord>().
get( esobj );
59 TObjectO *
obj=
new TObjectO(*(esobj.
product()));
67 if(openIovAt==
"beginOfTime")
69 else if (openIovAt==
"currentTime")
72 Time_=iConfig_.getUntrackedParameter<uint32_t>(
"OpenIovAtTime",1);
74 dbservice->
writeOne(obj, Time_, rcdName);
76 edm::LogError(
"SiStripFedCablingBuilder")<<
"Service is unavailable"<<std::endl;
DummyCondDBWriter(const edm::ParameterSet &iConfig)
void analyze(const edm::Event &e, const edm::EventSetup &es)
unsigned long long Time_t
cond::Time_t beginOfTime() const
void writeOne(T *payload, Time_t time, const std::string &recordName, bool withlogging=false)
void endRun(const edm::Run &run, const edm::EventSetup &es)
unsigned long long cacheID
edm::ParameterSet iConfig_
T const * product() const
cond::Time_t currentTime() const