|
ATLAS Offline Software
|
#include <TileOFC2DBAlg.h>
|
| TileOFC2DBAlg (const std::string &name, ISvcLocator *pSvcLocator) |
|
| ~TileOFC2DBAlg () |
|
StatusCode | initialize () |
|
StatusCode | execute () |
|
StatusCode | finalize () |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
Definition at line 34 of file TileOFC2DBAlg.h.
◆ StoreGateSvc_t
◆ TileOFC2DBAlg()
TileOFC2DBAlg::TileOFC2DBAlg |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~TileOFC2DBAlg()
TileOFC2DBAlg::~TileOFC2DBAlg |
( |
| ) |
|
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode TileOFC2DBAlg::execute |
( |
| ) |
|
Definition at line 80 of file TileOFC2DBAlg.cxx.
81 const EventContext &ctx = Gaudi::Hive::currentContext();
88 << eventInfo->runNumber() <<
","
89 << eventInfo->eventNumber() <<
":"
90 << eventInfo->timeStamp() <<
"]" );
94 if (1 != eventInfo->eventNumber()) {
95 ATH_MSG_DEBUG(
"Event NOT selected for creating conditions objects " );
96 return StatusCode::SUCCESS;
108 std::string
folder(
"/TILE/ONL01/FILTER/");
114 coral::AttributeListSpecification*
spec =
new coral::AttributeListSpecification();
115 spec->extend(
"TileCalibBlobOfc",
"blob");
120 float zeroPhase(0.0);
131 std::vector<float>
phases;
144 int nPhases =
phases.size();
148 coolChannelCreated[drawerIdx] =
true;
158 for (
int isam = 0; isam < ndig; isam++) {
173 <<
" drawerIdx " << drawerIdx
178 for (
int isam = 0; isam < ndig; ++isam)
183 for (
int isam = 0; isam < ndig; isam++)
189 for (
int isam = 0; isam < ndig; isam++)
195 for (
int isam = 0; isam < ndig; isam++)
208 attrListColl->
add(drawerIdx, ofcList);
211 attrListColl->
add(drawerIdx,
range);
220 if (coolChannelCreated[coolChannel])
continue;
224 attrListColl->
add(coolChannel, ofcList);
225 attrListColl->
add(coolChannel,
range);
254 <<
" drawerIdx " << drawerIdx
257 <<
" phase " <<
phase );
264 <<
" drawerIdx " << drawerIdx
266 <<
" phase = " <<
phase );
268 double w_a_sum = 0, w_b_sum = 0, w_c_sum = 0;
269 for (
int isam = 0; isam < ndig; isam++) {
272 <<
" w_a " <<
weights.w_a[isam]
273 <<
" w_b " <<
weights.w_b[isam]
274 <<
" w_c " <<
weights.w_c[isam]
279 <<
" w_a " <<
weights.w_a[isam]
280 <<
" w_b " <<
weights.w_b[isam]
299 if (
m_of2)
ATH_MSG_DEBUG(
" *** SUM: a,b,c " << w_a_sum <<
" " << w_b_sum <<
" " << w_c_sum );
305 attrListColl->
add(drawerIdx, ofcList);
308 attrListColl->
add(drawerIdx,
range);
338 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ extraOutputDeps()
const DataObjIDColl & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
57 return Algorithm::extraOutputDeps();
◆ finalize()
StatusCode TileOFC2DBAlg::finalize |
( |
| ) |
|
◆ initialize()
StatusCode TileOFC2DBAlg::initialize |
( |
| ) |
|
Definition at line 48 of file TileOFC2DBAlg.cxx.
64 std::map<std::string, unsigned int> roses = { {
"AUX", 0}, {
"LBA", 1}, {
"LBC", 2}, {
"EBA", 3}, {
"EBC", 4} };
66 msg(MSG::INFO) <<
"OFC will be stored in DB for the following modules:";
75 return StatusCode::SUCCESS;
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ printCondObjects()
StatusCode TileOFC2DBAlg::printCondObjects |
( |
| ) |
|
|
private |
Definition at line 388 of file TileOFC2DBAlg.cxx.
393 for (std::set<std::string>::const_iterator iFolder =
m_folders.begin();
399 std::string blobName(
"TileCalibBlob");
400 if (iFolder->find(
"/TILE/ONL01/FILTER") != std::string::npos) {
410 ATH_MSG_ERROR(
"Has not retrieved AttributeListCollection (ptr is 0) from " << *iFolder );
411 return StatusCode::FAILURE;
415 std::string generalComment(
"");
417 if (iComment != attrListColl->end()) {
418 const coral::Blob&
blob = (iComment->second)[blobName].data<coral::Blob>();
420 generalComment =
cmt->getFullComment();
427 for (; iColl != last; ++iColl) {
430 if (iColl == iComment)
continue;
433 const coral::Blob&
blob = (iColl->second)[blobName].data<coral::Blob>();
440 std::ostringstream attrStr1;
441 (*iColl).second.toOutputStream(attrStr1);
442 ATH_MSG_DEBUG(
"ChanNum " << (*iColl).first <<
" Attribute list " << attrStr1.str() );
447 if (iovIt != attrListColl->iov_end()) {
449 if (
range.start().isTimestamp()) {
451 <<
" since " <<
range.start().timestamp()
452 <<
" till " <<
range.stop().timestamp() );
456 <<
" since " <<
range.start().run() <<
" " <<
range.start().event()
457 <<
" till " <<
range.stop().run() <<
" " <<
range.stop().event() );
474 return StatusCode::SUCCESS;
◆ registerCondObjects()
StatusCode TileOFC2DBAlg::registerCondObjects |
( |
| ) |
|
|
private |
Definition at line 358 of file TileOFC2DBAlg.cxx.
362 for (std::set<std::string>::const_iterator iFolder =
m_folders.begin();
368 if (
nullptr == attrListColl) {
369 ATH_MSG_ERROR(
"Has not retrieved AttributeListCollection (ptr is 0) from " << *iFolder );
370 return (StatusCode::FAILURE);
372 ATH_MSG_DEBUG(
"Retrieved AttributeListCollection from " << *iFolder );
376 std::string
tag =
"";
383 return StatusCode::SUCCESS;
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_creatAllModules
bool TileOFC2DBAlg::m_creatAllModules |
|
private |
◆ m_detStore
◆ m_drawerIdxs
std::vector<unsigned int> TileOFC2DBAlg::m_drawerIdxs |
|
private |
◆ m_eventInfoKey
Initial value:{this,
"EventInfo", "EventInfo", "EventInfo key"}
Definition at line 59 of file TileOFC2DBAlg.h.
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_fixedPhases
bool TileOFC2DBAlg::m_fixedPhases |
|
private |
◆ m_folders
std::set<std::string> TileOFC2DBAlg::m_folders |
|
private |
◆ m_lbnIOVSince
UnsignedIntegerProperty TileOFC2DBAlg::m_lbnIOVSince |
|
private |
◆ m_lbnIOVUntil
UnsignedIntegerProperty TileOFC2DBAlg::m_lbnIOVUntil |
|
private |
◆ m_maxChan
UnsignedIntegerProperty TileOFC2DBAlg::m_maxChan |
|
private |
◆ m_modules
std::vector<std::string> TileOFC2DBAlg::m_modules |
|
private |
◆ m_nFixedPhases
int TileOFC2DBAlg::m_nFixedPhases |
|
private |
◆ m_of2
bool TileOFC2DBAlg::m_of2 |
|
private |
◆ m_phaseStep
double TileOFC2DBAlg::m_phaseStep |
|
private |
◆ m_regSvc
◆ m_runIOVSince
UnsignedIntegerProperty TileOFC2DBAlg::m_runIOVSince |
|
private |
◆ m_runIOVUntil
UnsignedIntegerProperty TileOFC2DBAlg::m_runIOVUntil |
|
private |
◆ m_runType
std::string TileOFC2DBAlg::m_runType |
|
private |
◆ m_tileCondToolOfc
Initial value:{this,
"TileCondToolOfc", "TileCondToolOfc", "Tile OFC tool"}
Definition at line 76 of file TileOFC2DBAlg.h.
◆ m_tileToolTiming
Initial value:{this,
"TileCondToolTiming", "TileCondToolTiming", "Tile timing tool"}
Definition at line 74 of file TileOFC2DBAlg.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
UnsignedIntegerProperty m_runIOVSince
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Validity Range object. Holds two IOVTimes (start and stop)
static unsigned int getMaxDrawer(unsigned int ros)
Returns the maximal channel number for a given drawer.
static constexpr uint32_t MAXRUN
StatusCode printCondObjects()
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
static const unsigned int MAX_DRAWERIDX
Maximal drawer index
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool msgLvl(const MSG::Level lvl) const
This class is a collection of AttributeLists where each one is associated with a channel number....
UnsignedIntegerProperty m_lbnIOVUntil
ChanIOVMap::const_iterator iov_const_iterator
UnsignedIntegerProperty m_lbnIOVSince
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
static constexpr uint32_t MINRUN
Basic time unit for IOVSvc. Hold time as a combination of run and event numbers.
UnsignedIntegerProperty m_runIOVUntil
virtual StatusCode sysInitialize() override
Override sysInitialize.
std::vector< unsigned int > m_drawerIdxs
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
ToolHandle< ITileCondToolOfc > m_tileCondToolOfc
::StatusCode StatusCode
StatusCode definition for legacy code.
#define CHECK(...)
Evaluate an expression and check for errors.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode registerCondObjects()
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
static const unsigned int MAX_ROS
Number of ROSs
virtual void renounce()=0
static constexpr uint32_t MAXEVENT
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
ServiceHandle< IIOVRegistrationSvc > m_regSvc
std::vector< std::string > m_modules
UnsignedIntegerProperty m_maxChan
static unsigned int getCommentChannel()
Returns the COOL channel number for the comment channel.
static constexpr uint32_t MINEVENT
DataObjIDColl m_extendedExtraObjects
static TileCalibDrawerOfc * getInstance(coral::Blob &blob, uint16_t objVersion, uint32_t nSamples, int32_t nPhases, uint16_t nChans, uint16_t nGains, const std::string &author="", const std::string &comment="", uint64_t timeStamp=0)
Returns a pointer to a non-const TileCalibDrawerOfc.
std::string getenv(const std::string &variableName)
get an environment variable
ToolHandle< TileCondToolTiming > m_tileToolTiming
#define ATH_MSG_WARNING(x)
ChanAttrListMap::const_iterator const_iterator
static const TileCalibDrawerCmt * getInstance(const coral::Blob &blob)
Returns a pointer to a const TileCalibDrawerCmt.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
std::set< std::string > m_folders
AthAlgorithm()
Default constructor:
Class to store comments in BLOB without any data.
static unsigned int getDrawerIdx(unsigned int ros, unsigned int drawer)
Returns a drawer hash.
static const unsigned int MAX_CHAN
Number of channels in drawer.
bool add(ChanNum chanNum, const AttributeList &attributeList)
Adding in chan/attrList pairs.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
static const unsigned int MAX_GAIN
Number of gains per channel