|
ATLAS Offline Software
|
Go to the documentation of this file.
10 #include "GaudiKernel/IClassIDSvc.h"
17 ISvcLocator* pSvcLocator) :
30 if (StatusCode::SUCCESS!=
p_clidsvc.retrieve()) {
32 return StatusCode::FAILURE;
36 if (StatusCode::SUCCESS!=
p_regsvc.retrieve()) {
38 return StatusCode::FAILURE;
45 ATH_MSG_ERROR (
"Unable to find AthenaOutputStreamTool with name " <<
47 return StatusCode::FAILURE;
49 return StatusCode::SUCCESS;
55 return StatusCode::SUCCESS;
59 ATH_MSG_INFO (
"Finalize: preparing to write conditions objects ");
64 return( StatusCode::FAILURE);
67 std::vector<std::string> types;
68 std::vector<std::string>
keys;
69 std::vector<std::string>
folders;
70 std::vector<std::string>
tags;
71 for (
unsigned int iobj=0;iobj<
m_objectList.size();++iobj) {
73 std::string::size_type ihash=
m_objectList[iobj].find_first_of(
"#");
74 if (ihash==std::string::npos) {
79 if (StatusCode::SUCCESS==
p_clidsvc->getIDOfTypeName(
103 std::string::size_type ihash2=
m_objectList[iobj].find_first_of(
"#",ihash+1);
104 if (ihash2==std::string::npos) {
121 int nObjects=types.size();
124 " objects to write out:");
126 if (nObjects==0)
return StatusCode::SUCCESS;
127 for (
int i=0;
i<nObjects;
i++) {
134 if (StatusCode::SUCCESS==
p_clidsvc->getIDOfTypeName(types[
i],clid))
137 ATH_MSG_ERROR (
"Could not find proxy for object with key " <<
138 keys[
i] <<
" - abort write");
139 return StatusCode::FAILURE;
145 if (
sc.isFailure()) {
147 return StatusCode::FAILURE;
151 if (
sc.isFailure()) {
153 return StatusCode::FAILURE;
155 ATH_MSG_INFO (
"Written " << nObjects <<
" objects to output stream");
158 msg() << MSG::INFO <<
159 "Register objects in IOV database, interval of validity ";
161 msg() <<
"[time] from [" <<
164 msg() <<
"[run,LB] from [" <<
169 for (
int iobj=0;iobj<nObjects;++iobj) {
170 msg() << MSG::INFO <<
"Register object " << types[iobj] <<
"#" <<
171 keys[iobj] <<
" in IOV database folder " <<
folders[iobj] <<
" ";
172 if (
tags[iobj]==
"") {
173 msg() << MSG::INFO <<
"without tagging" <<
endmsg;
184 if (
sc==StatusCode::SUCCESS) {
190 ATH_MSG_INFO (
"Registered " << nreg <<
" objects in IOV database");
192 ATH_MSG_INFO (
"Objects NOT registered in IOV database");
194 return StatusCode::SUCCESS;
204 return static_cast<uint64_t>(timesec)*1000000000;
Gaudi::Property< unsigned int > m_par_lumib2
OutputConditionsAlg(const std::string &name, ISvcLocator *pSvcLocator)
This is an interface to a tool used to register conditions objects in the Interval of Validity (IOV) ...
ServiceHandle< IIOVRegistrationSvc > p_regsvc
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
IAthenaOutputStreamTool_t m_streamer
std::vector< std::string > tags
ServiceHandle< IClassIDSvc > p_clidsvc
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Property< std::vector< std::string > > m_par_iovtags
UnsignedLongProperty m_par_time1
static constexpr uint64_t MAXTIMESTAMP
uint32_t CLID
The Class ID type.
static constexpr uint32_t MAXEVENT
Gaudi::Property< bool > m_par_writeIOV
uint64_t timeToNano(unsigned long int timesec) const
Gaudi::Property< bool > m_par_timestamp
ToolHandle< IAthenaOutputStreamTool > IAthenaOutputStreamTool_t
UnsignedLongProperty m_par_time2
Gaudi::Property< std::string > m_streamName
Gaudi::Property< unsigned int > m_par_run1
Gaudi::Property< unsigned int > m_par_run2
Gaudi::Property< unsigned int > m_par_lumib1
Gaudi::Property< std::vector< std::string > > m_objectList