|
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...
|
|
virtual StatusCode | queryInterface (const InterfaceID &riid, void **ppvIf) |
| access to interfaceID 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...
|
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
interface to TRT straw alignment constants
Definition at line 33 of file TRT_StrawAlignDbSvc.h.
◆ StrawDxContainer
◆ 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()
◆ getDx1()
◆ getDx2()
◆ getDxContainer()
◆ 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;
◆ interfaceID()
const InterfaceID & ITRT_StrawAlignDbSvc::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
◆ IOVCallBack()
IOV call back for dx objects. normally this doesn't do anything.
Implements ITRT_StrawAlignDbSvc.
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;
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ queryInterface()
StatusCode TRT_StrawAlignDbSvc::queryInterface |
( |
const InterfaceID & |
riid, |
|
|
void ** |
ppvIf |
|
) |
| |
|
inlinevirtual |
access to interfaceID
Definition at line 175 of file TRT_StrawAlignDbSvc.h.
180 return StatusCode::SUCCESS;
182 return AthService::queryInterface( riid, ppvIf );
◆ 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 |
|
virtual |
◆ setDx() [1/2]
void TRT_StrawAlignDbSvc::setDx |
( |
const Identifier & |
id, |
|
|
float |
dx1, |
|
|
float |
dx2, |
|
|
float |
dxerr |
|
) |
| |
|
inlinevirtual |
◆ setDx() [2/2]
◆ streamOutObjects()
StatusCode TRT_StrawAlignDbSvc::streamOutObjects |
( |
| ) |
const |
|
virtual |
◆ trtcondid()
◆ writeTextFile()
StatusCode TRT_StrawAlignDbSvc::writeTextFile |
( |
const std::string & |
file | ) |
const |
|
virtual |
write calibration constants to flat text file
Implements ITRT_StrawAlignDbSvc.
Definition at line 89 of file TRT_StrawAlignDbSvc.cxx.
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.
static const InterfaceID & interfaceID()
bool m_par_forcecallback
input text file
const_pointer_type cptr() const
safer explicit ptr accessor
TRTCond::StrawDxContainer StrawDxContainer
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 ...
std::vector< std::pair< ExpandedIdentifier, const StrawDx * > > FlatContainer
fill vector with all entries in the container. needed to dump to Peter's flat file format
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.
This is an interface to a service used to register conditions objects in the Interval of Validity (IO...
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
float getDx1(const ExpandedIdentifier &id) const
access to unpacked dx
int phi_module(const Identifier &id) const
The Detector Manager for all TRT Detector elements, it acts as the interface to the detector elements...
static const char * classname()
classname used to talk to iovservice
#define ATH_MSG_WARNING(x)
StrawDxContainer * getDxContainer() const
access to containers
float getDxErr(const ExpandedIdentifier &id) const
access to unpacked dx error
const TRT_ID * m_trtid
force callback to manager
void setDx(const ExpandedIdentifier &id, float dx1, float dx2, float dxerr)
set dx
Identifier for TRT detector elements in the conditions code.
float getDx2(const ExpandedIdentifier &id) const
std::string m_par_dxcontainerkey
void crunch()
reduce the footprint as much as possible by removing the extra space allocated by the vectors