ATLAS Offline Software
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
TGCCablingDbTool Class Reference

#include <TGCCablingDbTool.h>

Inheritance diagram for TGCCablingDbTool:
Collaboration diagram for TGCCablingDbTool:

Public Types

typedef std::list< SG::TransientAddress * > tadList
 
typedef tadList::iterator tadListIterator
 

Public Member Functions

 TGCCablingDbTool (const std::string &type, const std::string &name, const IInterface *parent)
 Constructor. More...
 
virtual StatusCode updateAddress (StoreID::type storeID, SG::TransientAddress *tad, const EventContext &ctx)
 Required by the IAddressProvider interface. More...
 
virtual StatusCode initialize ()
 Initilize. More...
 
virtual StatusCode finalize ()
 Finalize. More...
 
virtual std::vector< std::string > * giveASD2PP_DIFF_12 ()
 Method to provide database. More...
 
virtual std::string getFolderName () const
 Get the folder name. More...
 
virtual StatusCode loadParameters (IOVSVC_CALLBACK_ARGS)
 Load parameters using IOV keys. More...
 
virtual StatusCode loadASD2PP_DIFF_12 (IOVSVC_CALLBACK_ARGS)
 Load parameters using the folder name. More...
 
virtual StatusCode readASD2PP_DIFF_12FromText ()
 Load parameters from text database. 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 sysInitialize () override
 Perform system initialization for an algorithm. 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
 
 DeclareInterfaceID (IAddressProvider, 1, 0)
 
virtual StatusCode preLoadAddresses (StoreID::type, tadList &)
 get all addresses from Provider : Called before Begin Event More...
 
virtual StatusCode loadAddresses (StoreID::type, tadList &)
 get all new addresses from Provider for this Event. More...
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

std::string m_DataLocation
 Data location. More...
 
std::string m_Folder
 Folder name. More...
 
std::vector< std::string > * m_ASD2PP_DIFF_12
 Database as strings. More...
 
bool m_readASD2PP_DIFF_12FromText
 Flag for readASD2PP_DIFF_12FromText() More...
 
std::string m_filename
 File name of the text database. More...
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 15 of file TGCCablingDbTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

◆ tadList

typedef std::list<SG::TransientAddress*> IAddressProvider::tadList
inherited

Definition at line 32 of file IAddressProvider.h.

◆ tadListIterator

typedef tadList::iterator IAddressProvider::tadListIterator
inherited

Definition at line 33 of file IAddressProvider.h.

Constructor & Destructor Documentation

◆ TGCCablingDbTool()

TGCCablingDbTool::TGCCablingDbTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Constructor.

Definition at line 21 of file TGCCablingDbTool.cxx.

25  m_DataLocation ("keyTGC"),
26  m_ASD2PP_DIFF_12(nullptr)
27 {
28  declareInterface<ITGCCablingDbTool>(this);
29 
30  declareProperty("Folder", m_Folder="/TGC/CABLING/MAP_SCHEMA");
31 
32  // ASD2PP_diff_12.db is the text database for the TGCcabling12 package
33  declareProperty("filename_ASD2PP_DIFF_12", m_filename="ASD2PP_diff_12_ONL.db");
34  declareProperty("readASD2PP_DIFF_12FromText", m_readASD2PP_DIFF_12FromText=true);
35 }

Member Function Documentation

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ DeclareInterfaceID()

IAddressProvider::DeclareInterfaceID ( IAddressProvider  ,
,
 
)
inherited

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

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

◆ finalize()

StatusCode TGCCablingDbTool::finalize ( )
virtual

Finalize.

Definition at line 59 of file TGCCablingDbTool.cxx.

59  {
60  ATH_MSG_INFO("finalize");
61 
62  // Database is deleted if exists
63  delete m_ASD2PP_DIFF_12;
64  m_ASD2PP_DIFF_12 = nullptr;
65 
66  return StatusCode::SUCCESS;
67 }

◆ getFolderName()

std::string TGCCablingDbTool::getFolderName ( ) const
virtual

Get the folder name.

Implements ITGCCablingDbTool.

Definition at line 69 of file TGCCablingDbTool.cxx.

69  {
70  return m_Folder;
71 }

◆ giveASD2PP_DIFF_12()

std::vector< std::string > * TGCCablingDbTool::giveASD2PP_DIFF_12 ( )
virtual

Method to provide database.

Implements ITGCCablingDbTool.

Definition at line 73 of file TGCCablingDbTool.cxx.

73  {
74  ATH_MSG_INFO("giveASD2PP_DIFF_12 (m_ASD2PP_DIFF_12 is " << (!m_ASD2PP_DIFF_12 ? "NULL" : "not NULL") << ")");
75 
76  // If no database found, null pointer is returned.
77  if(!m_ASD2PP_DIFF_12) {
78  return nullptr;
79  }
80 
81  // Copy the database
82  return new std::vector<std::string> (*m_ASD2PP_DIFF_12);
83 }

◆ initialize()

StatusCode TGCCablingDbTool::initialize ( )
virtual

Initilize.

Definition at line 54 of file TGCCablingDbTool.cxx.

54  {
55  ATH_MSG_INFO("initialize");
56  return StatusCode::SUCCESS;
57 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

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.

◆ interfaceID()

static const InterfaceID& ITGCCablingDbTool::interfaceID ( )
inlinestaticinherited

Definition at line 22 of file ITGCCablingDbTool.h.

22 { return IID_ITGCCablingDbTool; };

◆ loadAddresses()

virtual StatusCode IAddressProvider::loadAddresses ( StoreID::type  ,
tadList  
)
inlinevirtualinherited

get all new addresses from Provider for this Event.

Reimplemented in LArFlatConditionSvc, Athena::xAODEventSelector, IOVDbSvc, MixingEventSelector, AddressRemappingSvc, AthenaPoolAddressProviderSvc, and CondProxyProvider.

Definition at line 42 of file IAddressProvider.h.

43  {
44  return StatusCode::SUCCESS;
45  }

◆ loadASD2PP_DIFF_12()

StatusCode TGCCablingDbTool::loadASD2PP_DIFF_12 ( IOVSVC_CALLBACK_ARGS  )
virtual

Load parameters using the folder name.

Implements ITGCCablingDbTool.

Definition at line 101 of file TGCCablingDbTool.cxx.

101  {
102  ATH_MSG_INFO("loadTGCMap from DB");
103 
105  ATH_MSG_INFO("m_readASD2PP_DIFF_12FromText is true. readASD2PP_DIFF_12FromText() will be executed with m_filename=" << m_filename.c_str());
107  if(sc.isFailure()) {
108  ATH_MSG_FATAL("could not retreive the CondAttrListCollection from DB folder " << m_Folder);
109  return sc;
110  }
111  return sc;
112  }
113 
114  // CondAttrListCollection is retrieved from COOL database
115  const CondAttrListCollection* atrc;
116  StatusCode sc = detStore()->retrieve(atrc, m_Folder);
117  if(sc.isFailure()) {
118  ATH_MSG_FATAL("could not retreive the CondAttrListCollection from DB folder " << m_Folder);
119  return sc;
120  } else {
121  ATH_MSG_INFO("CondAttrListCollection from DB folder have been obtained with size " << atrc->size());
122  }
123 
124  // Old database is deleted if exists
125  delete m_ASD2PP_DIFF_12;
126  // New database is created
127  m_ASD2PP_DIFF_12 = new std::vector<std::string>;
128 
129  // Database is copied from CondAttrListCollection to m_ASD2PP_DIFF_12
132  for(; itr!=itr_e; ++itr) {
133  const coral::AttributeList& atr=itr->second;
134 
135  std::string string_ASD2PP_DIFF_12;
136  string_ASD2PP_DIFF_12 = *(static_cast<const std::string*>((atr["data"]).addressOfData()));
137  ATH_MSG_DEBUG("Sequence load is \n" << string_ASD2PP_DIFF_12);
138 
139  // string_ASD2PP_DIFF_12 has multiple newlines and will be separated into multiple lines (strings)
140  unsigned int length = string_ASD2PP_DIFF_12.length();
141  while(length>0) {
142  unsigned int newLine = string_ASD2PP_DIFF_12.find('\n');
143  if(length>newLine) {
144  m_ASD2PP_DIFF_12->push_back(string_ASD2PP_DIFF_12.substr(0, newLine));
145  string_ASD2PP_DIFF_12.erase(0, newLine+1);
146  }
147  length = string_ASD2PP_DIFF_12.length();
148  };
149  }
150 
151  return StatusCode::SUCCESS;
152 }

◆ loadParameters()

StatusCode TGCCablingDbTool::loadParameters ( IOVSVC_CALLBACK_ARGS  )
virtual

Load parameters using IOV keys.

Implements ITGCCablingDbTool.

Definition at line 85 of file TGCCablingDbTool.cxx.

85  {
86  ATH_MSG_INFO("loadParameters from DB");
87 
88  StatusCode sc;
89  std::list<std::string>::const_iterator itr = keys.begin();
90  std::list<std::string>::const_iterator itr_e = keys.end();
91  for(; itr!=itr_e; ++itr) {
92  ATH_MSG_INFO("loadParameters " << (*itr) << " I=" << I << " ");
93  if((*itr)==m_Folder) {
95  }
96  }
97 
98  return sc;
99 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

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.

◆ preLoadAddresses()

virtual StatusCode IAddressProvider::preLoadAddresses ( StoreID::type  ,
tadList  
)
inlinevirtualinherited

get all addresses from Provider : Called before Begin Event

Reimplemented in LArFlatConditionSvc, Athena::xAODEventSelector, IOVDbSvc, MixingEventSelector, AddressRemappingSvc, CondProxyProvider, AthenaPoolAddressProviderSvc, ByteStreamAddressProviderSvc, and MuonCalibStreamAddressProviderSvc.

Definition at line 36 of file IAddressProvider.h.

37  {
38  return StatusCode::SUCCESS;
39  }

◆ readASD2PP_DIFF_12FromText()

StatusCode TGCCablingDbTool::readASD2PP_DIFF_12FromText ( )
virtual

Load parameters from text database.

Implements ITGCCablingDbTool.

Definition at line 154 of file TGCCablingDbTool.cxx.

154  {
155  ATH_MSG_INFO("readTGCMap from text");
156 
157  // PathResolver finds the full path of the file (default file name is ASD2PP_diff_12.db)
158  std::string location = PathResolver::find_file(m_filename, "DATAPATH");
159  if(location=="") {
160  ATH_MSG_FATAL("Could not find " << m_filename.c_str());
161  return StatusCode::FAILURE;
162  }
163 
164  // ASD2PP_diff_12.db is opened as inASDToPP
165  std::ifstream inASDToPP;
166  inASDToPP.open(location.c_str());
167  if(inASDToPP.bad()) {
168  ATH_MSG_FATAL("Could not open file " << location.c_str());
169  return StatusCode::FAILURE;
170  }
171 
172  ATH_MSG_INFO("readTGCMap found file " << location.c_str());
173 
174  // Old database is deleted if exists
175  delete m_ASD2PP_DIFF_12;
176  // New database is created
177  m_ASD2PP_DIFF_12 = new std::vector<std::string>;
178 
179  unsigned int nLines = 0;
180  std::string buf;
181  // Copy database into m_ASD2PP_DIFF_12
182  while(getline(inASDToPP, buf)){
183  m_ASD2PP_DIFF_12->push_back(buf);
184  ATH_MSG_DEBUG(m_filename.c_str() << " L" << ++nLines << ": " << buf.c_str());
185  }
186 
187  inASDToPP.close();
188  return StatusCode::SUCCESS;
189 }

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateAddress()

StatusCode TGCCablingDbTool::updateAddress ( StoreID::type  storeID,
SG::TransientAddress tad,
const EventContext &  ctx 
)
virtual

Required by the IAddressProvider interface.

Implements IAddressProvider.

Definition at line 39 of file TGCCablingDbTool.cxx.

41  {
42  CLID clid = tad->clID();
43  const std::string& key = tad->name();
44  // Need to add the CLID comparison
45  if(/* ==clid && */m_DataLocation==key) {
46  ATH_MSG_DEBUG("updateAddress OK, clid = " << clid << " key = " << key);
47  return StatusCode::SUCCESS;
48  }
49 
50  ATH_MSG_FATAL("updateAddress failed, clid = " << clid << " key = " << key);
51  return StatusCode::FAILURE;
52 }

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_ASD2PP_DIFF_12

std::vector<std::string>* TGCCablingDbTool::m_ASD2PP_DIFF_12
private

Database as strings.

Definition at line 52 of file TGCCablingDbTool.h.

◆ m_DataLocation

std::string TGCCablingDbTool::m_DataLocation
private

Data location.

Definition at line 47 of file TGCCablingDbTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_filename

std::string TGCCablingDbTool::m_filename
private

File name of the text database.

Definition at line 57 of file TGCCablingDbTool.h.

◆ m_Folder

std::string TGCCablingDbTool::m_Folder
private

Folder name.

Definition at line 49 of file TGCCablingDbTool.h.

◆ m_readASD2PP_DIFF_12FromText

bool TGCCablingDbTool::m_readASD2PP_DIFF_12FromText
private

Flag for readASD2PP_DIFF_12FromText()

Definition at line 55 of file TGCCablingDbTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
CondAttrListCollection::end
const_iterator end() const
Definition: CondAttrListCollection.h:315
TGCCablingDbTool::m_Folder
std::string m_Folder
Folder name.
Definition: TGCCablingDbTool.h:49
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
PathResolver::find_file
static std::string find_file(const std::string &logical_file_name, const std::string &search_path, SearchType search_type=LocalSearch)
Definition: PathResolver.cxx:251
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
TGCCablingDbTool::m_readASD2PP_DIFF_12FromText
bool m_readASD2PP_DIFF_12FromText
Flag for readASD2PP_DIFF_12FromText()
Definition: TGCCablingDbTool.h:55
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
CondAttrListCollection::begin
const_iterator begin() const
Access to Chan/AttributeList pairs via iterators.
Definition: CondAttrListCollection.h:309
TGCCablingDbTool::readASD2PP_DIFF_12FromText
virtual StatusCode readASD2PP_DIFF_12FromText()
Load parameters from text database.
Definition: TGCCablingDbTool.cxx:154
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
python.PyKernel.AttributeList
AttributeList
Definition: PyKernel.py:36
CondAttrListCollection
This class is a collection of AttributeLists where each one is associated with a channel number....
Definition: CondAttrListCollection.h:52
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
SG::TransientAddress::name
const std::string & name() const
Get the primary (hashed) SG key.
Definition: TransientAddress.h:208
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
python.DecayParser.buf
buf
print ("=> [%s]"cmd)
Definition: DecayParser.py:27
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
python.sizes.location
string location
Definition: sizes.py:11
SG::TransientAddress::clID
CLID clID() const
Retrieve string key:
Definition: TransientAddress.h:201
test_pyathena.parent
parent
Definition: test_pyathena.py:15
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
CondAttrListCollection::size
size_type size() const
number of Chan/AttributeList pairs
Definition: CondAttrListCollection.h:322
a
TList * a
Definition: liststreamerinfos.cxx:10
h
TGCCablingDbTool::loadASD2PP_DIFF_12
virtual StatusCode loadASD2PP_DIFF_12(IOVSVC_CALLBACK_ARGS)
Load parameters using the folder name.
Definition: TGCCablingDbTool.cxx:101
CondAttrListCollection::const_iterator
ChanAttrListMap::const_iterator const_iterator
Definition: CondAttrListCollection.h:63
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TGCCablingDbTool::m_ASD2PP_DIFF_12
std::vector< std::string > * m_ASD2PP_DIFF_12
Database as strings.
Definition: TGCCablingDbTool.h:52
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
TGCCablingDbTool::m_DataLocation
std::string m_DataLocation
Data location.
Definition: TGCCablingDbTool.h:47
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
I
#define I(x, y, z)
Definition: MD5.cxx:116
length
double length(const pvec &v)
Definition: FPGATrackSimLLPDoubletHoughTransformTool.cxx:26
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
fitman.k
k
Definition: fitman.py:528
TGCCablingDbTool::m_filename
std::string m_filename
File name of the text database.
Definition: TGCCablingDbTool.h:57
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37