10#define LAR_ALIGN "/LAR/Align"
12using HepGeom::Translate3D;
13using HepGeom::Rotate3D;
14using CLHEP::Hep3Vector;
46 return StatusCode::SUCCESS;
55 const EventContext& context = getContext();
56 int nrun = context.eventID().run_number();
57 int nevt = context.eventID().event_number();
63 ATH_MSG_DEBUG(
"Creating conditions objects for run " << nrun );
72 return StatusCode::SUCCESS;
90 return StatusCode::SUCCESS;
100 ATH_MSG_INFO(
" DetCondKeyTrans already exists, do nothing " );
101 return StatusCode::SUCCESS;
105 std::ifstream infile;
108 if(!infile.is_open()) {
110 return StatusCode::FAILURE;
113 auto transforms = std::make_unique<DetCondKeyTrans>();
115 char commentSign =
'#';
116 std::string commentLine;
120 while(!infile.eof()) {
122 if(key.empty())
continue;
123 if(key[0]==commentSign)
124 std::getline(infile,commentLine);
126 infile >>
theta >>
phi >> rotationAngle >>
x >>
y >>
z;
129 transforms->setTransform(key,Translate3D(
x,
y,
z)*Rotate3D(rotationAngle,axis));
137 return StatusCode::SUCCESS;
149 else if(
nullptr == align)
152 std::cout <<
" \n\n**************************************************** \n";
153 std::cout <<
" **** **** \n";
154 std::cout <<
" **** Printing Conditions Objects **** \n";
155 std::cout <<
" **** **** \n";
156 std::cout <<
" **************************************************** \n";
160 std::cout <<
" **** **** **** **** END **** **** **** **** \n\n\n";
163 return StatusCode::SUCCESS;
180 typeKeys[0] = std::move(align);
185 return StatusCode::SUCCESS;
195 std::string objname =
"DetCondKeyTrans";
199 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 with parameters:
const ServiceHandle< StoreGateSvc > & detStore() const
Class to hold set of HepGeom::Transform3D keyed by string value for storage in the conditions DB typi...
virtual StatusCode execute() override
ServiceHandle< IIOVRegistrationSvc > m_regSvc
StatusCode registerCondObjects()
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