68 throw cms::Exception(
"CocoaDBMgr::DumpCocoaResults DB not available");
77 "OpticalAlignmentsRcd");
84 "OpticalAlignmentsRcd");
107 nrcd = dt_Alignments->
m_align.size();
126 "DTAlignmentErrorRcd");
130 "DTAlignmentErrorRcd");
140 nrcd = csc_Alignments->
m_align.size();
158 "CSCAlignmentErrorRcd");
162 "CSCAlignmentErrorRcd");
178 std::cout <<
" CocoaDBMgr::GetOptAlignInfoFromOptO " << opto->
name() << std::endl;
186 CLHEP::HepRotation parentRmGlobInv = inverseOf( opto->
parent()->
rmGlob() );
187 centreLocal = parentRmGlobInv * centreLocal;
190 std::cout <<
" CocoaDBMgr::GetOptAlignInfoFromOptO starting coord " <<std::endl;
192 data.
x_.
value_= centreLocal.x() / 100.;
197 data.
y_.
value_= centreLocal.y() / 100.;
201 data.
z_.
value_= centreLocal.z() / 100.;
221 const std::vector< Entry* > theExtraEntryVector = opto->
ExtraEntryList();
std::cout <<
" CocoaDBMgr::GetOptAlignInfoFromOptO starting entry " << std::endl;
223 std::vector< Entry* >::const_iterator ite;
224 for( ite = theExtraEntryVector.begin(); ite != theExtraEntryVector.end(); ite++ ) {
226 extraEntry.
name_ = (*ite)->name();
228 extraEntry.
value_ = (*ite)->value();
229 extraEntry.
error_ = (*ite)->sigma();
230 extraEntry.
quality_ = (*ite)->quality();
232 std::cout <<
" CocoaDBMgr::GetOptAlignInfoFromOptO done extra entry " << extraEntry.
name_ << std::endl;
246 return entry->
sigma();
270 static std::vector< OpticalObject* >::const_iterator ite;
271 for(ite = optolist.begin(); ite != optolist.end(); ite++ ){
272 if( (*ite)->type() ==
"system" )
continue;
276 std::cout <<
"@@@@ OPTALIGNINFO TO BE WRITTEN TO DB "
293 static std::vector< OpticalObject* >::const_iterator ite;
294 for(ite = optolist.begin(); ite != optolist.end(); ite++ ){
295 if( (*ite)->type() ==
"system" )
continue;
296 std::cout <<
"CocoaDBMgr::BuildAlignments getCmsswID " << (*ite) << std::endl;
297 std::cout <<
"CocoaDBMgr::BuildAlignments getCmsswID " << (*ite)->getCmsswID() << std::endl;
299 if( (*ite)->getCmsswID() > 0 ) {
300 std::cout <<
" cal fill alignments " << std::endl;
302 std::cout <<
" fill alignments " << std::endl;
306 std::cout <<
"CocoaDBMgr::BuildAlignments add alignmentError " << alignmentErrors->
m_alignError.size() << std::endl;
311 return std::pair< Alignments*,AlignmentErrors*>(alignments,alignmentErrors);
324 std::cout <<
"@@@ CocoaDBMgr::GetAlignInfoFromOptO buildalign" << opto->
name() << std::endl;
327 std::cout <<
"@@@ CocoaDBMgr::GetAlignInfoFromOptO alig built " << opto->
name() << std::endl;
351 CLHEP::HepMatrix errm(3,3);
353 std::cout <<
"@@@ CocoaDBMgr::GetAlignInfoFromOptOfill errm " << opto->
name() << std::endl;
354 errm(0,0) =
GetEntryError( theCoordinateEntryVector[0] ) / 100.;
355 errm(1,1) =
GetEntryError( theCoordinateEntryVector[1] ) / 100.;
356 errm(2,2) =
GetEntryError( theCoordinateEntryVector[2] ) / 100.;
357 errm(0,1) =
GetEntryError( theCoordinateEntryVector[0], theCoordinateEntryVector[1] ) / 100.;
358 errm(0,2) =
GetEntryError( theCoordinateEntryVector[0], theCoordinateEntryVector[2] ) / 100.;
359 errm(1,2) =
GetEntryError( theCoordinateEntryVector[1], theCoordinateEntryVector[2] ) / 100.;
364 std::cout <<
"@@@ CocoaDBMgr::GetAlignInfoFromOptO errm filled" << opto->
name() << std::endl;
368 std::cout <<
"@@@ CocoaDBMgr::GetAlignInfoFromOptO errms filled " << opto->
name() << std::endl;
372 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
std::vector< double > getLocalRotationAngles(std::vector< Entry * > entries) const
const CLHEP::HepRotation & rmGlob() const
std::pair< Alignments *, AlignmentErrors * > BuildAlignments(bool bDT)
static CocoaDBMgr * instance
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
std::pair< std::string, MonitorElement * > entry
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