ATLAS Offline Software
|
#include <TRT_AlignDbSvc.h>
Public Member Functions | |
TRT_AlignDbSvc (const std::string &name, ISvcLocator *pSvcLocator) | |
constructor More... | |
virtual | ~TRT_AlignDbSvc () |
destructor More... | |
virtual StatusCode | initialize () |
tool initialize More... | |
virtual StatusCode | finalize () |
tool finalize More... | |
StatusCode | IOVCallBack (IOVSVC_CALLBACK_ARGS) |
Call back function for alignment folders. More... | |
StatusCode | writeAlignTextFile (const std::string &file) const |
write AlignableTransforms to flat text file More... | |
StatusCode | writeStrawAlignTextFile (const std::string &file) const |
StatusCode | writeGlobalFolderFile (const std::string &file) const |
StatusCode | readAlignTextFile (const std::string &file) |
read AlignableTransforms from text file into TDS More... | |
StatusCode | streamOutAlignObjects () const |
write the alignment objects to output More... | |
StatusCode | registerAlignObjects (const std::string &tag, int run1, int event1, int run2, int event2) const |
register alignment objects with the IoV service More... | |
StatusCode | setAlignTransform (Identifier ident, Amg::Transform3D trans, unsigned int level) |
set AlignableTransform for an identifier More... | |
StatusCode | tweakAlignTransform (Identifier ident, Amg::Transform3D trans, unsigned int level) |
tweak AlignableTransform for an identifier More... | |
const Amg::Transform3D | getAlignmentTransform (const Identifier &ident, unsigned int level) const |
get AlignableTransform for an identifier More... | |
const Amg::Transform3D * | getAlignmentTransformPtr (const Identifier &ident, unsigned int level) const |
get Level L2 Transform for an identifier More... | |
StatusCode | tweakGlobalFolder (Identifier ident, const Amg::Transform3D &trans) |
tweak L1 DB for global folders for an identifier More... | |
Private Member Functions | |
StatusCode | setAlignTransformL1 (Identifier ident, const Amg::Transform3D &trans) |
set Level 1 AlignableTransform for an identifier More... | |
StatusCode | setAlignTransformL2 (Identifier ident, Amg::Transform3D trans) |
set Level 2 AlignableTransform for an identifier More... | |
StatusCode | setAlignTransformL3 (Identifier ident, Amg::Transform3D trans) |
set Level 3 AlignableTransform for an identifier More... | |
const Amg::Transform3D | getAlignmentTransformL1 (Identifier const &ident) const |
get Level 1 AlignableTransform for an identifier More... | |
const Amg::Transform3D * | getAlignmentTransformL1Ptr (Identifier const &ident) const |
get Level L1 Transform for an identifier More... | |
const Amg::Transform3D | getAlignmentTransformL2 (Identifier const &ident) const |
get Level 2 AlignableTransform for an identifier More... | |
const Amg::Transform3D * | getAlignmentTransformL2Ptr (Identifier const &ident) const |
get Level L2 Transform for an identifier More... | |
StatusCode | tweakAlignTransformL1 (Identifier ident, const Amg::Transform3D &trans) |
tweak Level 1 AlignableTransform for an identifier More... | |
StatusCode | tweakAlignTransformL2 (Identifier ident, const Amg::Transform3D &trans) |
tweak Level 2 AlignableTransform for an identifier More... | |
StatusCode | tweakAlignTransformL3 (Identifier ident, Amg::Transform3D trans) |
tweak Level 3 AlignableTransform for an identifier More... | |
AlignableTransform * | getTransPtr (const std::string &key) const |
get AlignableTransform pointer for an object key More... | |
const AlignableTransform * | cgetTransPtr (const std::string &key) const |
get const AlignableTransform pointer for an object key More... | |
bool | isOldKey (const std::string &input) const |
Returns the true if the input key is from the old endcap scheme. More... | |
void | printCondObjects () const |
Output the conditions objects currently in memory. More... | |
StatusCode | createAlignObjects () const |
Create an empty set of AlignableTransforms for the GeoModel setup. More... | |
StatusCode | createAlignObjectsWhichDoNotAlreadyExist () |
Create an empty set of AlignableTransforms for the transforms which are not created by XXXXXXX from the conddb More... | |
const AlignableTransformContainer * | getContainer () const |
Return the container. More... | |
std::string | findkey (const Identifier &ident, const std::string &type) const |
Return the object key for a given identifier and data type. More... | |
Static Private Member Functions | |
static int | getRingForStrawLayer (int strawlayer) |
Returns the ring for a given strawLayer. More... | |
static std::string | prefixtag (const std::string &key) |
Return the prefix tag for a given calibration folder. More... | |
static std::string | intToString (int input) |
Convert from an int to a string. More... | |
static void | printTransform (const std::string &thisName, const Amg::Transform3D &transform) |
Output the transform to the cout, for debugging. More... | |
Private Attributes | |
ServiceHandle< StoreGateSvc > | m_detStore |
ServiceHandle< ITRT_StrawAlignDbSvc > | m_trtStrawAlignDbSvc |
const TRT_ID * | m_trtid |
trt id helper More... | |
const InDetDD::TRT_DetectorManager * | m_trtman |
detector manager More... | |
std::string | m_alignroot |
root alignment folder More... | |
std::string | m_alignString |
alignment string searched for More... | |
std::string | m_par_alitextfile |
input text file More... | |
std::vector< std::string > | m_alignobjs |
folder names More... | |
std::vector< int > | m_alignchans |
channels More... | |
const DataHandle< AlignableTransformContainer > | m_aligncontainerhandle |
ToolHandle< IAthenaOutputStreamTool > | m_streamer |
OutputStreamTool. More... | |
std::vector< Amg::Transform3D * > | m_amgTransformCache |
std::string | m_alignDBprefix |
bool | m_dynamicDB |
bool | m_forceUserDBConfig |
Service to manage TRT alignment data
Definition at line 45 of file TRT_AlignDbSvc.h.
TRT_AlignDbSvc::TRT_AlignDbSvc | ( | const std::string & | name, |
ISvcLocator * | pSvcLocator | ||
) |
constructor
Definition at line 37 of file TRT_AlignDbSvc.cxx.
|
virtual |
|
private |
get const AlignableTransform pointer for an object key
Definition at line 1403 of file TRT_AlignDbSvc.cxx.
|
private |
Create an empty set of AlignableTransforms for the GeoModel setup.
create an empty set of AlignableTransforms for the GeoModel setup
Create empty alignment objects. Use when constants are read in from textfiles. Make sure that the objects are not read in by IOV before
check if collection already exists
Create the appropriate (empty) AlignableTransforms for this geometry
record it
Definition at line 1305 of file TRT_AlignDbSvc.cxx.
|
private |
Create an empty set of AlignableTransforms for the transforms which are not created by XXXXXXX from the conddb
create an empty set of AlignableTransforms for the transforms which are not created by XXXXXXX from the conddb
Create empty alignment objects for the object which do do already exist
check if collection already exists
Get the alignabletransformcontainer
Need to cost cast b/c were are chaning it, Ugly but so be it.
Only create the new keys that dont exist
If the pointer doesnt exist
Definition at line 1338 of file TRT_AlignDbSvc.cxx.
|
virtual |
tool finalize
Definition at line 192 of file TRT_AlignDbSvc.cxx.
|
private |
Return the object key for a given identifier and data type.
return the object key for a given identifier and data type
given a TRT identifier and a type ("RT", "T0", "DF" or "AL") return the key for the associated ArrayStore or AlignableTransForm in TDS
The keys in the old (Lisbon) scheme coincide with TDS folder names:
/Indet/Align/TRTB0 AlignableTransform for barrel layer 0. Etc /Indet/Align/TRT_DF_B0 Wire shift FloatArrayStore for barrel layer 0. Etc /Indet/Calib/TRT_T0_B0 T0 FloatArrayStore for barrel layer 0. Etc /Indet/Calib/TRT_RT_B0 R(t) FloatArrayStore for barrel layer 0. Etc
In the COOL scheme there is only one folder for AlignableTransforms and one for FloatArrayStores (/TRT/Align and /TRT/Calib). These contains collections of objects with the following keys:
/TRT/Align/L2A AlignableTransform for Endcap A. /TRT/Align/AX DEPRECATED! Old AlignableTransform for Endcap A wheel X where X is [0-13]. /TRT/Align/B0 AlignableTransform for barrel layer 0. /TRT/Align/B1 AlignableTransform for barrel layer 1. /TRT/Align/B2 AlignableTransform for Endcap C. /TRT/Align/L2C AlignableTransform for barrel layer 0. /TRT/Align/CX DEPRECATED! Old AlignableTransform for Endcap C wheel X where X is [0-13]. /TRT/Calib/DF_B0 Wire shift FloatArrayStore for barrel layer 0. Etc /TRT/Calib/T0_B0 T0 FloatArrayStore for barrel layer 0. Etc /TRT/Calib/RT_B0 R(t) FloatArrayStore for barrel layer 0. Etc
So the result is eg /Indet/Calib/TRT_T0_A6 in the Lisbon scheme and /TRT/Calib/T0_A6 in the COOL scheme
Definition at line 1169 of file TRT_AlignDbSvc.cxx.
const Amg::Transform3D TRT_AlignDbSvc::getAlignmentTransform | ( | const Identifier & | ident, |
unsigned int | level | ||
) | const |
get AlignableTransform for an identifier
get Level L2 Transform for an identifier
Definition at line 559 of file TRT_AlignDbSvc.cxx.
|
private |
|
private |
get Level L1 Transform for an identifier
Definition at line 633 of file TRT_AlignDbSvc.cxx.
|
private |
|
private |
get Level L2 Transform for an identifier
Definition at line 656 of file TRT_AlignDbSvc.cxx.
const Amg::Transform3D * TRT_AlignDbSvc::getAlignmentTransformPtr | ( | const Identifier & | ident, |
unsigned int | level | ||
) | const |
|
private |
|
staticprivate |
Returns the ring for a given strawLayer.
Definition at line 1433 of file TRT_AlignDbSvc.cxx.
|
private |
get AlignableTransform pointer for an object key
Definition at line 1397 of file TRT_AlignDbSvc.cxx.
|
virtual |
tool initialize
Keeping Back compatibility with old db scheme This is needed when reading in an textFile with the old endcap Schema and the alignment folder in the db has been blocked.
If the folder exists, register a callback, we read from the text file if it exists in the call back If the folder does not yet exist, create and record it.
This is the folder given by the conditions db.(Eg: from the global tag) One can block this via: conddb.blockFolder("/TRT/Align") in the jobOptions
This is the text files whence the constants.
register the callback
Reminder that the constants will be read from text file.
create alignment objects
Read the newly created objects
Definition at line 68 of file TRT_AlignDbSvc.cxx.
|
staticprivate |
Convert from an int to a string.
Definition at line 1463 of file TRT_AlignDbSvc.cxx.
StatusCode TRT_AlignDbSvc::IOVCallBack | ( | IOVSVC_CALLBACK_ARGS | ) |
Call back function for alignment folders.
By the time this gets called the alignment transforms have been created. Either by the create method in initialize, or from the align folder content from the cond db. (Its not clear to johnda where the alignable tracnsforms get created from the conddb)
If we read the constants from the db, there is a chance that they only contained the alignable transforms for the old endcap keys. In which case we need to create the transforms for the new endcap keys
Print the keys were setting
print out the objects we have
Definition at line 202 of file TRT_AlignDbSvc.cxx.
|
private |
Returns the true if the input key is from the old endcap scheme.
Definition at line 1440 of file TRT_AlignDbSvc.cxx.
|
staticprivate |
Return the prefix tag for a given calibration folder.
return the prefix tag for a given calibration folder
given a TRT calibration folder key, return the prefix tag for the associated (Float)ArrayStore or AlignableTransform.
This is used in version tags if big container is NOT used.
Prefixes are TrtDfB0_ Wire shift FloatArrayStore for barrel layer 0. Etc TrtT0B0_ T0 FloatArrayStore for barrel layer 0. Etc TrtRtB0_ R(t) FloatArrayStore for barrel layer 0. Etc TrtAlB0_ AlignableTransform for barrel layer 0. Etc TrtAlId_ AlignableTransform for TRT.
Definition at line 1240 of file TRT_AlignDbSvc.cxx.
|
private |
Output the conditions objects currently in memory.
Definition at line 1375 of file TRT_AlignDbSvc.cxx.
|
staticprivate |
Output the transform to the cout, for debugging.
Out put the transfor to the cout, for debugging.
Definition at line 1470 of file TRT_AlignDbSvc.cxx.
StatusCode TRT_AlignDbSvc::readAlignTextFile | ( | const std::string & | file | ) |
read AlignableTransforms from text file into TDS
first clean the alignment container: loop over all AlignableTransforms and empty them.
force a call back
Definition at line 370 of file TRT_AlignDbSvc.cxx.
StatusCode TRT_AlignDbSvc::registerAlignObjects | ( | const std::string & | tag, |
int | run1, | ||
int | event1, | ||
int | run2, | ||
int | event2 | ||
) | const |
register alignment objects with the IoV service
Definition at line 536 of file TRT_AlignDbSvc.cxx.
StatusCode TRT_AlignDbSvc::setAlignTransform | ( | Identifier | ident, |
Amg::Transform3D | trans, | ||
unsigned int | level | ||
) |
|
private |
set Level 1 AlignableTransform for an identifier
AlignableTransform for the subdetector containing ident or add a new one.
Definition at line 722 of file TRT_AlignDbSvc.cxx.
|
private |
set Level 2 AlignableTransform for an identifier
AlignableTransform for the module containing ident or add a new one.
Definition at line 771 of file TRT_AlignDbSvc.cxx.
|
private |
StatusCode TRT_AlignDbSvc::streamOutAlignObjects | ( | ) | const |
StatusCode TRT_AlignDbSvc::tweakAlignTransform | ( | Identifier | ident, |
Amg::Transform3D | trans, | ||
unsigned int | level | ||
) |
|
private |
tweak Level 1 AlignableTransform for an identifier
multiply level 1 AlignableTransform for the module containing ident by an additional transform.
does a folder exist corresponding to this identifier?
OK the key exists make sure the identifier is a "subdetector identifier"
multiply the additional transformation
Definition at line 951 of file TRT_AlignDbSvc.cxx.
|
private |
tweak Level 2 AlignableTransform for an identifier
Definition at line 1000 of file TRT_AlignDbSvc.cxx.
|
private |
tweak Level 3 AlignableTransform for an identifier
Definition at line 1039 of file TRT_AlignDbSvc.cxx.
StatusCode TRT_AlignDbSvc::tweakGlobalFolder | ( | Identifier | ident, |
const Amg::Transform3D & | trans | ||
) |
tweak L1 DB for global folders for an identifier
Definition at line 1528 of file TRT_AlignDbSvc.cxx.
StatusCode TRT_AlignDbSvc::writeAlignTextFile | ( | const std::string & | file | ) | const |
write AlignableTransforms to flat text file
Loop over created AlignableTransforms
Only write out new keys unless explicitly ask for old keys
The object must exist in detector store
Keep track of total number of transforms
get the relavent identifing info
Get the translation and rotation
Definition at line 236 of file TRT_AlignDbSvc.cxx.
StatusCode TRT_AlignDbSvc::writeGlobalFolderFile | ( | const std::string & | file | ) | const |
Definition at line 1479 of file TRT_AlignDbSvc.cxx.
StatusCode TRT_AlignDbSvc::writeStrawAlignTextFile | ( | const std::string & | file | ) | const |
Definition at line 358 of file TRT_AlignDbSvc.cxx.
|
private |
channels
Definition at line 166 of file TRT_AlignDbSvc.h.
|
private |
Definition at line 167 of file TRT_AlignDbSvc.h.
|
private |
Definition at line 171 of file TRT_AlignDbSvc.h.
|
private |
folder names
Definition at line 165 of file TRT_AlignDbSvc.h.
|
private |
root alignment folder
Definition at line 162 of file TRT_AlignDbSvc.h.
|
private |
alignment string searched for
Definition at line 163 of file TRT_AlignDbSvc.h.
|
mutableprivate |
Definition at line 169 of file TRT_AlignDbSvc.h.
|
private |
Definition at line 158 of file TRT_AlignDbSvc.h.
|
private |
Definition at line 173 of file TRT_AlignDbSvc.h.
|
private |
Definition at line 174 of file TRT_AlignDbSvc.h.
|
private |
input text file
Definition at line 164 of file TRT_AlignDbSvc.h.
|
private |
OutputStreamTool.
Definition at line 168 of file TRT_AlignDbSvc.h.
trt id helper
Definition at line 160 of file TRT_AlignDbSvc.h.
|
private |
detector manager
Definition at line 161 of file TRT_AlignDbSvc.h.
|
private |
Definition at line 159 of file TRT_AlignDbSvc.h.