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

#include <MuonCalibDefaultCalibrationSource.h>

Inheritance diagram for MuonCalib::MuonCalibDefaultCalibrationSource:
Collaboration diagram for MuonCalib::MuonCalibDefaultCalibrationSource:

Public Member Functions

 MuonCalibDefaultCalibrationSource (const std::string &t, const std::string &n, const IInterface *p)
 constructor More...
 
virtual ~MuonCalibDefaultCalibrationSource ()
 
StatusCode initialize ()
 initialize 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
 
bool InstertCalibration (CoolInserter *inserter, bool store_t0, bool store_rt)
 insert calibration More...
 
virtual void SetIOV (int &, int &) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 interface method More...
 

Protected Member Functions

bool insert_calibration (bool store_t0, bool store_rt)
 insert calibration More...
 
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...
 

Protected Attributes

CoolInserterm_inserter = nullptr
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

StatusCode initialize_regions (const std::vector< std::string > &reg_str, std::vector< std::unique_ptr< RegionSelectorBase > > &reg)
 
void initialize_creation_flags (const std::vector< bool > &ts_applied, const std::vector< bool > &bf_applied, unsigned int n_regions, std::vector< unsigned int > &flags)
 
StatusCode load_rt_files ()
 
bool store_t0_fun ()
 
bool store_rt_fun ()
 
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::vector< std::string > m_t0_region_str
 
std::vector< float > m_t0
 
std::vector< bool > m_time_slewing_applied_t0
 
std::vector< bool > m_bfield_applied_t0
 
std::vector< std::string > m_rt_region_str
 
std::vector< std::string > m_rt_files
 
std::vector< bool > m_time_slewing_applied_rt
 
std::vector< bool > m_bfield_applied_rt
 
std::vector< unsigned int > m_creation_flags_t0
 
std::vector< unsigned int > m_creation_flags_rt
 
std::vector< std::unique_ptr< RegionSelectorBase > > m_t0_regions
 
std::vector< std::unique_ptr< RegionSelectorBase > > m_rt_regions
 
std::vector< std::map< int, SamplePoint > > m_rt_points
 
ServiceHandle< RegionSelectionSvcm_reg_sel_svc {this, "RegionSelectionSvc", "RegionSelectionSvc"}
 
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 23 of file MuonCalibDefaultCalibrationSource.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

◆ MuonCalibDefaultCalibrationSource()

MuonCalib::MuonCalibDefaultCalibrationSource::MuonCalibDefaultCalibrationSource ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)

constructor

Definition at line 25 of file MuonCalibDefaultCalibrationSource.cxx.

25  :
26  AthAlgTool(t, n, p) {
27  declareInterface<IMuonCalibConditionsSource>(this);
28  declareProperty("T0Regions", m_t0_region_str);
29  declareProperty("T0", m_t0);
30  declareProperty("TimeSlewingAppliedT0", m_time_slewing_applied_t0);
31  declareProperty("BFieldCorrectionAppliedT0", m_bfield_applied_t0);
32  declareProperty("RtRegions", m_rt_region_str);
33  declareProperty("RtFiles", m_rt_files);
34  declareProperty("TimeSlewingAppliedRt", m_time_slewing_applied_rt);
35  declareProperty("BFieldCorrectionAppliedRt", m_bfield_applied_rt);
36  }

◆ ~MuonCalibDefaultCalibrationSource()

MuonCalib::MuonCalibDefaultCalibrationSource::~MuonCalibDefaultCalibrationSource ( )
virtualdefault

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  }

◆ 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

◆ initialize()

StatusCode MuonCalib::MuonCalibDefaultCalibrationSource::initialize ( )

initialize

Definition at line 38 of file MuonCalibDefaultCalibrationSource.cxx.

38  {
39  // get region selection service
40  ATH_CHECK(m_reg_sel_svc.retrieve());
41  // check matching lengths
42  if (m_t0_region_str.size() != m_t0.size()) {
43  ATH_MSG_FATAL("Configuration error: T0Regions and T0 have different size!");
44  return StatusCode::FAILURE;
45  }
46  if (m_rt_region_str.size() != m_rt_files.size()) {
47  ATH_MSG_FATAL("Configuration error: RtRegions and RtFiles have different size!");
48  return StatusCode::FAILURE;
49  }
50  // initialize regions
55  // load rt files
57  return StatusCode::SUCCESS;
58  }

◆ initialize_creation_flags()

void MuonCalib::MuonCalibDefaultCalibrationSource::initialize_creation_flags ( const std::vector< bool > &  ts_applied,
const std::vector< bool > &  bf_applied,
unsigned int  n_regions,
std::vector< unsigned int > &  flags 
)
private

Definition at line 79 of file MuonCalibDefaultCalibrationSource.cxx.

81  {
82  for (unsigned int i = 0; i < n_regions; i++) {
83  unsigned int flag(0);
84  if (i < ts_applied.size() && ts_applied[i]) { flag |= MuonCalib::TIME_SLEWING_CORRECTION_APPLIED; }
85  if (i < bf_applied.size() && bf_applied[i]) { flag |= MuonCalib::B_FIELD_CORRECTIONS_APPLIED; }
86  flags.push_back(flag);
87  }
88  }

◆ initialize_regions()

StatusCode MuonCalib::MuonCalibDefaultCalibrationSource::initialize_regions ( const std::vector< std::string > &  reg_str,
std::vector< std::unique_ptr< RegionSelectorBase > > &  reg 
)
private

Definition at line 66 of file MuonCalibDefaultCalibrationSource.cxx.

67  {
68  for (const std::string &reg : reg_str) {
69  std::unique_ptr<RegionSelectorBase> r = RegionSelectorBase::GetRegion(reg);
70  if (!r) {
71  ATH_MSG_FATAL("Error in region " << reg);
72  return StatusCode::FAILURE;
73  }
74  reg_vec.emplace_back(std::move(r));
75  }
76  return StatusCode::SUCCESS;
77  }

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

◆ insert_calibration()

bool MuonCalib::MuonCalibDefaultCalibrationSource::insert_calibration ( bool  store_t0,
bool  store_rt 
)
protectedvirtual

insert calibration

Implements MuonCalib::IMuonCalibConditionsSource.

Definition at line 60 of file MuonCalibDefaultCalibrationSource.cxx.

60  {
61  if (store_t0 && !store_t0_fun()) { return false; }
62  if (store_rt && !store_rt_fun()) { return false; }
63  return true;
64  }

◆ InstertCalibration()

bool MuonCalib::IMuonCalibConditionsSource::InstertCalibration ( CoolInserter inserter,
bool  store_t0,
bool  store_rt 
)
inlineinherited

insert calibration

Definition at line 24 of file IMuonCalibConditionsSource.h.

24  {
25  m_inserter = inserter;
26  return insert_calibration(store_t0, store_rt);
27  }

◆ interfaceID()

static const InterfaceID& MuonCalib::IMuonCalibConditionsSource::interfaceID ( )
inlinestaticinherited

interface method

Definition at line 22 of file IMuonCalibConditionsSource.h.

22 { return IID_IMuonCalibConditionsSource; }

◆ load_rt_files()

StatusCode MuonCalib::MuonCalibDefaultCalibrationSource::load_rt_files ( )
inlineprivate

Definition at line 90 of file MuonCalibDefaultCalibrationSource.cxx.

90  {
91  for (const auto & fname : m_rt_files) {
92  std::string line;
93  std::ifstream rtf(fname.c_str());
94  if (!rtf.good()) {
95  ATH_MSG_FATAL("Cannot open rt file '" << fname << "'!");
96  return StatusCode::FAILURE;
97  }
98  std::map<int, SamplePoint> pts;
99  // read dummy line
100  std::getline(rtf, line);
101  int i(0);
102  while (!rtf.eof()) {
103  std::getline(rtf, line);
104  std::istringstream ln_str(line);
105  double r, t, s;
106  ln_str >> r;
107  ln_str >> t;
108  ln_str >> s;
109  if (rtf.eof()) break;
110  SamplePoint pt(t, r, s);
111  pts[i] = pt;
112  i++;
113  }
114  m_rt_points.push_back(pts);
115  }
116  return StatusCode::SUCCESS;
117  }

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

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

◆ SetIOV()

virtual void MuonCalib::IMuonCalibConditionsSource::SetIOV ( int &  ,
int &   
) const
inlinevirtualinherited

Reimplemented in MuonCalib::MuonCalibDbCalibrationSource.

Definition at line 28 of file IMuonCalibConditionsSource.h.

28 {}

◆ store_rt_fun()

bool MuonCalib::MuonCalibDefaultCalibrationSource::store_rt_fun ( )
inlineprivate

Definition at line 135 of file MuonCalibDefaultCalibrationSource.cxx.

135  {
136  const std::vector<NtupleStationId> &regions(m_reg_sel_svc->GetStationsInRegions());
137  for (const auto & region : regions) {
138  MuonFixedId fid(region.FixedId());
139  for (unsigned int i = 0; i < m_rt_regions.size(); i++) {
140  if (m_rt_regions[i]->Result(fid)) {
141  m_inserter->StoreRtChamber(region, m_rt_points[i], std::string("default"), m_creation_flags_rt[i]);
142  break;
143  }
144  }
145  }
146  return true;
147  }

◆ store_t0_fun()

bool MuonCalib::MuonCalibDefaultCalibrationSource::store_t0_fun ( )
inlineprivate

Definition at line 119 of file MuonCalibDefaultCalibrationSource.cxx.

119  {
120  const std::vector<NtupleStationId> &regions(m_reg_sel_svc->GetStationsInRegions());
121  for (const auto & region : regions) {
122  MuonFixedId fid(region.FixedId());
123  for (unsigned int i = 0; i < m_t0_regions.size(); i++) {
124  if (m_t0_regions[i]->Result(fid)) {
125  m_inserter->StartT0Chamber(region);
126  while (m_inserter->AppendT0(m_t0[i], 5, 0.0)) {}
127  m_inserter->StoreT0Chamber(region, std::string("default"), m_creation_flags_t0[i]);
128  // break;
129  }
130  }
131  }
132  return true;
133  }

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

Member Data Documentation

◆ m_bfield_applied_rt

std::vector<bool> MuonCalib::MuonCalibDefaultCalibrationSource::m_bfield_applied_rt
private

Definition at line 44 of file MuonCalibDefaultCalibrationSource.h.

◆ m_bfield_applied_t0

std::vector<bool> MuonCalib::MuonCalibDefaultCalibrationSource::m_bfield_applied_t0
private

Definition at line 39 of file MuonCalibDefaultCalibrationSource.h.

◆ m_creation_flags_rt

std::vector<unsigned int> MuonCalib::MuonCalibDefaultCalibrationSource::m_creation_flags_rt
private

Definition at line 48 of file MuonCalibDefaultCalibrationSource.h.

◆ m_creation_flags_t0

std::vector<unsigned int> MuonCalib::MuonCalibDefaultCalibrationSource::m_creation_flags_t0
private

Definition at line 47 of file MuonCalibDefaultCalibrationSource.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_inserter

CoolInserter* MuonCalib::IMuonCalibConditionsSource::m_inserter = nullptr
protectedinherited

Definition at line 31 of file IMuonCalibConditionsSource.h.

◆ m_reg_sel_svc

ServiceHandle<RegionSelectionSvc> MuonCalib::MuonCalibDefaultCalibrationSource::m_reg_sel_svc {this, "RegionSelectionSvc", "RegionSelectionSvc"}
private

Definition at line 54 of file MuonCalibDefaultCalibrationSource.h.

◆ m_rt_files

std::vector<std::string> MuonCalib::MuonCalibDefaultCalibrationSource::m_rt_files
private

Definition at line 42 of file MuonCalibDefaultCalibrationSource.h.

◆ m_rt_points

std::vector<std::map<int, SamplePoint> > MuonCalib::MuonCalibDefaultCalibrationSource::m_rt_points
private

Definition at line 52 of file MuonCalibDefaultCalibrationSource.h.

◆ m_rt_region_str

std::vector<std::string> MuonCalib::MuonCalibDefaultCalibrationSource::m_rt_region_str
private

Definition at line 41 of file MuonCalibDefaultCalibrationSource.h.

◆ m_rt_regions

std::vector<std::unique_ptr<RegionSelectorBase> > MuonCalib::MuonCalibDefaultCalibrationSource::m_rt_regions
private

Definition at line 50 of file MuonCalibDefaultCalibrationSource.h.

◆ m_t0

std::vector<float> MuonCalib::MuonCalibDefaultCalibrationSource::m_t0
private

Definition at line 37 of file MuonCalibDefaultCalibrationSource.h.

◆ m_t0_region_str

std::vector<std::string> MuonCalib::MuonCalibDefaultCalibrationSource::m_t0_region_str
private

Definition at line 36 of file MuonCalibDefaultCalibrationSource.h.

◆ m_t0_regions

std::vector<std::unique_ptr<RegionSelectorBase> > MuonCalib::MuonCalibDefaultCalibrationSource::m_t0_regions
private

Definition at line 50 of file MuonCalibDefaultCalibrationSource.h.

◆ m_time_slewing_applied_rt

std::vector<bool> MuonCalib::MuonCalibDefaultCalibrationSource::m_time_slewing_applied_rt
private

Definition at line 43 of file MuonCalibDefaultCalibrationSource.h.

◆ m_time_slewing_applied_t0

std::vector<bool> MuonCalib::MuonCalibDefaultCalibrationSource::m_time_slewing_applied_t0
private

Definition at line 38 of file MuonCalibDefaultCalibrationSource.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:
MuonCalib::MuonCalibDefaultCalibrationSource::m_creation_flags_t0
std::vector< unsigned int > m_creation_flags_t0
Definition: MuonCalibDefaultCalibrationSource.h:47
MuonCalib::MuonCalibDefaultCalibrationSource::m_time_slewing_applied_rt
std::vector< bool > m_time_slewing_applied_rt
Definition: MuonCalibDefaultCalibrationSource.h:43
beamspotman.r
def r
Definition: beamspotman.py:676
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
checkFileSG.line
line
Definition: checkFileSG.py:75
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
EgEfficiencyCorr_testFixedInput.pts
list pts
Definition: EgEfficiencyCorr_testFixedInput.py:10
MuonCalib::RegionSelectorBase::GetRegion
static std::unique_ptr< RegionSelectorBase > GetRegion(const std::string &input)
create a region from a string
Definition: RegionSelectorBase.cxx:13
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
AthenaPoolTestRead.flags
flags
Definition: AthenaPoolTestRead.py:8
MuonCalib::IMuonCalibConditionsSource::m_inserter
CoolInserter * m_inserter
Definition: IMuonCalibConditionsSource.h:31
MuonCalib::MuonCalibDefaultCalibrationSource::load_rt_files
StatusCode load_rt_files()
Definition: MuonCalibDefaultCalibrationSource.cxx:90
test_pyathena.pt
pt
Definition: test_pyathena.py:11
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
MuonCalib::MuonCalibDefaultCalibrationSource::m_t0_regions
std::vector< std::unique_ptr< RegionSelectorBase > > m_t0_regions
Definition: MuonCalibDefaultCalibrationSource.h:50
MuonCalib::CoolInserter::StoreT0Chamber
bool StoreT0Chamber(const NtupleStationId &id, const std::string &file, unsigned int creation_flags=0)
Definition: CoolInserter.cxx:193
MuonCalib::MuonCalibDefaultCalibrationSource::m_creation_flags_rt
std::vector< unsigned int > m_creation_flags_rt
Definition: MuonCalibDefaultCalibrationSource.h:48
python.DomainsRegistry.reg
reg
globals -----------------------------------------------------------------—
Definition: DomainsRegistry.py:343
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
MuonCalib::MuonCalibDefaultCalibrationSource::m_rt_points
std::vector< std::map< int, SamplePoint > > m_rt_points
Definition: MuonCalibDefaultCalibrationSource.h:52
MuonCalib::CoolInserter::AppendT0
bool AppendT0(float t0, int validflag, float adc0)
Definition: CoolInserter.cxx:184
AthCommonDataStore
Definition: AthCommonDataStore.h:52
MuonCalib::IMuonCalibConditionsSource::insert_calibration
virtual bool insert_calibration(bool store_t0, bool store_rt)=0
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
MuonCalib::MuonCalibDefaultCalibrationSource::m_bfield_applied_rt
std::vector< bool > m_bfield_applied_rt
Definition: MuonCalibDefaultCalibrationSource.h:44
lumiFormat.i
int i
Definition: lumiFormat.py:92
beamspotman.n
n
Definition: beamspotman.py:731
MuonCalib::MuonCalibDefaultCalibrationSource::initialize_creation_flags
void initialize_creation_flags(const std::vector< bool > &ts_applied, const std::vector< bool > &bf_applied, unsigned int n_regions, std::vector< unsigned int > &flags)
Definition: MuonCalibDefaultCalibrationSource.cxx:79
Result
ICscStripFitter::Result Result
Definition: CalibCscStripFitter.cxx:13
master.flag
bool flag
Definition: master.py:29
MuonCalib::MuonCalibDefaultCalibrationSource::m_time_slewing_applied_t0
std::vector< bool > m_time_slewing_applied_t0
Definition: MuonCalibDefaultCalibrationSource.h:38
MuonCalib::MuonCalibDefaultCalibrationSource::m_reg_sel_svc
ServiceHandle< RegionSelectionSvc > m_reg_sel_svc
Definition: MuonCalibDefaultCalibrationSource.h:54
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MuonCalib::B_FIELD_CORRECTIONS_APPLIED
@ B_FIELD_CORRECTIONS_APPLIED
Definition: MdtCalibCreationFlags.h:10
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
MuonCalib::MuonCalibDefaultCalibrationSource::m_bfield_applied_t0
std::vector< bool > m_bfield_applied_t0
Definition: MuonCalibDefaultCalibrationSource.h:39
MuonCalib::MuonCalibDefaultCalibrationSource::m_rt_files
std::vector< std::string > m_rt_files
Definition: MuonCalibDefaultCalibrationSource.h:42
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
MuonCalib::TIME_SLEWING_CORRECTION_APPLIED
@ TIME_SLEWING_CORRECTION_APPLIED
Definition: MdtCalibCreationFlags.h:10
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
MuonCalib::MuonCalibDefaultCalibrationSource::m_rt_region_str
std::vector< std::string > m_rt_region_str
Definition: MuonCalibDefaultCalibrationSource.h:41
MuonCalib::MuonCalibDefaultCalibrationSource::initialize_regions
StatusCode initialize_regions(const std::vector< std::string > &reg_str, std::vector< std::unique_ptr< RegionSelectorBase > > &reg)
Definition: MuonCalibDefaultCalibrationSource.cxx:66
MuonCalib::MuonCalibDefaultCalibrationSource::m_t0_region_str
std::vector< std::string > m_t0_region_str
Definition: MuonCalibDefaultCalibrationSource.h:36
MuonCalib::MuonCalibDefaultCalibrationSource::m_t0
std::vector< float > m_t0
Definition: MuonCalibDefaultCalibrationSource.h:37
python.AthDsoLogger.fname
string fname
Definition: AthDsoLogger.py:67
a
TList * a
Definition: liststreamerinfos.cxx:10
MuonCalib::MuonCalibDefaultCalibrationSource::store_rt_fun
bool store_rt_fun()
Definition: MuonCalibDefaultCalibrationSource.cxx:135
h
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
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
MuonCalib::MuonCalibDefaultCalibrationSource::store_t0_fun
bool store_t0_fun()
Definition: MuonCalibDefaultCalibrationSource.cxx:119
MuonCalib::CoolInserter::StoreRtChamber
bool StoreRtChamber(const NtupleStationId &id, const std::map< int, SamplePoint > &points, const std::string &file, unsigned int creation_flags=0)
Definition: CoolInserter.cxx:250
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
MuonCalib::MuonCalibDefaultCalibrationSource::m_rt_regions
std::vector< std::unique_ptr< RegionSelectorBase > > m_rt_regions
Definition: MuonCalibDefaultCalibrationSource.h:50
MuonCalib::CoolInserter::StartT0Chamber
bool StartT0Chamber(const NtupleStationId &sid)
Definition: CoolInserter.cxx:155
fitman.k
k
Definition: fitman.py:528