12#include "GaudiKernel/SmartDataPtr.h"
106 if ( (
evtStore().retrieve().isFailure()) ||
107 (
detStore().retrieve().isFailure())) {
109 return StatusCode::FAILURE;
124 else msg() <<
"Alignment constants will be initialised from text file" <<
m_par_rfile <<
endmsg;
129 msg() <<
"ID Alignment database structures will be written on run "
137 msg() <<
"IOV writing will be suppressed - only output stream" <<
endmsg;
140 return StatusCode::SUCCESS;
149 "Creating null alignment database from geometry information in GeoModel");
178 return StatusCode::SUCCESS;
185 return StatusCode::SUCCESS;
204 "::dispFile() : Initialise AlignableTransforms from parameters file "
206 std::ifstream infile;
211 int level,isyst,dettype,bec,layer,ring,sector;
213 while (infile >> level >> isyst >> dettype >> bec >> layer >> ring >>
217 ATH_MSG_DEBUG(
"Add displacement level " << level <<
" syst " <<
218 isyst <<
" to [det,bec,layer] [" << dettype <<
"," << bec <<
"," <<
219 layer <<
"] {rphi,r,z} {" << rpd <<
"," << rd <<
"," << zd <<
"}" );
220 p_iddbtool->dispGroup(dettype,bec,layer,ring,sector,
224 " displacement recipe lines" );
234 if (StatusCode::SUCCESS!=
p_iddbtool->outputObjs())
235 msg(MSG::ERROR) <<
"Write of AlignableTransforms fails" <<
endmsg;
249 ATH_MSG_DEBUG(
"Initialise TOPTRANS from parameters file: " <<
252 std::ifstream infile;
256 std::string cline,key;
258 while (infile >> key >> xd >> yd >> zd >>
phi >>
theta >> psi) {
260 ATH_MSG_DEBUG(
"Add transform name: " << key <<
" x/y/z " << xd <<
"," << yd <<
261 "," << zd <<
" phi/theta/psi " <<
phi <<
"," <<
theta <<
"," << psi );
262 HepGeom::Transform3D newtrans=HepGeom::Transform3D(CLHEP::HepRotation(
phi,
theta,psi),
263 CLHEP::Hep3Vector(xd,yd,zd));
266 ATH_MSG_DEBUG(
"Read " << nline <<
" lines from recipe file" );
268 if (StatusCode::SUCCESS==
detStore()->record(dkp,
"/GLOBAL/GEOM/TOPTRANS")) {
276 ATH_MSG_DEBUG(
"Convert Pixel/SCT alignment from old to new format");
285 msg(MSG::ERROR) <<
"Write of AlignableTransform fails" <<
endmsg;
Scalar phi() const
phi method
Scalar theta() const
theta method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
This is an interface to a tool used to register conditions objects in the Interval of Validity (IOV) ...
Basic time unit for IOVSvc.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
ServiceHandle< StoreGateSvc > & evtStore()
const ServiceHandle< StoreGateSvc > & detStore() const
bool msgLvl(const MSG::Level lvl) const
Class to hold set of HepGeom::Transform3D keyed by string value for storage in the conditions DB typi...
void setTransform(const std::string &key, const HepGeom::Transform3D &trans)
Basic time unit for IOVSvc.
StatusCode initialize(void)
ToolHandle< IInDetAlignDBTool > p_iddbtool
std::string m_par_dispfile
StatusCode finalize(void)
const xAOD::EventInfo * p_eventinfo
std::string m_par_dbtoolinst
InDetAlignWrt(const std::string &name, ISvcLocator *pSvcLocator)
std::string m_par_topname
ToolHandle< IInDetAlignDBTool > p_migratetool
bool contains(const std::string &s, const std::string ®x)
does a string contain the substring