70 throw cms::Exception(
"CocoaDBMgr::DumpCocoaResults DB not available");
79 "OpticalAlignmentsRcd");
86 "OpticalAlignmentsRcd");
109 nrcd = dt_Alignments->
m_align.size();
128 "DTAlignmentErrorRcd");
132 "DTAlignmentErrorRcd");
142 nrcd = csc_Alignments->
m_align.size();
160 "CSCAlignmentErrorRcd");
164 "CSCAlignmentErrorRcd");
180 std::cout <<
" CocoaDBMgr::GetOptAlignInfoFromOptO " << opto->
name() << std::endl;
188 CLHEP::HepRotation parentRmGlobInv = inverseOf( opto->
parent()->
rmGlob() );
189 centreLocal = parentRmGlobInv * centreLocal;
192 std::cout <<
" CocoaDBMgr::GetOptAlignInfoFromOptO starting coord " <<std::endl;
194 data.
x_.
value_= centreLocal.x() / 100.;
199 data.
y_.
value_= centreLocal.y() / 100.;
203 data.
z_.
value_= centreLocal.z() / 100.;
223 const std::vector< Entry* > theExtraEntryVector = opto->
ExtraEntryList();
std::cout <<
" CocoaDBMgr::GetOptAlignInfoFromOptO starting entry " << std::endl;
225 std::vector< Entry* >::const_iterator ite;
226 for( ite = theExtraEntryVector.begin(); ite != theExtraEntryVector.end(); ite++ ) {
228 extraEntry.
name_ = (*ite)->name();
230 extraEntry.
value_ = (*ite)->value();
231 extraEntry.
error_ = (*ite)->sigma();
232 extraEntry.
quality_ = (*ite)->quality();
234 std::cout <<
" CocoaDBMgr::GetOptAlignInfoFromOptO done extra entry " << extraEntry.
name_ << std::endl;
248 return entry->
sigma();
272 static std::vector< OpticalObject* >::const_iterator ite;
273 for(ite = optolist.begin(); ite != optolist.end(); ite++ ){
274 if( (*ite)->type() ==
"system" )
continue;
278 std::cout <<
"@@@@ OPTALIGNINFO TO BE WRITTEN TO DB "
295 static std::vector< OpticalObject* >::const_iterator ite;
296 for(ite = optolist.begin(); ite != optolist.end(); ite++ ){
297 if( (*ite)->type() ==
"system" )
continue;
298 std::cout <<
"CocoaDBMgr::BuildAlignments getCmsswID " << (*ite) << std::endl;
299 std::cout <<
"CocoaDBMgr::BuildAlignments getCmsswID " << (*ite)->getCmsswID() << std::endl;
301 if( (*ite)->getCmsswID() > 0 ) {
302 std::cout <<
" cal fill alignments " << std::endl;
304 std::cout <<
" fill alignments " << std::endl;
308 std::cout <<
"CocoaDBMgr::BuildAlignments add alignmentError " << alignmentErrors->
m_alignError.size() << std::endl;
313 return std::pair< Alignments*,AlignmentErrors*>(alignments,alignmentErrors);
326 std::cout <<
"@@@ CocoaDBMgr::GetAlignInfoFromOptO buildalign" << opto->
name() << std::endl;
329 std::cout <<
"@@@ CocoaDBMgr::GetAlignInfoFromOptO alig built " << opto->
name() << std::endl;
353 CLHEP::HepMatrix errm(3,3);
355 std::cout <<
"@@@ CocoaDBMgr::GetAlignInfoFromOptOfill errm " << opto->
name() << std::endl;
356 errm(0,0) =
GetEntryError( theCoordinateEntryVector[0] ) / 100.;
357 errm(1,1) =
GetEntryError( theCoordinateEntryVector[1] ) / 100.;
358 errm(2,2) =
GetEntryError( theCoordinateEntryVector[2] ) / 100.;
359 errm(0,1) =
GetEntryError( theCoordinateEntryVector[0], theCoordinateEntryVector[1] ) / 100.;
360 errm(0,2) =
GetEntryError( theCoordinateEntryVector[0], theCoordinateEntryVector[2] ) / 100.;
361 errm(1,2) =
GetEntryError( theCoordinateEntryVector[1], theCoordinateEntryVector[2] ) / 100.;
366 std::cout <<
"@@@ CocoaDBMgr::GetAlignInfoFromOptO errm filled" << opto->
name() << std::endl;
370 std::cout <<
"@@@ CocoaDBMgr::GetAlignInfoFromOptO errms filled " << opto->
name() << std::endl;
374 std::cout << alignError <<
"@@@ CocoaDBMgr::GetAlignInfoFromOptO error built " << opto->
name() << std::endl;
const ALIuint getCmsswID() const
CLHEP::HepMatrix asHepMatrix(const ROOT::Math::SMatrix< double, N1, N2, typename ROOT::Math::MatRepStd< double, N1, N2 > > &rm)
const std::vector< Entry * > & ExtraEntryList() const
static ALIMatrix * GetAtWAMatrix()
std::vector< AlignTransformError > m_alignError
const AlgebraicSymMatrix33 & matrix() const
OpticalAlignments * BuildOpticalAlignments()
const std::vector< Entry * > & CoordinateEntryList() const
static GlobalOptionMgr * getInstance()
std::vector< AlignTransform > m_align
const CLHEP::HepRotation & rmGlob() const
std::pair< Alignments *, AlignmentErrors * > BuildAlignments(bool bDT)
static CocoaDBMgr * instance
std::vector< double > getLocalRotationAngles(const std::vector< Entry * > &entries) const
void appendSinceTime(T *payloadObj, cond::Time_t sinceTime, const std::string &recordName, bool withlogging=false)
unsigned long long Time_t
bool isNewTagRequest(const std::string &recordName)
std::vector< OpticalAlignInfo > opticalAlignments_
cond::Time_t beginOfTime() const
const OpticalObject * parent() const
AlignTransform * GetAlignInfoFromOptO(OpticalObject *opto)
double GetEntryError(const Entry *entry)
OpticalAlignInfo GetOptAlignInfoFromOptO(OpticalObject *opto)
void createNewIOV(T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t firstTillTime, const std::string &recordName, bool withlogging=false)
static std::vector< OpticalObject * > & OptOList()
static CocoaDBMgr * getInstance()
std::vector< OpticalAlignParam > extraEntries_
cond::Time_t endOfTime() const
const CLHEP::Hep3Vector & centreGlob() const
char data[epos_bytes_allocation]
cond::Time_t currentTime() const
const ALIstring & name() const
std::map< ALIstring, ALIdouble, std::less< ALIstring > > & GlobalOptions()
AlignTransformError * GetAlignInfoErrorFromOptO(OpticalObject *opto)
const ALIstring & type() const