|
ATLAS Offline Software
|
#include <SourceCompAlg.h>
|
| SourceCompAlg (const std::string &name, ISvcLocator *pSvcLocator) |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | execute () override |
|
virtual StatusCode | finalize () override |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
Definition at line 16 of file SourceCompAlg.h.
◆ StoreGateSvc_t
◆ SourceCompAlg()
SourceCompAlg::SourceCompAlg |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ compareGlobalTags()
StatusCode SourceCompAlg::compareGlobalTags |
( |
const std::vector< std::string > & |
globalTags, |
|
|
RDBAccessSvc * |
rdbAccessSvc, |
|
|
std::ofstream & |
log |
|
) |
| |
|
private |
Definition at line 145 of file SourceCompAlg.cxx.
150 for(
const std::string&
tag : globalTags) {
152 std::vector<NodeToRecordsetMap> map;
155 for(
auto& mapel : map) {
159 return StatusCode::FAILURE;
165 std::ostringstream tagDetailStream;
166 tagDetailStream << atlasTagDetails << std::endl;
172 std::vector<std::string> leafNodes;
174 for(
size_t ii=0; ii<leafNodes.size(); ++ii) {
175 std::string nodeName = leafNodes[ii];
176 int perc = ii*100/leafNodes.size();
179 if(!childTag.empty()) {
182 mapel[nodeName] = recPtr;
191 log << std::endl <<
"TAG: " <<
tag << std::endl
192 <<
"Different number of leaf nodes in databases! " << map[0].size() <<
" vs " << map[1].size() << std::endl;
195 bool difFound{
false};
196 NodeToRecordsetMap::const_iterator
it = map[0].begin();
197 for(;
it!=map[0].end(); ++
it) {
198 if(map[1].
find(
it->first)==map[1].end()) {
201 log << std::endl <<
"TAG: " <<
tag << std::endl
202 <<
"Nodes existing in Session0 but missing in Session1:" << std::endl;
204 log <<
"** " <<
it->first << std::endl;
210 for(;
it!=map[1].end(); ++
it) {
211 if(map[0].
find(
it->first)==map[0].end()) {
214 log << std::endl <<
"TAG: " <<
tag << std::endl
215 <<
"Nodes existing in Session1 but missing in Session0:" << std::endl;
217 log <<
"** " <<
it->first << std::endl;
223 for(;
it!=map[0].end(); ++
it) {
224 NodeToRecordsetMap::const_iterator
it1 = map[1].find(
it->first);
232 && *recConcrete0!=*recConcrete1) {
235 log << std::endl <<
"TAG: " <<
tag << std::endl
236 <<
"Differences for common nodes:" << std::endl;
238 log <<std::endl <<
"** " <<
it->first << std::endl;
244 return StatusCode::SUCCESS;
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode SourceCompAlg::execute |
( |
| ) |
|
|
overridevirtual |
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ extraOutputDeps()
const DataObjIDColl & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
57 return Algorithm::extraOutputDeps();
◆ finalize()
StatusCode SourceCompAlg::finalize |
( |
| ) |
|
|
overridevirtual |
◆ getGlobalTags()
std::vector< std::string > SourceCompAlg::getGlobalTags |
( |
RDBAccessSvc * |
rdbAccessSvc, |
|
|
std::ofstream & |
log |
|
) |
| |
|
private |
Definition at line 78 of file SourceCompAlg.cxx.
81 std::vector<std::string> tagdiff, taglist1, taglist2;
82 std::vector<char> leftright;
85 tagdiff.resize(taglist1.size()+taglist2.size());
86 auto it1 = taglist1.begin();
87 auto it1last = taglist1.end();
88 auto it2 = taglist2.begin();
89 auto it2last = taglist2.end();
90 auto itdiff = tagdiff.begin();
95 leftright.push_back(
'>');
103 while(
it1!=it1last) {
104 leftright.push_back(
'<');
116 leftright.push_back(
'<');
118 else if (*it2<*
it1) {
122 leftright.push_back(
'>');
130 tagdiff.resize(itdiff-tagdiff.begin());
131 if(!tagdiff.empty()) {
132 log <<
"The databases contain different sets of supported locked global tags" << std::endl;
133 auto leftrightIt = leftright.begin();
134 for(
const std::string&
tag : tagdiff ) {
135 log << *leftrightIt <<
" " <<
tag << std::endl;
◆ initialize()
StatusCode SourceCompAlg::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 17 of file SourceCompAlg.cxx.
27 if(!rdbAccessSvc->connect(connName)) {
29 return StatusCode::FAILURE;
35 ATH_MSG_FATAL(
"Unable to cast IRDBAccessSvc to RDBAccessSvc");
36 return StatusCode::FAILURE;
43 std::vector<std::string> tagList;
54 if(!tagList.empty()) {
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_connNames
std::vector<std::string> SourceCompAlg::m_connNames {"Session1","Session2"} |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_globalTag
Gaudi::Property<std::string> SourceCompAlg::m_globalTag |
|
private |
Initial value:{this
, "GlobalTag"
, ""
, "Global geometry tag. If empty, all locked and supported tags will be compared"}
Definition at line 26 of file SourceCompAlg.h.
◆ m_supportedGeometry
Gaudi::Property<std::string> SourceCompAlg::m_supportedGeometry |
|
private |
Initial value:{this
, "SupportedGeometry"
, ""
, "Supported Geometry flag to be set from jobOptions"}
Definition at line 31 of file SourceCompAlg.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
std::string getChildTag(const std::string &childNode, const std::string &parentTag, const std::string &parentNode, const std::string &connName) override
Gets the tag name for the node by giving its parent node tag.
StatusCode compareGlobalTags(const std::vector< std::string > &globalTags, RDBAccessSvc *rdbAccessSvc, std::ofstream &log)
Gaudi::Property< std::string > m_supportedGeometry
std::vector< std::string > getLockedSupportedTags(const std::string &supportedFlag, const std::string &connName="ATLASDD")
std::string find(const std::string &s)
return a remapped string
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
virtual void setOwner(IDataHandleHolder *o)=0
virtual StatusCode sysInitialize() override
Override sysInitialize.
RDBAccessSvc is the implementation of IRDBAccessSvc interface.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
Gaudi::Property< std::string > m_globalTag
std::vector< HWIdentifier >::iterator it1
::StatusCode StatusCode
StatusCode definition for legacy code.
IRDBRecordset_ptr getRecordsetPtr(const std::string &node, const std::string &tag, const std::string &tag2node="", const std::string &connName="ATLASDD") override
Provides access to the Recordset object containing HVS-tagged data.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
coral::AttributeList RDBTagDetails
DataObjIDColl m_extendedExtraObjects
#define ATH_MSG_WARNING(x)
std::vector< std::string > getGlobalTags(RDBAccessSvc *rdbAccessSvc, std::ofstream &log)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
AthAlgorithm()
Default constructor:
#define ATLAS_THREAD_SAFE
std::vector< std::string > m_connNames
void getTagDetails(RDBTagDetails &tagDetails, const std::string &tag, const std::string &connName="ATLASDD") override
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
void getAllLeafNodes(std::vector< std::string > &list, const std::string &connName="ATLASDD")
bool disconnect(const std::string &connName) override
If the counnection counter==1 closes the connection.
RDBRecordset is an implementation of IRDBRecordset interface.
void compare(const RDBRecordset &rec, std::ostream &os) const