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

#include <MdtCalibFormatAlgTest.h>

Inheritance diagram for MdtCalibFormatAlgTest:
Collaboration diagram for MdtCalibFormatAlgTest:

Public Member Functions

 MdtCalibFormatAlgTest (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual ~MdtCalibFormatAlgTest () override
 
virtual StatusCode initialize () override
 
virtual StatusCode execute (const EventContext &) const override
 
virtual StatusCode finalize () override
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual bool isClonable () const override
 Specify if the algorithm is clonable. More...
 
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
 
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
virtual bool filterPassed (const EventContext &ctx) const
 
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 
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
 

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

StatusCode retrieve (const EventContext &, const std::string &, const std::string &, std::chrono::duration< double > &) const
 
StatusCode processBlob (const std::string &, const std::string &, const std::string &) const
 
StatusCode extractString (std::string &input, std::string &output, const std::string &separator) 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...
 

Static Private Member Functions

static std::string timestamp ()
 

Private Attributes

SG::ReadCondHandleKey< CondAttrListCollectionm_readKey_RT_old
 
SG::ReadCondHandleKey< CondAttrListCollectionm_readKey_RT_new
 
SG::ReadCondHandleKey< CondAttrListCollectionm_readKey_T0_old
 
SG::ReadCondHandleKey< CondAttrListCollectionm_readKey_T0_new
 
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. 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 44 of file MdtCalibFormatAlgTest.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ MdtCalibFormatAlgTest()

MdtCalibFormatAlgTest::MdtCalibFormatAlgTest ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 8 of file MdtCalibFormatAlgTest.cxx.

8  :
9  AthReentrantAlgorithm(name, pSvcLocator) {}

◆ ~MdtCalibFormatAlgTest()

MdtCalibFormatAlgTest::~MdtCalibFormatAlgTest ( )
overridevirtual

Definition at line 12 of file MdtCalibFormatAlgTest.cxx.

12 { ATH_MSG_VERBOSE("Calling destructor"); }

Member Function Documentation

◆ cardinality()

unsigned int AthReentrantAlgorithm::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Override this to return 0 for reentrant algorithms.

Definition at line 55 of file AthReentrantAlgorithm.cxx.

56 {
57  return 0;
58 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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; }

◆ execute()

StatusCode MdtCalibFormatAlgTest::execute ( const EventContext &  ctx) const
overridevirtual

Definition at line 25 of file MdtCalibFormatAlgTest.cxx.

25  {
26  ATH_MSG_INFO("Calling execute");
27 
28  // setup parameters
29  std::chrono::duration<double> retrieving_RT_old{};
30  std::chrono::duration<double> retrieving_RT_new{};
31  std::chrono::duration<double> retrieving_T0_old{};
32  std::chrono::duration<double> retrieving_T0_new{};
33 
34  // retrieve all folders
35  if (!retrieve(ctx, "RT", "old", retrieving_RT_old).isSuccess()) return StatusCode::FAILURE;
36  if (!retrieve(ctx, "RT", "new", retrieving_RT_new).isSuccess()) return StatusCode::FAILURE;
37  if (!retrieve(ctx, "T0", "old", retrieving_T0_old).isSuccess()) return StatusCode::FAILURE;
38  if (!retrieve(ctx, "T0", "new", retrieving_T0_new).isSuccess()) return StatusCode::FAILURE;
39 
40  // postprocess
41  ATH_MSG_INFO("Retrieving time for (RT, old) = "
42  << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving_RT_old).count() * 1.0) << "s ");
43  ATH_MSG_INFO("Retrieving time for (RT, new) = "
44  << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving_RT_new).count() * 1.0) << "s ");
45  ATH_MSG_INFO("Retrieving time for (T0, old) = "
46  << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving_T0_old).count() * 1.0) << "s ");
47  ATH_MSG_INFO("Retrieving time for (T0, new) = "
48  << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving_T0_new).count() * 1.0) << "s ");
49 
50  ATH_MSG_INFO("MADE IT TO THE END!!");
51  return StatusCode::SUCCESS;
52 }

◆ extractString()

StatusCode MdtCalibFormatAlgTest::extractString ( std::string &  input,
std::string &  output,
const std::string &  separator 
) const
private

Definition at line 132 of file MdtCalibFormatAlgTest.cxx.

132  {
133  /* stolen from here: MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibDbCoolStrTool/src/MdtCalibDbCoolStrTool.cxx */
134  unsigned long int pos = 0;
135  std::string::size_type start = input.find_first_not_of(separator.c_str(), pos);
136  if (start == std::string::npos) {
137  ATH_MSG_ERROR("Cannot extract string in a proper way!");
138  return StatusCode::FAILURE;
139  }
140  std::string::size_type stop = input.find_first_of(separator.c_str(), start + 1);
141  if (stop == std::string::npos) stop = input.size();
142  output = input.substr(start, stop - start);
143  input.erase(pos, stop - pos);
144 
145  return StatusCode::SUCCESS;
146 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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

◆ extraOutputDeps()

const DataObjIDColl & AthReentrantAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 79 of file AthReentrantAlgorithm.cxx.

80 {
81  // If we didn't find any symlinks to add, just return the collection
82  // from the base class. Otherwise, return the extended collection.
83  if (!m_extendedExtraObjects.empty()) {
85  }
86  return Algorithm::extraOutputDeps();
87 }

◆ filterPassed()

virtual bool AthReentrantAlgorithm::filterPassed ( const EventContext &  ctx) const
inlinevirtualinherited

Definition at line 135 of file AthReentrantAlgorithm.h.

135  {
136  return execState( ctx ).filterPassed();
137  }

◆ finalize()

StatusCode MdtCalibFormatAlgTest::finalize ( )
overridevirtual

Definition at line 55 of file MdtCalibFormatAlgTest.cxx.

55  {
56  ATH_MSG_INFO("Calling finalize");
57  return StatusCode::SUCCESS;
58 }

◆ initialize()

StatusCode MdtCalibFormatAlgTest::initialize ( )
overridevirtual

Definition at line 15 of file MdtCalibFormatAlgTest.cxx.

15  {
16  ATH_MSG_INFO("Calling initialize");
21  return StatusCode::SUCCESS;
22 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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.

◆ isClonable()

bool AthReentrantAlgorithm::isClonable ( ) const
overridevirtualinherited

◆ msg() [1/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::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< Gaudi::Algorithm >::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< Gaudi::Algorithm > >::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.

◆ processBlob()

StatusCode MdtCalibFormatAlgTest::processBlob ( const std::string &  folder,
const std::string &  setup,
const std::string &  data 
) const
private

Definition at line 123 of file MdtCalibFormatAlgTest.cxx.

123  {
124  // ATH_CHECK( extractString(istr, header, "\n") );
125  // ATH_CHECK( extractString(istr, payload, "\n") );
126  // if( istr.size() ) ATH_CHECK( extractString(istr, trailer, "\n") );
127  ATH_MSG_DEBUG("processing Blob " << folder << "," << setup << "," << data); // leave for now
128  return StatusCode::SUCCESS;
129 }

◆ 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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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  }

◆ retrieve()

StatusCode MdtCalibFormatAlgTest::retrieve ( const EventContext &  ctx,
const std::string &  folder,
const std::string &  setup,
std::chrono::duration< double > &  timer 
) const
private

Definition at line 61 of file MdtCalibFormatAlgTest.cxx.

62  {
63  ATH_MSG_INFO("Starting with " << folder << " and " << setup << " at " << timestamp());
64 
65  // Start with an infinte range and narrow it down as needed
66  EventIDRange rangeW = IOVInfiniteRange::infiniteMixed();
67 
69  if (setup == "new" && folder == "T0")
70  readKey = m_readKey_T0_new;
71  else if (setup == "new" && folder == "RT")
72  readKey = m_readKey_RT_new;
73  else if (setup == "old" && folder == "T0")
74  readKey = m_readKey_T0_old;
75 
76  SG::ReadCondHandle<CondAttrListCollection> readHandle{readKey, ctx};
77  const CondAttrListCollection* readCdo{*readHandle};
78  if (readCdo == nullptr) {
79  ATH_MSG_ERROR("Null pointer to the read conditions object");
80  return StatusCode::FAILURE;
81  }
82 
83  EventIDRange range;
84  if (!readHandle.range(range)) {
85  ATH_MSG_ERROR("Failed to retrieve validity range for " << readHandle.key());
86  return StatusCode::FAILURE;
87  }
88 
89  // intersect validity range of this obj with the validity of already-loaded objs
90  rangeW = EventIDRange::intersect(range, rangeW);
91 
92  ATH_MSG_DEBUG("Size of CondAttrListCollection " << readHandle.fullKey() << " readCdo->size()= " << readCdo->size());
93  ATH_MSG_DEBUG("Range of input is " << range << ", range of output is " << rangeW);
94 
96  for (itr = readCdo->begin(); itr != readCdo->end(); ++itr) {
98  const coral::AttributeList& atr = itr->second;
100  timer += end1 - start1;
101  // m_retrieving[folder][setup] += end1-start1;
102 
103  std::string data;
104  if (atr["data"].specification().type() == typeid(coral::Blob)) {
105  ATH_MSG_VERBOSE("Loading data as a BLOB, uncompressing...");
106  if (!CoralUtilities::readBlobAsString(atr["data"].data<coral::Blob>(), data)) {
107  ATH_MSG_FATAL("Cannot uncompress BLOB! Aborting...");
108  return StatusCode::FAILURE;
109  }
110  } else {
111  ATH_MSG_VERBOSE("Loading data as a STRING");
112  data = *(static_cast<const std::string*>((atr["data"]).addressOfData()));
113  }
114 
115  // write it to the buffer to compare it
116  if (processBlob(folder, setup, data).isFailure()) return StatusCode::FAILURE;
117  }
118  ATH_MSG_INFO("Ending at " << timestamp());
119  return StatusCode::SUCCESS;
120 }

◆ setFilterPassed()

virtual void AthReentrantAlgorithm::setFilterPassed ( bool  state,
const EventContext &  ctx 
) const
inlinevirtualinherited

Definition at line 139 of file AthReentrantAlgorithm.h.

139  {
140  execState( ctx ).setFilterPassed( state );
141  }

◆ sysExecute()

StatusCode AthReentrantAlgorithm::sysExecute ( const EventContext &  ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 67 of file AthReentrantAlgorithm.cxx.

68 {
69  return Gaudi::Algorithm::sysExecute (ctx);
70 }

◆ sysInitialize()

StatusCode AthReentrantAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in InputMakerBase, and HypoBase.

Definition at line 96 of file AthReentrantAlgorithm.cxx.

96  {
98 
99  if (sc.isFailure()) {
100  return sc;
101  }
102 
103  ServiceHandle<ICondSvc> cs("CondSvc",name());
104  for (auto h : outputHandles()) {
105  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
106  // do this inside the loop so we don't create the CondSvc until needed
107  if ( cs.retrieve().isFailure() ) {
108  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
109  return StatusCode::SUCCESS;
110  }
111  if (cs->regHandle(this,*h).isFailure()) {
112  sc = StatusCode::FAILURE;
113  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
114  << " with CondSvc");
115  }
116  }
117  }
118  return sc;
119 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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.

◆ timestamp()

std::string MdtCalibFormatAlgTest::timestamp ( )
staticprivate

Definition at line 148 of file MdtCalibFormatAlgTest.cxx.

148  {
149  const boost::posix_time::ptime now = boost::posix_time::microsec_clock::local_time();
150  const boost::posix_time::time_duration td = now.time_of_day();
151  const long hours = td.hours();
152  const long minutes = td.minutes();
153  const long seconds = td.seconds();
154  const long milliseconds = td.total_milliseconds() - ((hours * 3600 + minutes * 60 + seconds) * 1000);
155  char buf[40];
156  sprintf(buf, "%02ld:%02ld:%02ld.%03ld", hours, minutes, seconds, milliseconds);
157  return buf;
158 }

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthReentrantAlgorithm::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 153 of file AthReentrantAlgorithm.h.

◆ m_readKey_RT_new

SG::ReadCondHandleKey<CondAttrListCollection> MdtCalibFormatAlgTest::m_readKey_RT_new
private
Initial value:
{this, "ReadKey_RT_new", "/MDT/RTBLOB",
"Key to new-style /MDT/RTBLOB folder"}

Definition at line 63 of file MdtCalibFormatAlgTest.h.

◆ m_readKey_RT_old

SG::ReadCondHandleKey<CondAttrListCollection> MdtCalibFormatAlgTest::m_readKey_RT_old
private
Initial value:
{this, "ReadKey_RT_old", "/MDT/RTBLOB",
"Key to old-style /MDT/RTBLOB folder"}

Definition at line 61 of file MdtCalibFormatAlgTest.h.

◆ m_readKey_T0_new

SG::ReadCondHandleKey<CondAttrListCollection> MdtCalibFormatAlgTest::m_readKey_T0_new
private
Initial value:
{this, "ReadKey_T0_new", "/MDT/RTBLOB",
"Key to new-style /MDT/T0BLOB folder"}

Definition at line 67 of file MdtCalibFormatAlgTest.h.

◆ m_readKey_T0_old

SG::ReadCondHandleKey<CondAttrListCollection> MdtCalibFormatAlgTest::m_readKey_T0_old
private
Initial value:
{this, "ReadKey_T0_old", "/MDT/RTBLOB",
"Key to old-style /MDT/T0BLOB folder"}

Definition at line 65 of file MdtCalibFormatAlgTest.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
MdtCalibFormatAlgTest::m_readKey_RT_new
SG::ReadCondHandleKey< CondAttrListCollection > m_readKey_RT_new
Definition: MdtCalibFormatAlgTest.h:63
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:14
AthCommonDataStore::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 > renounce(T &h)
Definition: AthCommonDataStore.h:380
IOVInfiniteRange::infiniteMixed
static EventIDRange infiniteMixed()
Produces an mixed EventIDRange that is infinite in Time and RunLumi.
Definition: IOVInfiniteRange.h:55
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
python.subdetectors.tile.Blob
Blob
Definition: tile.py:17
PixelModuleFeMask_create_db.stop
int stop
Definition: PixelModuleFeMask_create_db.py:76
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
python.PyKernel.AttributeList
AttributeList
Definition: PyKernel.py:36
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
CondAttrListCollection
This class is a collection of AttributeLists where each one is associated with a channel number....
Definition: CondAttrListCollection.h:52
MdtCalibFormatAlgTest::m_readKey_T0_new
SG::ReadCondHandleKey< CondAttrListCollection > m_readKey_T0_new
Definition: MdtCalibFormatAlgTest.h:67
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
python.utils.AtlRunQueryTimer.timer
def timer(name, disabled=False)
Definition: AtlRunQueryTimer.py:86
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
python.handimod.now
now
Definition: handimod.py:675
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthReentrantAlgorithm::AthReentrantAlgorithm
AthReentrantAlgorithm()
Default constructor:
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
python.DecayParser.buf
buf
print ("=> [%s]"cmd)
Definition: DecayParser.py:27
CoralUtilities::readBlobAsString
bool readBlobAsString(const coral::Blob &, std::string &)
Definition: blobaccess.cxx:85
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
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
python.LArCalib_HVCorrConfig.seconds
seconds
Definition: LArCalib_HVCorrConfig.py:86
AthReentrantAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthReentrantAlgorithm.h:153
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
MdtCalibFormatAlgTest::processBlob
StatusCode processBlob(const std::string &, const std::string &, const std::string &) const
Definition: MdtCalibFormatAlgTest.cxx:123
merge.output
output
Definition: merge.py:17
python.InDetPriVxFinderConfig.setup
setup
Definition: InDetPriVxFinderConfig.py:124
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
AthReentrantAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthReentrantAlgorithm.cxx:96
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
taskman.hours
hours
Definition: taskman.py:650
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
SG::ReadCondHandleKey< CondAttrListCollection >
a
TList * a
Definition: liststreamerinfos.cxx:10
h
Amg::intersect
std::optional< double > intersect(const AmgVector(N)&posA, const AmgVector(N)&dirA, const AmgVector(N)&posB, const AmgVector(N)&dirB)
Calculates the point of closest approach of two lines.
Definition: GeoPrimitivesHelpers.h:325
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
CondAttrListCollection::const_iterator
ChanAttrListMap::const_iterator const_iterator
Definition: CondAttrListCollection.h:63
MdtCalibFormatAlgTest::m_readKey_RT_old
SG::ReadCondHandleKey< CondAttrListCollection > m_readKey_RT_old
Definition: MdtCalibFormatAlgTest.h:61
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
MdtCalibFormatAlgTest::m_readKey_T0_old
SG::ReadCondHandleKey< CondAttrListCollection > m_readKey_T0_old
Definition: MdtCalibFormatAlgTest.h:65
CaloCondBlobAlgs_fillNoiseFromASCII.folder
folder
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:56
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
MdtCalibFormatAlgTest::timestamp
static std::string timestamp()
Definition: MdtCalibFormatAlgTest.cxx:148
MdtCalibFormatAlgTest::retrieve
StatusCode retrieve(const EventContext &, const std::string &, const std::string &, std::chrono::duration< double > &) const
Definition: MdtCalibFormatAlgTest.cxx:61
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
ServiceHandle< ICondSvc >