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

#include <BPhysMetadataBase.h>

Inheritance diagram for DerivationFramework::BPhysMetadataBase:
Collaboration diagram for DerivationFramework::BPhysMetadataBase:

Public Member Functions

 BPhysMetadataBase (const std::string &t, const std::string &n, const IInterface *p)
 
virtual StatusCode initialize ()
 
virtual StatusCode finalize ()
 
virtual StatusCode addBranches () const
 Pass the thinning service
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
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 AlgTool interface methods. More...
 

Protected Member Functions

virtual void recordPropertyI (const std::string &name, int val)
 
virtual void recordPropertyL (const std::string &name, long val)
 
virtual void recordPropertyD (const std::string &name, double val)
 
virtual void recordPropertyB (const std::string &name, bool val)
 
virtual void recordPropertyS (const std::string &name, const std::string &val)
 
virtual void recordPropertyVI (const std::string &name, const std::vector< int > &val)
 
virtual void recordPropertyVL (const std::string &name, const std::vector< long > &val)
 
virtual void recordPropertyVD (const std::string &name, const std::vector< double > &val)
 
virtual void recordPropertyVB (const std::string &name, const std::vector< bool > &val)
 
virtual void recordPropertyVS (const std::string &name, const std::vector< std::string > &val)
 
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

virtual StatusCode saveMetaDataBPhys () const
 
virtual std::string buildFolderName (const std::string &fname="") const
 
virtual std::string vecToString (const std::vector< int > &v) const
 
virtual std::string vecToString (const std::vector< long > &v) const
 
virtual std::string vecToString (const std::vector< double > &v) const
 
virtual std::string vecToString (const std::vector< bool > &v) const
 
virtual std::string vecToString (const std::vector< std::string > &v) const
 
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

ServiceHandle< StoreGateSvcm_outputMetaStore
 Object accessing the output metadata store. More...
 
std::string m_derivationName
 
std::string m_mdFolderName
 
std::string m_prefix
 
std::map< std::string, int > m_propInt
 
std::map< std::string, long > m_propLong
 
std::map< std::string, double > m_propDouble
 
std::map< std::string, bool > m_propBool
 
std::map< std::string, std::string > m_propString
 
std::map< std::string, std::vector< int > > m_propVInt
 
std::map< std::string, std::vector< long > > m_propVLong
 
std::map< std::string, std::vector< double > > m_propVDouble
 
std::map< std::string, std::vector< bool > > m_propVBool
 
std::map< std::string, std::vector< std::string > > m_propVString
 
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 43 of file BPhysMetadataBase.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ BPhysMetadataBase()

DerivationFramework::BPhysMetadataBase::BPhysMetadataBase ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)

Definition at line 45 of file BPhysMetadataBase.cxx.

48  : AthAlgTool(t,n,p),
49  m_outputMetaStore("StoreGateSvc/MetaDataStore", n) {
50 
51  declareInterface<DerivationFramework::IAugmentationTool>(this);
52 
53  // Declare derivation format name
54  declareProperty("DerivationName", m_derivationName = "_NOSUCHFORMAT_");
55 
56  // Declare metadata folder name (should start with derivation name)
57  declareProperty("MetadataFolderName", m_mdFolderName = "_NONE_");
58 
59  // Prefix would typically be the derivation format name
60  declareProperty("Prefix", m_prefix = "");
61 
62  }

Member Function Documentation

◆ addBranches()

StatusCode DerivationFramework::BPhysMetadataBase::addBranches ( ) const
virtual

Pass the thinning service

Implements DerivationFramework::IAugmentationTool.

Definition at line 92 of file BPhysMetadataBase.cxx.

92  {
93 
94  // nothing to do here
95  return StatusCode::SUCCESS;
96  }

◆ buildFolderName()

std::string DerivationFramework::BPhysMetadataBase::buildFolderName ( const std::string &  fname = "") const
privatevirtual

Definition at line 150 of file BPhysMetadataBase.cxx.

150  {
151 
152  std::string result = fname;
153  if ( m_mdFolderName != "_NONE_" && m_mdFolderName != "" ) {
155  } else {
156  if ( m_derivationName != "_NOSUCHFORMAT_" && m_derivationName != "" ) {
158  } else {
159  // default to the tool's name
160  result += name();
161  }
162  }
163  return result;
164  }

◆ 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  }

◆ 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 DerivationFramework::BPhysMetadataBase::finalize ( )
virtual

Definition at line 84 of file BPhysMetadataBase.cxx.

84  {
85 
86  ATH_MSG_DEBUG("BPhysMetaDataBase::finalize()");
87 
88  // everything all right
89  return StatusCode::SUCCESS;
90  }

◆ initialize()

StatusCode DerivationFramework::BPhysMetadataBase::initialize ( )
virtual

Definition at line 64 of file BPhysMetadataBase.cxx.

64  {
65 
66  ATH_MSG_DEBUG("BPhysMetaDataBase::initialize() -- begin");
67 
68  // handle general prefix
69  if ( m_prefix == "" ) {
70  if ( m_derivationName == "_NOSUCHFORMAT_" ) {
71  m_prefix = name() +"_";
72  } else {
73  m_prefix = m_derivationName + "_";
74  }
75  }
76 
78 
79  ATH_MSG_DEBUG("BPhysMetaDataBase::initialize() -- end");
80 
81  return StatusCode::SUCCESS;
82  }

◆ 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& DerivationFramework::IAugmentationTool::interfaceID ( )
inlinestaticinherited

AlgTool interface methods.

Definition at line 31 of file IAugmentationTool.h.

31 { return IID_IAugmentationTool; }

◆ 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.

◆ recordPropertyB()

void DerivationFramework::BPhysMetadataBase::recordPropertyB ( const std::string &  name,
bool  val 
)
protectedvirtual

Definition at line 181 of file BPhysMetadataBase.cxx.

181  {
182  ATH_MSG_INFO("Calling recordProperty(bool)");
184  }

◆ recordPropertyD()

void DerivationFramework::BPhysMetadataBase::recordPropertyD ( const std::string &  name,
double  val 
)
protectedvirtual

Definition at line 176 of file BPhysMetadataBase.cxx.

176  {
177  ATH_MSG_INFO("Calling recordProperty(double)");
179  }

◆ recordPropertyI()

void DerivationFramework::BPhysMetadataBase::recordPropertyI ( const std::string &  name,
int  val 
)
protectedvirtual

Definition at line 166 of file BPhysMetadataBase.cxx.

166  {
167  ATH_MSG_INFO("Calling recordProperty(int)");
169  }

◆ recordPropertyL()

void DerivationFramework::BPhysMetadataBase::recordPropertyL ( const std::string &  name,
long  val 
)
protectedvirtual

Definition at line 171 of file BPhysMetadataBase.cxx.

171  {
172  ATH_MSG_INFO("Calling recordProperty(long)");
174  }

◆ recordPropertyS()

void DerivationFramework::BPhysMetadataBase::recordPropertyS ( const std::string &  name,
const std::string &  val 
)
protectedvirtual

Definition at line 186 of file BPhysMetadataBase.cxx.

186  {
187  ATH_MSG_INFO("Calling recordProperty(string)");
189  }

◆ recordPropertyVB()

void DerivationFramework::BPhysMetadataBase::recordPropertyVB ( const std::string &  name,
const std::vector< bool > &  val 
)
protectedvirtual

Definition at line 209 of file BPhysMetadataBase.cxx.

210  {
211  ATH_MSG_INFO("Calling recordProperty(vector<bool>)");
213  }

◆ recordPropertyVD()

void DerivationFramework::BPhysMetadataBase::recordPropertyVD ( const std::string &  name,
const std::vector< double > &  val 
)
protectedvirtual

Definition at line 203 of file BPhysMetadataBase.cxx.

204  {
205  ATH_MSG_INFO("Calling recordProperty(vector<double>)");
207  }

◆ recordPropertyVI()

void DerivationFramework::BPhysMetadataBase::recordPropertyVI ( const std::string &  name,
const std::vector< int > &  val 
)
protectedvirtual

Definition at line 191 of file BPhysMetadataBase.cxx.

192  {
193  ATH_MSG_INFO("Calling recordProperty(vector<int>)");
195  }

◆ recordPropertyVL()

void DerivationFramework::BPhysMetadataBase::recordPropertyVL ( const std::string &  name,
const std::vector< long > &  val 
)
protectedvirtual

Definition at line 197 of file BPhysMetadataBase.cxx.

198  {
199  ATH_MSG_INFO("Calling recordProperty(vector<long>)");
201  }

◆ recordPropertyVS()

void DerivationFramework::BPhysMetadataBase::recordPropertyVS ( const std::string &  name,
const std::vector< std::string > &  val 
)
protectedvirtual

Definition at line 215 of file BPhysMetadataBase.cxx.

216  {
217  ATH_MSG_INFO("Calling recordProperty(vector<string>)");
219  }

◆ 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  }

◆ saveMetaDataBPhys()

StatusCode DerivationFramework::BPhysMetadataBase::saveMetaDataBPhys ( ) const
privatevirtual

Definition at line 104 of file BPhysMetadataBase.cxx.

104  {
105 
106  ATH_MSG_DEBUG("BPhysMetaDataBase::saveMetaDataBPhys() -- begin");
107 
108  std::string mdFolderKey = buildFolderName() + "_MetaData";
109  // protection
110  if ( m_outputMetaStore->contains< xAOD::FileMetaData >( mdFolderKey ) ) {
111  ATH_MSG_WARNING("saveMetaDataBPhys2: "
112  "xAOD::FileMetaData already in output: "
113  << mdFolderKey
114  << " -- BPhys metadata will NOT be saved!");
115  } else {
116  // create a FileMetaData object
117  auto fm = std::make_unique< xAOD::FileMetaData >();
118  auto fmAux = std::make_unique< xAOD::FileMetaDataAuxInfo >();
119  fm->setStore( fmAux.get() );
120 
121  // fill it
122  SG::Accessor<std::string> DerivationNameAcc(m_prefix+"DerivationName");
123  DerivationNameAcc(*fm) = m_derivationName;
124 
125  SG::Accessor<std::string> MetaDatafolderNameAcc(m_prefix+"MetaDataFolderName");
126  MetaDatafolderNameAcc(*fm) = m_mdFolderName;
127 
128  // fill it with contents of maps
129  SET_VALUES_IMP( int , m_propInt );
130  SET_VALUES_IMP( long , m_propLong );
131  SET_VALUES_IMP( double , m_propDouble );
132  SET_VALUES_IMP( bool , m_propBool );
133  SET_VALUES_IMP( std::string , m_propString );
134  SET_VALUES_IMP( std::vector<int> , m_propVInt );
135  SET_VALUES_IMP( std::vector<long> , m_propVLong );
136  SET_VALUES_IMP( std::vector<double> , m_propVDouble );
137  SET_VALUES_IMP( std::vector<bool> , m_propVBool );
138  SET_VALUES_IMP( std::vector<std::string>, m_propVString );
139 
140  // record it
141  ATH_CHECK( m_outputMetaStore->record( std::move(fm), mdFolderKey ) );
142  ATH_CHECK( m_outputMetaStore->record( std::move(fmAux),
143  mdFolderKey+"Aux." ) );
144  }
145 
146  return StatusCode::SUCCESS;
147  }

◆ 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.

◆ 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  }

◆ vecToString() [1/5]

std::string DerivationFramework::BPhysMetadataBase::vecToString ( const std::vector< bool > &  v) const
privatevirtual

Definition at line 251 of file BPhysMetadataBase.cxx.

251  {
252  std::string str("[");
253  for (unsigned int i=0; i<v.size(); ++i) {
254  str += std::to_string(v[i]);
255  if ( i < v.size()-1 ) str += ",";
256  }
257  str += "]";
258  return str;
259  }

◆ vecToString() [2/5]

std::string DerivationFramework::BPhysMetadataBase::vecToString ( const std::vector< double > &  v) const
privatevirtual

Definition at line 241 of file BPhysMetadataBase.cxx.

241  {
242  std::string str("[");
243  for (unsigned int i=0; i<v.size(); ++i) {
244  str += std::to_string(v[i]);
245  if ( i < v.size()-1 ) str += ",";
246  }
247  str += "]";
248  return str;
249  }

◆ vecToString() [3/5]

std::string DerivationFramework::BPhysMetadataBase::vecToString ( const std::vector< int > &  v) const
privatevirtual

Definition at line 221 of file BPhysMetadataBase.cxx.

221  {
222  std::string str("[");
223  for (unsigned int i=0; i<v.size(); ++i) {
224  str += std::to_string(v[i]);
225  if ( i < v.size()-1 ) str += ",";
226  }
227  str += "]";
228  return str;
229  }

◆ vecToString() [4/5]

std::string DerivationFramework::BPhysMetadataBase::vecToString ( const std::vector< long > &  v) const
privatevirtual

Definition at line 231 of file BPhysMetadataBase.cxx.

231  {
232  std::string str("[");
233  for (unsigned int i=0; i<v.size(); ++i) {
234  str += std::to_string(v[i]);
235  if ( i < v.size()-1 ) str += ",";
236  }
237  str += "]";
238  return str;
239  }

◆ vecToString() [5/5]

std::string DerivationFramework::BPhysMetadataBase::vecToString ( const std::vector< std::string > &  v) const
privatevirtual

Definition at line 261 of file BPhysMetadataBase.cxx.

261  {
262  std::string str("[");
263  for (unsigned int i=0; i<v.size(); ++i) {
264  str += "'";
265  str += v[i];
266  str += "'";
267  if ( i < v.size()-1 ) str += ",";
268  }
269  str += "]";
270  return str;
271  }

Member Data Documentation

◆ m_derivationName

std::string DerivationFramework::BPhysMetadataBase::m_derivationName
private

Definition at line 82 of file BPhysMetadataBase.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_mdFolderName

std::string DerivationFramework::BPhysMetadataBase::m_mdFolderName
private

Definition at line 83 of file BPhysMetadataBase.h.

◆ m_outputMetaStore

ServiceHandle< StoreGateSvc > DerivationFramework::BPhysMetadataBase::m_outputMetaStore
private

Object accessing the output metadata store.

Definition at line 79 of file BPhysMetadataBase.h.

◆ m_prefix

std::string DerivationFramework::BPhysMetadataBase::m_prefix
private

Definition at line 84 of file BPhysMetadataBase.h.

◆ m_propBool

std::map<std::string, bool> DerivationFramework::BPhysMetadataBase::m_propBool
private

Definition at line 90 of file BPhysMetadataBase.h.

◆ m_propDouble

std::map<std::string, double> DerivationFramework::BPhysMetadataBase::m_propDouble
private

Definition at line 89 of file BPhysMetadataBase.h.

◆ m_propInt

std::map<std::string, int> DerivationFramework::BPhysMetadataBase::m_propInt
private

Definition at line 87 of file BPhysMetadataBase.h.

◆ m_propLong

std::map<std::string, long> DerivationFramework::BPhysMetadataBase::m_propLong
private

Definition at line 88 of file BPhysMetadataBase.h.

◆ m_propString

std::map<std::string, std::string> DerivationFramework::BPhysMetadataBase::m_propString
private

Definition at line 91 of file BPhysMetadataBase.h.

◆ m_propVBool

std::map<std::string, std::vector<bool> > DerivationFramework::BPhysMetadataBase::m_propVBool
private

Definition at line 95 of file BPhysMetadataBase.h.

◆ m_propVDouble

std::map<std::string, std::vector<double> > DerivationFramework::BPhysMetadataBase::m_propVDouble
private

Definition at line 94 of file BPhysMetadataBase.h.

◆ m_propVInt

std::map<std::string, std::vector<int> > DerivationFramework::BPhysMetadataBase::m_propVInt
private

Definition at line 92 of file BPhysMetadataBase.h.

◆ m_propVLong

std::map<std::string, std::vector<long> > DerivationFramework::BPhysMetadataBase::m_propVLong
private

Definition at line 93 of file BPhysMetadataBase.h.

◆ m_propVString

std::map<std::string, std::vector<std::string> > DerivationFramework::BPhysMetadataBase::m_propVString
private

Definition at line 96 of file BPhysMetadataBase.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:
DerivationFramework::BPhysMetadataBase::m_prefix
std::string m_prefix
Definition: BPhysMetadataBase.h:84
get_generator_info.result
result
Definition: get_generator_info.py:21
DerivationFramework::BPhysMetadataBase::saveMetaDataBPhys
virtual StatusCode saveMetaDataBPhys() const
Definition: BPhysMetadataBase.cxx:104
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
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
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SET_VALUES_IMP
#define SET_VALUES_IMP(TYPE, MAP)
Definition: BPhysMetadataBase.cxx:98
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
DerivationFramework::BPhysMetadataBase::m_propVInt
std::map< std::string, std::vector< int > > m_propVInt
Definition: BPhysMetadataBase.h:92
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
DerivationFramework::BPhysMetadataBase::m_propBool
std::map< std::string, bool > m_propBool
Definition: BPhysMetadataBase.h:90
DerivationFramework::BPhysMetadataBase::buildFolderName
virtual std::string buildFolderName(const std::string &fname="") const
Definition: BPhysMetadataBase.cxx:150
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
lumiFormat.i
int i
Definition: lumiFormat.py:85
beamspotman.n
n
Definition: beamspotman.py:731
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
xAOD::FileMetaData_v1
Class holding file-level metadata about an xAOD file.
Definition: FileMetaData_v1.h:34
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:228
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
DerivationFramework::BPhysMetadataBase::m_outputMetaStore
ServiceHandle< StoreGateSvc > m_outputMetaStore
Object accessing the output metadata store.
Definition: BPhysMetadataBase.h:79
DerivationFramework::BPhysMetadataBase::m_derivationName
std::string m_derivationName
Definition: BPhysMetadataBase.h:82
DerivationFramework::BPhysMetadataBase::m_propInt
std::map< std::string, int > m_propInt
Definition: BPhysMetadataBase.h:87
python.AthDsoLogger.fname
string fname
Definition: AthDsoLogger.py:67
python.PyAthena.v
v
Definition: PyAthena.py:154
DerivationFramework::BPhysMetadataBase::m_propVBool
std::map< std::string, std::vector< bool > > m_propVBool
Definition: BPhysMetadataBase.h:95
a
TList * a
Definition: liststreamerinfos.cxx:10
h
DerivationFramework::BPhysMetadataBase::m_propVLong
std::map< std::string, std::vector< long > > m_propVLong
Definition: BPhysMetadataBase.h:93
python.CaloScaleNoiseConfig.str
str
Definition: CaloScaleNoiseConfig.py:78
DerivationFramework::BPhysMetadataBase::m_propString
std::map< std::string, std::string > m_propString
Definition: BPhysMetadataBase.h:91
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
DerivationFramework::BPhysMetadataBase::m_propVString
std::map< std::string, std::vector< std::string > > m_propVString
Definition: BPhysMetadataBase.h:96
DerivationFramework::BPhysMetadataBase::m_propDouble
std::map< std::string, double > m_propDouble
Definition: BPhysMetadataBase.h:89
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
str
Definition: BTagTrackIpAccessor.cxx:11
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
DerivationFramework::BPhysMetadataBase::m_mdFolderName
std::string m_mdFolderName
Definition: BPhysMetadataBase.h:83
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
DerivationFramework::BPhysMetadataBase::m_propVDouble
std::map< std::string, std::vector< double > > m_propVDouble
Definition: BPhysMetadataBase.h:94
fitman.k
k
Definition: fitman.py:528
DerivationFramework::BPhysMetadataBase::m_propLong
std::map< std::string, long > m_propLong
Definition: BPhysMetadataBase.h:88