10#define LAR_ALIGN "/LAR/Align"
12using HepGeom::Translate3D;
13using HepGeom::Rotate3D;
14using CLHEP::Hep3Vector;
46 return StatusCode::SUCCESS;
55 int nrun = ctx.eventID().run_number();
56 int nevt = ctx.eventID().event_number();
62 ATH_MSG_DEBUG(
"Creating conditions objects for run " << nrun );
71 return StatusCode::SUCCESS;
89 return StatusCode::SUCCESS;
99 ATH_MSG_INFO(
" DetCondKeyTrans already exists, do nothing " );
100 return StatusCode::SUCCESS;
104 std::ifstream infile;
107 if(!infile.is_open()) {
109 return StatusCode::FAILURE;
112 auto transforms = std::make_unique<DetCondKeyTrans>();
114 char commentSign =
'#';
115 std::string commentLine;
119 while(!infile.eof()) {
121 if(key.empty())
continue;
122 if(key[0]==commentSign)
123 std::getline(infile,commentLine);
125 infile >>
theta >>
phi >> rotationAngle >>
x >>
y >>
z;
128 transforms->setTransform(key,Translate3D(
x,
y,
z)*Rotate3D(rotationAngle,axis));
136 return StatusCode::SUCCESS;
148 else if(
nullptr == align)
151 std::cout <<
" \n\n**************************************************** \n";
152 std::cout <<
" **** **** \n";
153 std::cout <<
" **** Printing Conditions Objects **** \n";
154 std::cout <<
" **** **** \n";
155 std::cout <<
" **************************************************** \n";
159 std::cout <<
" **** **** **** **** END **** **** **** **** \n\n\n";
162 return StatusCode::SUCCESS;
179 typeKeys[0] = std::move(align);
184 return StatusCode::SUCCESS;
194 std::string objname =
"DetCondKeyTrans";
198 return StatusCode::SUCCESS;
Scalar phi() const
phi method
Scalar theta() const
theta method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
const ServiceHandle< StoreGateSvc > & detStore() const
Class to hold set of HepGeom::Transform3D keyed by string value for storage in the conditions DB typi...
ServiceHandle< IIOVRegistrationSvc > m_regSvc
StatusCode registerCondObjects()
virtual StatusCode execute(const EventContext &ctx) override
Execute method.
StringProperty m_outpFile
virtual StatusCode initialize() override
virtual StatusCode finalize() override
LArAlignDbAlg(const std::string &name, ISvcLocator *pSvcLocator)
ToolHandle< IAthenaOutputStreamTool > m_streamer
StatusCode printCondObjects()
StatusCode createCondObjects()
BooleanProperty m_writeCondObjs
StatusCode streamOutCondObjects()
bool contains(const std::string &s, const std::string ®x)
does a string contain the substring