|
ATLAS Offline Software
|
#include <TRT_StrawAlignDbSvc.h>
|
| TRT_StrawAlignDbSvc (const std::string &name, ISvcLocator *pSvcLocator) |
| constructor More...
|
|
virtual | ~TRT_StrawAlignDbSvc () |
| destructor More...
|
|
virtual StatusCode | initialize () |
| tool initialize More...
|
|
virtual StatusCode | finalize () |
| tool finalize More...
|
|
TRTCond::ExpandedIdentifier | trtcondid (const Identifier &id, int level=TRTCond::ExpandedIdentifier::STRAW) const |
| create an TRTCond::ExpandedIdentifier from a TRTID identifier More...
|
|
void | setDx (const TRTCond::ExpandedIdentifier &id, float dx1, float dx2, float dxerr) |
| set endpoints for a TRTCond::ExpandedIdentifier More...
|
|
StatusCode | writeTextFile (const std::string &file) const |
| write calibration constants to flat text file More...
|
|
virtual StatusCode | readTextFile (const std::string &file) |
| read calibration from text file into TDS More...
|
|
StatusCode | readTextFile (StrawDxContainer *dxcontainer, const std::string &file) |
|
StatusCode | streamOutObjects () const |
| write the calibration objects to output, after cleaning More...
|
|
StatusCode | registerObjects (std::string tag, int run1, int event1, int run2, int event2) const |
| register calibration objects with the IoV service More...
|
|
StrawDxContainer * | getDxContainer () const |
| access to containers More...
|
|
const StrawDxContainer * | getConstDxContainer () const |
|
StatusCode | IOVCallBack (IOVSVC_CALLBACK_ARGS) |
| IOV call back for dx objects. normally this doesn't do anything. More...
|
|
float | getDx1 (const Identifier &id) const |
| get shift near electronics More...
|
|
float | getDx2 (const Identifier &id) const |
| get shift far from electronics More...
|
|
float | getDxErr (const Identifier &id) const |
| get error on shift More...
|
|
void | setDx (const Identifier &id, float dx1, float dx2, float dxerr) |
| set shifts More...
|
|
interface to TRT straw alignment constants
Definition at line 33 of file TRT_StrawAlignDbSvc.h.
◆ TRT_StrawAlignDbSvc()
TRT_StrawAlignDbSvc::TRT_StrawAlignDbSvc |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~TRT_StrawAlignDbSvc()
TRT_StrawAlignDbSvc::~TRT_StrawAlignDbSvc |
( |
| ) |
|
|
virtualdefault |
◆ finalize()
StatusCode TRT_StrawAlignDbSvc::finalize |
( |
| ) |
|
|
virtual |
◆ getConstDxContainer()
const TRT_StrawAlignDbSvc::StrawDxContainer * TRT_StrawAlignDbSvc::getConstDxContainer |
( |
| ) |
const |
|
inline |
Definition at line 118 of file TRT_StrawAlignDbSvc.h.
120 const StrawDxContainer*
rc =
nullptr;
129 return const_cast<StrawDxContainer*
>(
rc) ;
◆ getDx1()
◆ getDx2()
◆ getDxContainer()
TRT_StrawAlignDbSvc::StrawDxContainer * TRT_StrawAlignDbSvc::getDxContainer |
( |
| ) |
const |
|
inline |
◆ getDxErr()
◆ initialize()
StatusCode TRT_StrawAlignDbSvc::initialize |
( |
| ) |
|
|
virtual |
tool initialize
Definition at line 49 of file TRT_StrawAlignDbSvc.cxx.
51 ATH_MSG_INFO (
"TRT_StrawAlignDbSvc initialize method called");
59 if( dxcontainerexists ) {
68 auto dxcontainer = std::make_unique<StrawDxContainer>();
79 return StatusCode::SUCCESS;
◆ IOVCallBack()
IOV call back for dx objects. normally this doesn't do anything.
Definition at line 206 of file TRT_StrawAlignDbSvc.cxx.
208 for (std::list<std::string>::const_iterator
209 itr=
keys.begin(); itr!=
keys.end(); ++itr)
210 ATH_MSG_INFO (
" IOVCALLBACK for key " << *itr <<
" number " <<
I);
215 return StatusCode::SUCCESS;
◆ readTextFile() [1/2]
StatusCode TRT_StrawAlignDbSvc::readTextFile |
( |
const std::string & |
file | ) |
|
|
virtual |
◆ readTextFile() [2/2]
StatusCode TRT_StrawAlignDbSvc::readTextFile |
( |
StrawDxContainer * |
dxcontainer, |
|
|
const std::string & |
file |
|
) |
| |
Definition at line 130 of file TRT_StrawAlignDbSvc.cxx.
137 return StatusCode::FAILURE;
139 dxcontainer->clear() ;
144 while ((
infile >>
id >> dx1 >> dx2 >> dxerr ) ) {
145 setDx(
id,dx1,dx2,dxerr) ;
146 ATH_MSG_DEBUG (
" read from file: dx1 " << dx1 <<
" dx2 " << dx2 <<
" dxerr " << dxerr);
149 size_t dxfootprint = dxcontainer->footprint() ;
156 std::list<std::string>
keys ;
159 return StatusCode::SUCCESS ;
◆ registerObjects()
StatusCode TRT_StrawAlignDbSvc::registerObjects |
( |
std::string |
tag, |
|
|
int |
run1, |
|
|
int |
event1, |
|
|
int |
run2, |
|
|
int |
event2 |
|
) |
| const |
register calibration objects with the IoV service
Definition at line 186 of file TRT_StrawAlignDbSvc.cxx.
193 SmartIF<IIOVRegistrationSvc> regsvc{service(
"IOVRegistrationSvc")};
196 if (StatusCode::SUCCESS==regsvc->registerIOV(StrawDxContainer::classname(),
202 return( StatusCode::SUCCESS);
◆ setDx() [1/2]
void TRT_StrawAlignDbSvc::setDx |
( |
const Identifier & |
id, |
|
|
float |
dx1, |
|
|
float |
dx2, |
|
|
float |
dxerr |
|
) |
| |
|
inline |
◆ setDx() [2/2]
◆ streamOutObjects()
StatusCode TRT_StrawAlignDbSvc::streamOutObjects |
( |
| ) |
const |
write the calibration objects to output, after cleaning
Definition at line 163 of file TRT_StrawAlignDbSvc.cxx.
181 ATH_MSG_INFO (
" Streamed out and committed " << typeKeys.size() <<
" objects ");
182 return StatusCode::SUCCESS;
◆ trtcondid()
◆ writeTextFile()
StatusCode TRT_StrawAlignDbSvc::writeTextFile |
( |
const std::string & |
file | ) |
const |
write calibration constants to flat text file
Definition at line 89 of file TRT_StrawAlignDbSvc.cxx.
98 StrawDxContainer::FlatContainer packedstrawdata ;
100 dxcontainer->getall( packedstrawdata ) ;
104 << packedstrawdata.size());
106 for(
auto &
it : packedstrawdata) {
109 float dx1=dxcontainer->getDx1(calid) ;
110 float dx2=dxcontainer->getDx2(calid) ;
111 float dxerr=dxcontainer->getDxErr(calid) ;
113 << std::setprecision(5)
114 << std::setw(12) << dx1 <<
" "
115 << std::setw(12) << dx2 <<
" "
116 << std::setw(12) << dxerr << std::endl ;
119 return StatusCode::SUCCESS ;
◆ m_detStore
◆ m_dxcontainer
◆ m_par_dxcontainerkey
std::string TRT_StrawAlignDbSvc::m_par_dxcontainerkey |
|
private |
◆ m_par_forcecallback
bool TRT_StrawAlignDbSvc::m_par_forcecallback |
|
private |
◆ m_par_strawtextfile
std::string TRT_StrawAlignDbSvc::m_par_strawtextfile |
|
private |
◆ m_streamer
◆ m_trtid
◆ m_trtman
The documentation for this class was generated from the following files:
const InDetDD::TRT_DetectorManager * m_trtman
id helper
const StrawDxContainer * getConstDxContainer() const
ToolHandle< IAthenaOutputStreamTool > m_streamer
persistifiable container
void setDx(const TRTCond::ExpandedIdentifier &id, float dx1, float dx2, float dxerr)
set endpoints for a TRTCond::ExpandedIdentifier
StatusCode IOVCallBack(IOVSVC_CALLBACK_ARGS)
IOV call back for dx objects. normally this doesn't do anything.
bool m_par_forcecallback
input text file
const_pointer_type cptr() const
safer explicit ptr accessor
virtual StatusCode readTextFile(const std::string &file)
read calibration from text file into TDS
int straw(const Identifier &id) const
const DataHandle< StrawDxContainer > m_dxcontainer
detector manager
ServiceHandle< StoreGateSvc > m_detStore
bool isValid() const
RETRIEVES the DO to check it is valid and unlocked.
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
int straw_layer(const Identifier &id) const
int layer_or_wheel(const Identifier &id) const
std::string m_par_strawtextfile
folder name
TRTCond::ExpandedIdentifier trtcondid(const Identifier &id, int level=TRTCond::ExpandedIdentifier::STRAW) const
create an TRTCond::ExpandedIdentifier from a TRTID identifier
int phi_module(const Identifier &id) const
The Detector Manager for all TRT Detector elements, it acts as the interface to the detector elements...
#define ATH_MSG_WARNING(x)
StrawDxContainer * getDxContainer() const
access to containers
const TRT_ID * m_trtid
force callback to manager
Identifier for TRT detector elements in the conditions code.
std::string m_par_dxcontainerkey