|
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 33 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);
◆ 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.
◆ 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.
◆ 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 86 of file TileOFC2DBAlg.cxx.
87 const EventContext &ctx = Gaudi::Hive::currentContext();
94 << eventInfo->runNumber() <<
","
95 << eventInfo->eventNumber() <<
":"
96 << eventInfo->timeStamp() <<
"]" );
100 if (1 != eventInfo->eventNumber()) {
101 ATH_MSG_DEBUG(
"Event NOT selected for creating conditions objects " );
102 return StatusCode::SUCCESS;
114 std::string
folder(
"/TILE/ONL01/FILTER/");
120 coral::AttributeListSpecification*
spec =
new coral::AttributeListSpecification();
121 spec->extend(
"TileCalibBlobOfc",
"blob");
126 float zeroPhase(0.0);
137 std::vector<float>
phases;
150 int nPhases =
phases.size();
154 coolChannelCreated[drawerIdx] =
true;
164 for (
int isam = 0; isam < ndig; isam++) {
179 <<
" drawerIdx " << drawerIdx
184 for (
int isam = 0; isam < ndig; ++isam)
189 for (
int isam = 0; isam < ndig; isam++)
195 for (
int isam = 0; isam < ndig; isam++)
201 for (
int isam = 0; isam < ndig; isam++)
214 attrListColl->
add(drawerIdx, ofcList);
217 attrListColl->
add(drawerIdx,
range);
226 if (coolChannelCreated[coolChannel])
continue;
230 attrListColl->
add(coolChannel, ofcList);
231 attrListColl->
add(coolChannel,
range);
260 <<
" drawerIdx " << drawerIdx
263 <<
" phase " <<
phase );
270 <<
" drawerIdx " << drawerIdx
272 <<
" phase = " <<
phase );
274 double w_a_sum = 0, w_b_sum = 0, w_c_sum = 0;
275 for (
int isam = 0; isam < ndig; isam++) {
278 <<
" w_a " << weights.
w_a[isam]
279 <<
" w_b " << weights.
w_b[isam]
280 <<
" w_c " << weights.
w_c[isam]
281 <<
" g " << weights.
g[isam] );
285 <<
" w_a " << weights.
w_a[isam]
286 <<
" w_b " << weights.
w_b[isam]
287 <<
" g " << weights.
g[isam] );
291 w_a_sum += weights.
w_a[isam];
292 w_b_sum += weights.
w_b[isam];
293 w_c_sum += weights.
w_c[isam];
305 if (
m_of2)
ATH_MSG_DEBUG(
" *** SUM: a,b,c " << w_a_sum <<
" " << w_b_sum <<
" " << w_c_sum );
311 attrListColl->
add(drawerIdx, ofcList);
314 attrListColl->
add(drawerIdx,
range);
344 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 51 of file TileOFC2DBAlg.cxx.
70 std::map<std::string, unsigned int> roses = { {
"AUX", 0}, {
"LBA", 1}, {
"LBC", 2}, {
"EBA", 3}, {
"EBC", 4} };
72 msg(MSG::INFO) <<
"OFC will be stored in DB for the following modules:";
81 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 394 of file TileOFC2DBAlg.cxx.
399 for (std::set<std::string>::const_iterator iFolder =
m_folders.begin();
405 std::string blobName(
"TileCalibBlob");
406 if (iFolder->find(
"/TILE/ONL01/FILTER") != std::string::npos) {
416 ATH_MSG_ERROR(
"Has not retrieved AttributeListCollection (ptr is 0) from " << *iFolder );
417 return StatusCode::FAILURE;
421 std::string generalComment(
"");
423 if (iComment != attrListColl->end()) {
424 const coral::Blob&
blob = (iComment->second)[blobName].data<coral::Blob>();
426 generalComment =
cmt->getFullComment();
433 for (; iColl != last; ++iColl) {
436 if (iColl == iComment)
continue;
439 const coral::Blob&
blob = (iColl->second)[blobName].data<coral::Blob>();
446 std::ostringstream attrStr1;
447 (*iColl).second.toOutputStream(attrStr1);
448 ATH_MSG_DEBUG(
"ChanNum " << (*iColl).first <<
" Attribute list " << attrStr1.str() );
453 if (iovIt != attrListColl->iov_end()) {
455 if (
range.start().isTimestamp()) {
457 <<
" since " <<
range.start().timestamp()
458 <<
" till " <<
range.stop().timestamp() );
462 <<
" since " <<
range.start().run() <<
" " <<
range.start().event()
463 <<
" till " <<
range.stop().run() <<
" " <<
range.stop().event() );
480 return StatusCode::SUCCESS;
◆ registerCondObjects()
StatusCode TileOFC2DBAlg::registerCondObjects |
( |
| ) |
|
|
private |
Definition at line 364 of file TileOFC2DBAlg.cxx.
368 for (std::set<std::string>::const_iterator iFolder =
m_folders.begin();
374 if (
nullptr == attrListColl) {
375 ATH_MSG_ERROR(
"Has not retrieved AttributeListCollection (ptr is 0) from " << *iFolder );
376 return (StatusCode::FAILURE);
378 ATH_MSG_DEBUG(
"Retrieved AttributeListCollection from " << *iFolder );
382 std::string
tag =
"";
389 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 49 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 66 of file TileOFC2DBAlg.h.
◆ m_tileToolTiming
Initial value:{this,
"TileCondToolTiming", "TileCondToolTiming", "Tile timing tool"}
Definition at line 64 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....
virtual StatusCode registerIOV(const std::string &typeName) const =0
Register IOV DB for an object given its typeName - run/LB numbers interval or times interval and tag ...
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
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>
IIOVRegistrationSvc * m_regSvc
static const unsigned int MAX_GAIN
Number of gains per channel