CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Attributes
CocoaDBMgr Class Reference

#include <CocoaDBMgr.h>

Public Member Functions

bool DumpCocoaResults ()
 
 ~CocoaDBMgr ()
 

Static Public Member Functions

static CocoaDBMgrgetInstance ()
 

Private Member Functions

std::pair< Alignments
*, AlignmentErrors * > 
BuildAlignments (bool bDT)
 
OpticalAlignmentsBuildOpticalAlignments ()
 
 CocoaDBMgr ()
 
AlignTransformErrorGetAlignInfoErrorFromOptO (OpticalObject *opto)
 
AlignTransformGetAlignInfoFromOptO (OpticalObject *opto)
 
double GetEntryError (const Entry *entry)
 
double GetEntryError (const Entry *entry1, const Entry *entry2)
 
OpticalAlignInfo GetOptAlignInfoFromOptO (OpticalObject *opto)
 

Static Private Attributes

static CocoaDBMgrinstance = 0
 

Detailed Description

Definition at line 37 of file CocoaDBMgr.h.

Constructor & Destructor Documentation

CocoaDBMgr::CocoaDBMgr ( )
private

Definition at line 47 of file CocoaDBMgr.cc.

Referenced by getInstance().

48 {
49 }
CocoaDBMgr::~CocoaDBMgr ( )
inline

Definition at line 45 of file CocoaDBMgr.h.

45 { }

Member Function Documentation

std::pair< Alignments *, AlignmentErrors * > CocoaDBMgr::BuildAlignments ( bool  bDT)
private

Definition at line 286 of file CocoaDBMgr.cc.

References gather_cfg::cout, ALIUtils::debug, GetAlignInfoErrorFromOptO(), GetAlignInfoFromOptO(), Alignments::m_align, AlignmentErrors::m_alignError, and Model::OptOList().

Referenced by DumpCocoaResults().

287 {
288  Alignments* alignments = new Alignments;
289  AlignmentErrors* alignmentErrors = new AlignmentErrors;
290 
291  //read
292  static std::vector< OpticalObject* > optolist = Model::OptOList();
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;
298  //check CMSSW ID
299  if( (*ite)->getCmsswID() > 0 ) { //put the numbers of DT or CSC objects
300  std::cout << " cal fill alignments " << std::endl;
301  alignments->m_align.push_back( *(GetAlignInfoFromOptO( *ite )));
302  std::cout << " fill alignments " << std::endl;
303  // AlignTransformError* err =
304  //GetAlignInfoErrorFromOptO( *ite );
305  alignmentErrors->m_alignError.push_back(*(GetAlignInfoErrorFromOptO( *ite )));
306  std::cout << "CocoaDBMgr::BuildAlignments add alignmentError " << alignmentErrors->m_alignError.size() << std::endl;
307  }
308  }
309 
310  if(ALIUtils::debug >= 4) std::cout << "CocoaDBMgr::BuildAlignments end with n alignment " << alignments->m_align.size() << " n alignmentError " << alignmentErrors->m_alignError.size() << std::endl;
311  return std::pair< Alignments*,AlignmentErrors*>(alignments,alignmentErrors);
312 }
std::vector< AlignTransformError > m_alignError
static ALIint debug
Definition: ALIUtils.h:35
std::vector< AlignTransform > m_align
Definition: Alignments.h:17
AlignTransform * GetAlignInfoFromOptO(OpticalObject *opto)
Definition: CocoaDBMgr.cc:316
static std::vector< OpticalObject * > & OptOList()
Definition: Model.h:71
tuple cout
Definition: gather_cfg.py:121
AlignTransformError * GetAlignInfoErrorFromOptO(OpticalObject *opto)
Definition: CocoaDBMgr.cc:334
OpticalAlignments * CocoaDBMgr::BuildOpticalAlignments ( )
private

Definition at line 265 of file CocoaDBMgr.cc.

References gather_cfg::cout, data, ALIUtils::debug, GetOptAlignInfoFromOptO(), OpticalAlignments::opticalAlignments_, and Model::OptOList().

Referenced by DumpCocoaResults().

266 {
267  OpticalAlignments* optalign= new OpticalAlignments;
268 
269  static std::vector< OpticalObject* > optolist = Model::OptOList();
270  static std::vector< OpticalObject* >::const_iterator ite;
271  for(ite = optolist.begin(); ite != optolist.end(); ite++ ){
272  if( (*ite)->type() == "system" ) continue;
274  optalign->opticalAlignments_.push_back(data);
275  if(ALIUtils::debug >= 5) {
276  std::cout << "@@@@ OPTALIGNINFO TO BE WRITTEN TO DB "
277  << data
278  << std::endl;
279  }
280  }
281  return optalign;
282 }
static ALIint debug
Definition: ALIUtils.h:35
std::vector< OpticalAlignInfo > opticalAlignments_
OpticalAlignInfo GetOptAlignInfoFromOptO(OpticalObject *opto)
Definition: CocoaDBMgr.cc:176
static std::vector< OpticalObject * > & OptOList()
Definition: Model.h:71
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
tuple cout
Definition: gather_cfg.py:121
bool CocoaDBMgr::DumpCocoaResults ( )

Definition at line 52 of file CocoaDBMgr.cc.

References cond::service::PoolDBOutputService::appendSinceTime(), cond::service::PoolDBOutputService::beginOfTime(), BuildAlignments(), BuildOpticalAlignments(), gather_cfg::cout, cond::service::PoolDBOutputService::createNewIOV(), cond::service::PoolDBOutputService::currentTime(), ALIUtils::debug, cond::service::PoolDBOutputService::endOfTime(), edm::hlt::Exception, GlobalOptionMgr::getInstance(), GlobalOptionMgr::GlobalOptions(), edm::Service< T >::isAvailable(), cond::service::PoolDBOutputService::isNewTagRequest(), Alignments::m_align, AlignmentErrors::m_alignError, Fit::nEvent, OpticalAlignments::opticalAlignments_, and TRUE.

Referenced by Fit::startFit().

53 {
55 
57  int nrcd;
58 
59  cond::Time_t appendTime = Fit::nEvent+1;
60  if(gomgr->GlobalOptions()["writeDBOptAlign"] > 0 ) {
61 
62  //----- Build OpticalAlignments
64 
65  //--- Dump OpticalAlignments
66  nrcd = optalign->opticalAlignments_.size();
67  if( !myDbService.isAvailable() ){
68  throw cms::Exception("CocoaDBMgr::DumpCocoaResults DB not available");
69  }
70  // try{
71  if ( myDbService->isNewTagRequest( "OpticalAlignmentsRcd" ) ) {
72  std::cout << " new OA to DB " << "begin " << myDbService->beginOfTime() << " current " << myDbService->currentTime() << " end " << myDbService->endOfTime() << std::endl;
73  myDbService->createNewIOV<OpticalAlignments>(optalign,
74  myDbService->beginOfTime(),
75  myDbService->endOfTime(),
76  // myDbService->endOfTime(),
77  "OpticalAlignmentsRcd");
78  } else {
79  std::cout << " old OA to DB " << " current " << myDbService->currentTime() << " end " << myDbService->endOfTime() << std::endl;
80  myDbService->appendSinceTime<OpticalAlignments>( optalign,
81  // myDbService->endOfTime(),
82  appendTime,
83  // myDbService->currentTime(),
84  "OpticalAlignmentsRcd");
85  }
86 
87 
88  /* }catch(const cond::Exception& er) {
89  std::cout<<er.what()<<std::endl;
90  }catch(const std::exception& er){
91  std::cout<<"caught std::exception "<<er.what()<<std::endl;
92  }catch(...){
93  std::cout<<"Funny error"<<std::endl;
94  } */
95 
96  if(ALIUtils::debug >= 2) std::cout << "OpticalAlignmentsRcd WRITTEN TO DB : "<< nrcd << std::endl;
97  }
98 
99  if( gomgr->GlobalOptions()["writeDBAlign"] > 0) {
100 
101  // Build DT alignments and errors
102  std::pair< Alignments*,AlignmentErrors*> dtali = BuildAlignments(1);
103  Alignments* dt_Alignments = dtali.first;
104  AlignmentErrors* dt_AlignmentErrors = dtali.second;
105 
106  // Dump DT alignments and errors
107  nrcd = dt_Alignments->m_align.size();
108  if ( myDbService->isNewTagRequest( "DTAlignmentRcd" ) ) {
109  myDbService->createNewIOV<Alignments>(&(*dt_Alignments),
110  myDbService->beginOfTime(),
111  myDbService->endOfTime(),
112  "DTAlignmentRcd");
113  } else {
114  myDbService->appendSinceTime<Alignments>( &(*dt_Alignments),
115  appendTime,
116  // myDbService->currentTime(),
117  "DTAlignmentRcd");
118  }
119  if(ALIUtils::debug >= 2) std::cout << "DTAlignmentRcd WRITTEN TO DB : "<< nrcd << std::endl;
120 
121  nrcd = dt_AlignmentErrors->m_alignError.size();
122  if ( myDbService->isNewTagRequest( "DTAlignmentErrorRcd" ) ) {
123  myDbService->createNewIOV<AlignmentErrors>(&(*dt_AlignmentErrors),
124  myDbService->beginOfTime(),
125  myDbService->endOfTime(),
126  "DTAlignmentErrorRcd");
127  } else {
128  myDbService->appendSinceTime<AlignmentErrors>( &(*dt_AlignmentErrors),
129  appendTime,
130  "DTAlignmentErrorRcd");
131  }
132  if(ALIUtils::debug >= 2) std::cout << "DTAlignmentErrorRcd WRITTEN TO DB : "<< nrcd << std::endl;
133 
134  // Build CSC alignments and errors
135  std::pair< Alignments*,AlignmentErrors*> cscali = BuildAlignments(0);
136  Alignments* csc_Alignments = cscali.first;
137  AlignmentErrors* csc_AlignmentErrors = cscali.second;
138 
139  // Dump CSC alignments and errors
140  nrcd = csc_Alignments->m_align.size();
141  if ( myDbService->isNewTagRequest( "CSCAlignmentRcd" ) ) {
142  myDbService->createNewIOV<Alignments>(&(*csc_Alignments),
143  myDbService->beginOfTime(),
144  myDbService->endOfTime(),
145  "CSCAlignmentRcd");
146  } else {
147  myDbService->appendSinceTime<Alignments>( &(*csc_Alignments),
148  appendTime,
149  "CSCAlignmentRcd");
150  }
151  if(ALIUtils::debug >= 2) std::cout << "CSCAlignmentRcd WRITTEN TO DB : "<< nrcd << std::endl;
152 
153  nrcd = csc_AlignmentErrors->m_alignError.size();
154  if ( myDbService->isNewTagRequest( "CSCAlignmentErrorRcd" ) ) {
155  myDbService->createNewIOV<AlignmentErrors>(&(*csc_AlignmentErrors),
156  myDbService->beginOfTime(),
157  myDbService->endOfTime(),
158  "CSCAlignmentErrorRcd");
159  } else {
160  myDbService->appendSinceTime<AlignmentErrors>( &(*csc_AlignmentErrors),
161  appendTime,
162  "CSCAlignmentErrorRcd");
163  }
164  if(ALIUtils::debug >= 2) std::cout << "CSCAlignmentErrorRcd WRITTEN TO DB : "<< nrcd << std::endl;
165 
166  //? gives unreadable error??? std::cout << "@@@@ OPTICALALIGNMENTS WRITTEN TO DB " << *optalign << std::endl;
167 
168  return TRUE;
169  }
170 
171  return TRUE;
172 }
#define TRUE
Definition: scimark2.h:12
std::vector< AlignTransformError > m_alignError
OpticalAlignments * BuildOpticalAlignments()
Definition: CocoaDBMgr.cc:265
static ALIint debug
Definition: ALIUtils.h:35
static GlobalOptionMgr * getInstance()
std::vector< AlignTransform > m_align
Definition: Alignments.h:17
std::pair< Alignments *, AlignmentErrors * > BuildAlignments(bool bDT)
Definition: CocoaDBMgr.cc:286
void appendSinceTime(T *payloadObj, cond::Time_t sinceTime, const std::string &recordName, bool withlogging=false)
unsigned long long Time_t
Definition: Time.h:16
bool isNewTagRequest(const std::string &recordName)
std::vector< OpticalAlignInfo > opticalAlignments_
bool isAvailable() const
Definition: Service.h:46
static ALIuint nEvent
Definition: Fit.h:204
void createNewIOV(T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t firstTillTime, const std::string &recordName, bool withlogging=false)
tuple cout
Definition: gather_cfg.py:121
std::map< ALIstring, ALIdouble, std::less< ALIstring > > & GlobalOptions()
AlignTransformError * CocoaDBMgr::GetAlignInfoErrorFromOptO ( OpticalObject opto)
private

Definition at line 334 of file CocoaDBMgr.cc.

References asHepMatrix(), OpticalObject::CoordinateEntryList(), gather_cfg::cout, ALIUtils::debug, OpticalObject::getCmsswID(), GetEntryError(), GlobalErrorBase< T, ErrorWeightType >::matrix(), and OpticalObject::name().

Referenced by BuildAlignments().

335 {
336  if(ALIUtils::debug >= 3) std::cout << "@@@ CocoaDBMgr::GetAlignInfoErrorFromOptO " << opto->name() << std::endl;
337 
338  align::ID cmsswID = opto->getCmsswID();
339 
340  GlobalError gerr(1.,
341  0.,
342  1.,
343  0.,
344  0.,
345  1.);
346  //double(dx*dx), 0., double(dy*dy), 0., 0., double(dz*dz) ) ;
347  CLHEP::HepSymMatrix errms = asHepMatrix(gerr.matrix());
348  AlignTransformError* alignError = new AlignTransformError( errms, cmsswID );
349  return alignError;
350 
351  CLHEP::HepMatrix errm(3,3);
352  const std::vector< Entry* > theCoordinateEntryVector = opto->CoordinateEntryList();
353 std::cout << "@@@ CocoaDBMgr::GetAlignInfoFromOptOfill errm " << opto->name() << std::endl;
354  errm(0,0) = GetEntryError( theCoordinateEntryVector[0] ) / 100.; // in cm
355  errm(1,1) = GetEntryError( theCoordinateEntryVector[1] ) / 100.; // in cm
356  errm(2,2) = GetEntryError( theCoordinateEntryVector[2] ) / 100.; // in cm
357  errm(0,1) = GetEntryError( theCoordinateEntryVector[0], theCoordinateEntryVector[1] ) / 100.; // in cm
358  errm(0,2) = GetEntryError( theCoordinateEntryVector[0], theCoordinateEntryVector[2] ) / 100.; // in cm
359  errm(1,2) = GetEntryError( theCoordinateEntryVector[1], theCoordinateEntryVector[2] ) / 100.; // in cm
360  // errm(1,0) = errm(0,1);
361  // errm(2,0) = errm(0,2);
362  // errm(2,1) = errm(1,2);
363 
364 std::cout << "@@@ CocoaDBMgr::GetAlignInfoFromOptO errm filled" << opto->name() << std::endl;
365 // CLHEP::HepSymMatrix errms(3);
366 // errms.assign(errm);
367 
368 std::cout << "@@@ CocoaDBMgr::GetAlignInfoFromOptO errms filled " << opto->name() << std::endl;
369 // AlignTransformError* alignError = new AlignTransformError( errms, cmsswID );
370 // AlignTransformError* alignError = 0;
371 
372  std::cout << alignError << "@@@ CocoaDBMgr::GetAlignInfoFromOptO error built " << opto->name() << std::endl;
373  //t return alignError;
374  return (AlignTransformError*)(0);
375 }
const ALIuint getCmsswID() const
CLHEP::HepMatrix asHepMatrix(const ROOT::Math::SMatrix< double, N1, N2, typename ROOT::Math::MatRepStd< double, N1, N2 > > &rm)
Definition: Migration.h:49
uint32_t ID
Definition: Definitions.h:26
const std::vector< Entry * > & CoordinateEntryList() const
Definition: OpticalObject.h:65
static ALIint debug
Definition: ALIUtils.h:35
double GetEntryError(const Entry *entry)
Definition: CocoaDBMgr.cc:241
tuple cout
Definition: gather_cfg.py:121
const ALIstring & name() const
Definition: OpticalObject.h:60
AlignTransform * CocoaDBMgr::GetAlignInfoFromOptO ( OpticalObject opto)
private

Definition at line 316 of file CocoaDBMgr.cc.

References OpticalObject::centreGlob(), gather_cfg::cout, ALIUtils::debug, OpticalObject::getCmsswID(), OpticalObject::name(), OpticalObject::rmGlob(), and makeMuonMisalignmentScenario::rot.

Referenced by BuildAlignments().

317 {
318  if(ALIUtils::debug >= 3) std::cout << "@@@ CocoaDBMgr::GetAlignInfoFromOptO " << opto->name() << std::endl;
319 
320  AlignTransform::Translation trans = opto->centreGlob();
322  align::ID cmsswID = opto->getCmsswID();
323 
324  std::cout << "@@@ CocoaDBMgr::GetAlignInfoFromOptO buildalign" << opto->name() << std::endl;
325  AlignTransform* align = new AlignTransform( trans, rot, cmsswID );
326 
327  std::cout << "@@@ CocoaDBMgr::GetAlignInfoFromOptO alig built " << opto->name() << std::endl;
328 
329  return align;
330  // return dd;
331 }
const ALIuint getCmsswID() const
uint32_t ID
Definition: Definitions.h:26
CLHEP::Hep3Vector Translation
static ALIint debug
Definition: ALIUtils.h:35
const CLHEP::HepRotation & rmGlob() const
const CLHEP::Hep3Vector & centreGlob() const
Definition: OpticalObject.h:85
tuple cout
Definition: gather_cfg.py:121
const ALIstring & name() const
Definition: OpticalObject.h:60
CLHEP::HepRotation Rotation
double CocoaDBMgr::GetEntryError ( const Entry entry)
private

Definition at line 241 of file CocoaDBMgr.cc.

References Entry::fitPos(), Fit::GetAtWAMatrix(), Entry::quality(), Entry::sigma(), and mathSSE::sqrt().

Referenced by GetAlignInfoErrorFromOptO(), GetEntryError(), and GetOptAlignInfoFromOptO().

242 {
243  if( entry->quality() > 0 ) {
244  return sqrt(Fit::GetAtWAMatrix()->Mat()->me[entry->fitPos()][entry->fitPos()]);
245  } else { //entry not fitted, return original error
246  return entry->sigma();
247  }
248 }
static ALIMatrix * GetAtWAMatrix()
Definition: Fit.h:146
T sqrt(T t)
Definition: SSEVec.h:48
ALIint fitPos() const
Definition: Entry.h:60
ALIint quality() const
Definition: Entry.h:59
ALIdouble sigma() const
Definition: Entry.h:57
double CocoaDBMgr::GetEntryError ( const Entry entry1,
const Entry entry2 
)
private

Definition at line 252 of file CocoaDBMgr.cc.

References Entry::fitPos(), Fit::GetAtWAMatrix(), GetEntryError(), Entry::quality(), and mathSSE::sqrt().

253 {
254  if( entry1 == entry2 ) return GetEntryError( entry1 );
255 
256  if( entry1->quality() > 0 && entry2->quality() > 0 ) {
257  return sqrt(Fit::GetAtWAMatrix()->Mat()->me[entry1->fitPos()][entry2->fitPos()]);
258  } else { //entries not fitted, correlation is 0
259  return 0.;
260  }
261 }
static ALIMatrix * GetAtWAMatrix()
Definition: Fit.h:146
T sqrt(T t)
Definition: SSEVec.h:48
double GetEntryError(const Entry *entry)
Definition: CocoaDBMgr.cc:241
ALIint fitPos() const
Definition: Entry.h:60
ALIint quality() const
Definition: Entry.h:59
CocoaDBMgr * CocoaDBMgr::getInstance ( )
static

Definition at line 38 of file CocoaDBMgr.cc.

References CocoaDBMgr(), and instance.

Referenced by Fit::startFit().

39 {
40  if(!instance) {
41  instance = new CocoaDBMgr;
42  }
43  return instance;
44 }
static CocoaDBMgr * instance
Definition: CocoaDBMgr.h:62
OpticalAlignInfo CocoaDBMgr::GetOptAlignInfoFromOptO ( OpticalObject opto)
private

Definition at line 176 of file CocoaDBMgr.cc.

References OpticalAlignInfo::angx_, OpticalAlignInfo::angy_, OpticalAlignInfo::angz_, OpticalObject::centreGlob(), OpticalObject::CoordinateEntryList(), gather_cfg::cout, data, OpticalAlignParam::dim_type_, OpticalAlignParam::error_, OpticalAlignInfo::extraEntries_, OpticalObject::ExtraEntryList(), Fit::GetAtWAMatrix(), OpticalObject::getCmsswID(), GetEntryError(), OpticalObject::getLocalRotationAngles(), OpticalAlignInfo::ID_, M_PI, MatrixMeschach::Mat(), OpticalObject::name(), OpticalAlignParam::name_, OpticalAlignInfo::name_, OpticalObject::parent(), OpticalAlignParam::quality_, OpticalObject::rmGlob(), OpticalObject::type(), OpticalAlignInfo::type_, OpticalAlignParam::value_, OpticalAlignInfo::x_, OpticalAlignInfo::y_, and OpticalAlignInfo::z_.

Referenced by BuildOpticalAlignments().

177 {
178  std::cout << " CocoaDBMgr::GetOptAlignInfoFromOptO " << opto->name() << std::endl;
180  data.ID_=opto->getCmsswID();
181  data.type_=opto->type();
182  data.name_=opto->name();
183 
184  //----- Centre in local coordinates
185  CLHEP::Hep3Vector centreLocal = opto->centreGlob() - opto->parent()->centreGlob();
186  CLHEP::HepRotation parentRmGlobInv = inverseOf( opto->parent()->rmGlob() );
187  centreLocal = parentRmGlobInv * centreLocal;
188 
189  const std::vector< Entry* > theCoordinateEntryVector = opto->CoordinateEntryList();
190  std::cout << " CocoaDBMgr::GetOptAlignInfoFromOptO starting coord " <<std::endl;
191 
192  data.x_.value_= centreLocal.x() / 100.; // in cm
193  std::cout << " matrix " << Fit::GetAtWAMatrix() << std::endl;
194  std::cout << " matrix " << Fit::GetAtWAMatrix()->Mat() << " " << theCoordinateEntryVector[0]->fitPos() << std::endl;
195  data.x_.error_= GetEntryError( theCoordinateEntryVector[0] ) / 100.; // in cm
196 
197  data.y_.value_= centreLocal.y() / 100.; // in cm
198  std::cout << " matrix " << Fit::GetAtWAMatrix()->Mat() << " " << theCoordinateEntryVector[1]->fitPos() << std::endl;
199  data.y_.error_= GetEntryError( theCoordinateEntryVector[1] ) / 100.; // in cm
200 
201  data.z_.value_= centreLocal.z() / 100.; // in cm
202  std::cout << " matrix " << Fit::GetAtWAMatrix()->Mat() << " " << theCoordinateEntryVector[2]->fitPos() << std::endl;
203  data.z_.error_= GetEntryError( theCoordinateEntryVector[2] ) / 100.; // in cm
204 
205  //----- angles in local coordinates
206  std::vector<double> anglocal = opto->getLocalRotationAngles( theCoordinateEntryVector );
207 
208  data.angx_.value_= anglocal[0] *180./M_PI; // in deg
209  std::cout << " matrix " << Fit::GetAtWAMatrix()->Mat() << theCoordinateEntryVector[3]->fitPos() << std::endl;
210  data.angx_.error_= GetEntryError( theCoordinateEntryVector[3] ) * 180./M_PI; // in deg;
211 
212  data.angy_.value_= anglocal[1] * 180./M_PI; // in deg
213  std::cout << " matrix " << Fit::GetAtWAMatrix()->Mat() << theCoordinateEntryVector[4]->fitPos() << std::endl;
214  data.angy_.error_= GetEntryError( theCoordinateEntryVector[4] ) * 180./M_PI; // in deg;;
215 
216  data.angz_.value_= anglocal[2] *180./M_PI; // in deg
217  std::cout << " matrix " << Fit::GetAtWAMatrix()->Mat() << theCoordinateEntryVector[5]->fitPos() << std::endl;
218  data.angz_.error_= GetEntryError( theCoordinateEntryVector[5] ) * 180./M_PI; // in deg;
219 
220 
221  const std::vector< Entry* > theExtraEntryVector = opto->ExtraEntryList(); std::cout << " CocoaDBMgr::GetOptAlignInfoFromOptO starting entry " << std::endl;
222 
223  std::vector< Entry* >::const_iterator ite;
224  for( ite = theExtraEntryVector.begin(); ite != theExtraEntryVector.end(); ite++ ) {
225  OpticalAlignParam extraEntry;
226  extraEntry.name_ = (*ite)->name();
227  extraEntry.dim_type_ = (*ite)->type();
228  extraEntry.value_ = (*ite)->value();
229  extraEntry.error_ = (*ite)->sigma();
230  extraEntry.quality_ = (*ite)->quality();
231  data.extraEntries_.push_back( extraEntry );
232  std::cout << " CocoaDBMgr::GetOptAlignInfoFromOptO done extra entry " << extraEntry.name_ << std::endl;
233 
234  }
235 
236  return data;
237 }
const ALIuint getCmsswID() const
OpticalAlignParam x_
const std::vector< Entry * > & ExtraEntryList() const
Definition: OpticalObject.h:69
static ALIMatrix * GetAtWAMatrix()
Definition: Fit.h:146
const std::vector< Entry * > & CoordinateEntryList() const
Definition: OpticalObject.h:65
const CLHEP::HepRotation & rmGlob() const
OpticalAlignParam angx_
std::vector< double > getLocalRotationAngles(const std::vector< Entry * > &entries) const
OpticalAlignParam y_
const OpticalObject * parent() const
Definition: OpticalObject.h:62
const MAT * Mat() const
double GetEntryError(const Entry *entry)
Definition: CocoaDBMgr.cc:241
OpticalAlignParam angz_
#define M_PI
Definition: BFit3D.cc:3
OpticalAlignParam z_
std::vector< OpticalAlignParam > extraEntries_
const CLHEP::Hep3Vector & centreGlob() const
Definition: OpticalObject.h:85
OpticalAlignParam angy_
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
tuple cout
Definition: gather_cfg.py:121
const ALIstring & name() const
Definition: OpticalObject.h:60
std::string dim_type_
unsigned int ID_
const ALIstring & type() const
Definition: OpticalObject.h:61

Member Data Documentation

CocoaDBMgr * CocoaDBMgr::instance = 0
staticprivate

Definition at line 62 of file CocoaDBMgr.h.

Referenced by getInstance().