CMS 3D CMS Logo

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

#include <Entry.h>

Inheritance diagram for Entry:
EntryAngle EntryLength EntryNoDim EntryAngleAffAngles EntryLengthAffCentre

Public Member Functions

void addFittedDisplacementToValue (const ALIdouble val)
 
virtual void displace (ALIdouble disp)
 
virtual void displaceOriginal (ALIdouble disp)
 
virtual void displaceOriginalOriginal (ALIdouble disp)
 
 Entry (const ALIstring &type)
 
void fill (const std::vector< ALIstring > &wordlist)
 
virtual void fillName (const ALIstring &name)
 
void fillNull ()
 
ALIint fitPos () const
 
EntryDim getDimType () const
 
ALIdouble lastAdditionToValueDisplacementByFitting () const
 
const ALIstring longName () const
 
const ALIstringname () const
 
OpticalObjectOptOCurrent () const
 
virtual ALIdouble OutputSigmaDimensionFactor () const
 
virtual ALIdouble OutputValueDimensionFactor () const
 
ALIint quality () const
 
void resetValueDisplacementByFitting ()
 
void setFitPos (const ALIint fitpos)
 
void setLastAdditionToValueDisplacementByFitting (const ALIdouble val)
 
void setName (const ALIstring &name)
 
void setOptOCurrent (OpticalObject *opto)
 
void setQuality (ALIuint qual)
 
void setSigma (ALIdouble sig)
 
void setType (ALIstring type)
 
void setValue (ALIdouble val)
 
ALIdouble sigma () const
 
virtual ALIdouble SigmaDimensionFactor () const
 
ALIdouble sigmaOriginalOriginal () const
 
virtual ALIdouble startingDisplacement ()
 
void substractToHalfFittedDisplacementToValue ()
 
const ALIstringtype () const
 
ALIdouble value () const
 
virtual ALIdouble ValueDimensionFactor () const
 
virtual ALIdouble valueDisplaced () const
 
ALIdouble valueDisplacementByFitting () const
 
virtual ALIdouble valueInGlobalReferenceFrame () const
 
ALIdouble valueOriginalOriginal () const
 
virtual ~Entry ()
 

Protected Attributes

ALIint fitPos_
 
ALIdouble lastAdditionToValueDisplacementByFitting_
 
ALIstring name_
 
OpticalObjectOptOCurrent_
 
ALIuint quality_
 
ALIdouble sigma_
 
ALIdouble sigmaOriginalOriginal_
 
EntryDim theDimType
 
ALIstring type_
 
ALIdouble value_
 
ALIdouble valueDisplacementByFitting_
 
ALIdouble valueOriginalOriginal_
 

Private Member Functions

void fillFromInputFileQuality (const std::vector< ALIstring > &wordlist)
 
void fillFromInputFileSigma (const std::vector< ALIstring > &wordlist)
 
void fillFromInputFileValue (const std::vector< ALIstring > &wordlist)
 
void fillFromReportOutFileQuality (const EntryData *entryData)
 
void fillFromReportOutFileSigma (const EntryData *entryData)
 
void fillFromReportOutFileValue (EntryData *entryData)
 

Friends

std::ostream & operator<< (std::ostream &os, const Entry &c)
 

Detailed Description

Definition at line 18 of file Entry.h.

Constructor & Destructor Documentation

Entry::Entry ( const ALIstring type)

Definition at line 22 of file Entry.cc.

References gather_cfg::cout, ALIUtils::debug, and valueDisplacementByFitting_.

22  : type_(type), fitPos_(-1)
23 {
24  // std::cout << "entry" << std::endl;
25  //---------- Set displacement by fitting to zero
27  if( ALIUtils::debug >= 5 ) std::cout << this << " theValueDisplacementByFitting set " << valueDisplacementByFitting_ << std::endl;
28 }
type
Definition: HCALResponse.h:21
ALIstring type_
Definition: Entry.h:102
static ALIint debug
Definition: ALIUtils.h:35
ALIdouble valueDisplacementByFitting_
Definition: Entry.h:111
ALIint fitPos_
Definition: Entry.h:109
tuple cout
Definition: gather_cfg.py:121
Entry::~Entry ( )
virtual

Definition at line 305 of file Entry.cc.

306 {
307 }

Member Function Documentation

void Entry::addFittedDisplacementToValue ( const ALIdouble  val)

Definition at line 313 of file Entry.cc.

References gather_cfg::cout, ALIUtils::debug, displaceOriginal(), lastAdditionToValueDisplacementByFitting_, name(), OpticalObject::name(), OptOCurrent(), OpticalObject::resetGlobalCoordinates(), and valueDisplacementByFitting_.

Referenced by substractToHalfFittedDisplacementToValue().

314 {
317  if( ALIUtils::debug >= 3 ) std::cout << OptOCurrent()->name() << " " << name() << " Entry::addFittedDisplacementToValue " << val << " total= " << valueDisplacementByFitting_ << std::endl;
318 
319  //---------- Displace original centre, rotation matrix, ...
320  displaceOriginal( val );
322 
323 }
void resetGlobalCoordinates()
virtual void displaceOriginal(ALIdouble disp)
Definition: Entry.cc:279
static ALIint debug
Definition: ALIUtils.h:35
ALIdouble lastAdditionToValueDisplacementByFitting_
Definition: Entry.h:112
const ALIstring & name() const
Definition: Entry.h:52
ALIdouble valueDisplacementByFitting_
Definition: Entry.h:111
tuple cout
Definition: gather_cfg.py:121
const ALIstring & name() const
Definition: OpticalObject.h:60
OpticalObject * OptOCurrent() const
Definition: Entry.h:61
void Entry::displace ( ALIdouble  disp)
virtual

Reimplemented in EntryAngleAffAngles, and EntryLengthAffCentre.

Definition at line 266 of file Entry.cc.

References gather_cfg::cout, ALIUtils::debug, OpticalObject::displaceExtraEntry(), OpticalObject::extraEntryNo(), name(), and OptOCurrent().

Referenced by Measurement::DerivativeRespectEntry().

267 {
268  if(ALIUtils::debug>=9) std::cout << "ExtraEntry::Displace" << disp <<std::endl;
269  ALIuint entryNo = OptOCurrent()->extraEntryNo( name() );
270 
271  OptOCurrent()->displaceExtraEntry( entryNo, disp );
272 
273 }
static ALIint debug
Definition: ALIUtils.h:35
const ALIstring & name() const
Definition: Entry.h:52
const ALIint extraEntryNo(const ALIstring &entry_name) const
void displaceExtraEntry(const ALIuint entryNo, const ALIdouble disp)
tuple cout
Definition: gather_cfg.py:121
OpticalObject * OptOCurrent() const
Definition: Entry.h:61
unsigned int ALIuint
Definition: CocoaGlobals.h:17
void Entry::displaceOriginal ( ALIdouble  disp)
virtual

Reimplemented in EntryAngleAffAngles, and EntryLengthAffCentre.

Definition at line 279 of file Entry.cc.

References gather_cfg::cout, ALIUtils::debug, OpticalObject::displaceExtraEntryOriginal(), OpticalObject::extraEntryNo(), name(), and OptOCurrent().

Referenced by addFittedDisplacementToValue().

280 {
281  if(ALIUtils::debug>=9) std::cout << "ExtraEntry::DisplaceOriginal" << disp <<std::endl;
282  ALIuint entryNo = OptOCurrent()->extraEntryNo( name() );
283 
284  OptOCurrent()->displaceExtraEntryOriginal( entryNo, disp );
285 
286 }
void displaceExtraEntryOriginal(const ALIuint entryNo, const ALIdouble disp)
static ALIint debug
Definition: ALIUtils.h:35
const ALIstring & name() const
Definition: Entry.h:52
const ALIint extraEntryNo(const ALIstring &entry_name) const
tuple cout
Definition: gather_cfg.py:121
OpticalObject * OptOCurrent() const
Definition: Entry.h:61
unsigned int ALIuint
Definition: CocoaGlobals.h:17
void Entry::displaceOriginalOriginal ( ALIdouble  disp)
virtual

Reimplemented in EntryAngleAffAngles, and EntryLengthAffCentre.

Definition at line 292 of file Entry.cc.

References gather_cfg::cout, ALIUtils::debug, OpticalObject::displaceExtraEntryOriginalOriginal(), OpticalObject::extraEntryNo(), name(), and OptOCurrent().

Referenced by FittedEntriesReader::readFittedEntriesFromFile().

293 {
294  if(ALIUtils::debug>=9) std::cout << "ExtraEntry::DisplaceOriginalOriginal" << disp <<std::endl;
295  ALIuint entryNo = OptOCurrent()->extraEntryNo( name() );
296 
298 
299 }
static ALIint debug
Definition: ALIUtils.h:35
void displaceExtraEntryOriginalOriginal(const ALIuint entryNo, const ALIdouble disp)
const ALIstring & name() const
Definition: Entry.h:52
const ALIint extraEntryNo(const ALIstring &entry_name) const
tuple cout
Definition: gather_cfg.py:121
OpticalObject * OptOCurrent() const
Definition: Entry.h:61
unsigned int ALIuint
Definition: CocoaGlobals.h:17
void Entry::fill ( const std::vector< ALIstring > &  wordlist)

Definition at line 32 of file Entry.cc.

References ecal_dqm_sourceclient-live_cfg::cerr, gather_cfg::cout, ALIUtils::debug, ALIUtils::dumpVS(), ALIFileIn::ErrorInLine(), cmsRelvalreport::exit, fillFromInputFileQuality(), fillFromInputFileSigma(), fillFromInputFileValue(), fillFromReportOutFileQuality(), fillFromReportOutFileSigma(), fillFromReportOutFileValue(), EntryMgr::findEntryByLongName(), EntryMgr::findEntryByShortName(), statics::fre, GlobalOptionMgr::getGlobalOptionValue(), EntryMgr::getInstance(), GlobalOptionMgr::getInstance(), ALIFileIn::getInstance(), longName(), OpticalObject::longName(), name(), OptOCurrent(), and Model::SDFName().

Referenced by OpticalObject::fillCoordinateEntry(), and OpticalObject::fillExtraEntry().

33 {
34 
35  ALIdouble byshort;
37  gomgr->getGlobalOptionValue("reportOutEntriesByShortName", byshort );
38 
39  //----- Check format of input file
40  if (ALIUtils::debug >=4) std::cout << "@@@ Filling entry: " << name() << std::endl;
41  //--- Check there are 4 attributes
42  if ( wordlist.size() != 4 ) {
44  ALIUtils::dumpVS( wordlist, " !!! Incorrect format for Entry:", std::cerr );
45  std::cerr << std::endl << " There should be four words: name value sigma quality " << std::endl;
46  exit(2);
47  }
48 
49  EntryData* entryData;
50  if( byshort == 0 ) {
52  } else {
54  }
55  if(ALIUtils::debug >= 5) std::cout << " entryData " << entryData << " " << OptOCurrent()->longName() << " " << name() << std::endl;
56 
57  /*t
58  if( name_ == "centre_R" || name_ == "centre_PHI" || name_ == "centre_THE" ){
59  if( EntryMgr::getInstance()->numberOfEntries() > 0 ) {
60  std::cerr << "!!!!FATAL ERROR: Filling entry from 'report.out' while entry is in cylindrical or spherical coordinates is not supported yet. " << OptOCurrent()->name() << " " << name_ << std::endl;
61  abort();
62  }
63  }
64  */
65 
66  ALIdouble fre;
67  gomgr->getGlobalOptionValue("reportOutReadValue", fre );
68  if( entryData != 0 && fre == 1) {
69  // std::cout << OptOCurrent()->name() << " " << name_ << "call fillFromReportOutFileValue " << type_ << std::endl;
70  fillFromReportOutFileValue( entryData );
71  } else {
72  // std::cout << OptOCurrent()->name() << " " << name_ << "call fillFromInputFileValue " << type_ << std::endl;
73  fillFromInputFileValue( wordlist );
74  }
75  gomgr->getGlobalOptionValue("reportOutReadSigma", fre );
76  if( entryData != 0 && fre == 1) {
77  fillFromReportOutFileSigma( entryData );
78  } else {
79  fillFromInputFileSigma( wordlist );
80  }
81  gomgr->getGlobalOptionValue("reportOutReadQuality", fre );
82  if( entryData != 0 && fre == 1) {
83  fillFromReportOutFileQuality( entryData );
84  } else {
85  fillFromInputFileQuality( wordlist );
86  }
87 }
long double ALIdouble
Definition: CocoaGlobals.h:11
static ALIFileIn & getInstance(const ALIstring &name)
Definition: ALIFileIn.cc:23
void fillFromReportOutFileQuality(const EntryData *entryData)
Definition: Entry.cc:235
void fillFromInputFileValue(const std::vector< ALIstring > &wordlist)
Definition: Entry.cc:91
static ALIint debug
Definition: ALIUtils.h:35
static ALIstring & SDFName()
the name of the System Description File
Definition: Model.h:86
static GlobalOptionMgr * getInstance()
EntryData * findEntryByShortName(const ALIstring &optoName, const ALIstring &entryName="")
Definition: EntryMgr.cc:60
int getGlobalOptionValue(const ALIstring &sstr, ALIdouble &val)
--— Search a string in theGlobalOptions and return 1 if found
void fillFromReportOutFileSigma(const EntryData *entryData)
Definition: Entry.cc:218
const ALIstring longName() const
const ALIstring & name() const
Definition: Entry.h:52
tuple fre
Definition: statics.py:6
void fillFromInputFileSigma(const std::vector< ALIstring > &wordlist)
Definition: Entry.cc:121
void ErrorInLine()
Definition: ALIFileIn.cc:204
static EntryMgr * getInstance()
Definition: EntryMgr.cc:17
static void dumpVS(const std::vector< ALIstring > &wl, const std::string &msg, std::ostream &outs=std::cout)
dumps a vector of strings with a message to outs
Definition: ALIUtils.cc:501
void fillFromReportOutFileValue(EntryData *entryData)
Definition: Entry.cc:196
void fillFromInputFileQuality(const std::vector< ALIstring > &wordlist)
Definition: Entry.cc:163
tuple cout
Definition: gather_cfg.py:121
OpticalObject * OptOCurrent() const
Definition: Entry.h:61
EntryData * findEntryByLongName(const ALIstring &optoName, const ALIstring &entryName="")
Definition: EntryMgr.cc:83
const ALIstring longName() const
Definition: Entry.cc:371
void Entry::fillFromInputFileQuality ( const std::vector< ALIstring > &  wordlist)
private

Definition at line 163 of file Entry.cc.

References ecal_dqm_sourceclient-live_cfg::cerr, gather_cfg::cout, ALIUtils::debug, ALIFileIn::ErrorInLine(), cmsRelvalreport::exit, ALIFileIn::getInstance(), name(), OpticalObject::name(), OptOCurrent(), quality_, Model::SDFName(), sigma_, and sigmaOriginalOriginal_.

Referenced by fill().

164 {
165  //---------- set _quality
166  if( wordlist[3] == ALIstring("unk") ) {
167  quality_ = 2;
168  } else if( wordlist[3] == ALIstring("cal") ) {
169  quality_ = 1;
170  //t // for range studies, make all 'cal' entries 'fix'
171  //t ALIdouble rs;
172  //t Model::getGlobalOptionValue("range_studies", rs );
173  //t if(rs == 1) quality_ = 0;
174  } else if( wordlist[3] == ALIstring("fix") ) {
175  quality_ = 0;
176  } else {
178  std::cerr << " quality should be 'unk' or 'cal' or 'fix', instead of " << wordlist[3] << std::endl;
179  exit(3);
180  }
181  //------ If sigma_ = 0 make quality_ 'fix'
182  if( sigma_ == 0) {
183  // std::cout << "SIG=0" << std::endl;
184  quality_ = 0;
185  }
186  if ( ALIUtils::debug >= 4 ) std::cout << OptOCurrent()->name() << " " << name() << " " << sigma_ << "QUALITY:" << quality_ << std::endl;
187 
189 
190 }
static ALIFileIn & getInstance(const ALIstring &name)
Definition: ALIFileIn.cc:23
static ALIint debug
Definition: ALIUtils.h:35
static ALIstring & SDFName()
the name of the System Description File
Definition: Model.h:86
ALIdouble sigmaOriginalOriginal_
Definition: Entry.h:106
ALIuint quality_
Definition: Entry.h:107
const ALIstring & name() const
Definition: Entry.h:52
void ErrorInLine()
Definition: ALIFileIn.cc:204
std::string ALIstring
Definition: CocoaGlobals.h:9
tuple cout
Definition: gather_cfg.py:121
const ALIstring & name() const
Definition: OpticalObject.h:60
ALIdouble sigma_
Definition: Entry.h:105
OpticalObject * OptOCurrent() const
Definition: Entry.h:61
void Entry::fillFromInputFileSigma ( const std::vector< ALIstring > &  wordlist)
private

Definition at line 121 of file Entry.cc.

References ecal_dqm_sourceclient-live_cfg::cerr, gather_cfg::cout, ALIUtils::debug, ALIFileIn::ErrorInLine(), cmsRelvalreport::exit, GlobalOptionMgr::getGlobalOptionValue(), ParameterMgr::getInstance(), GlobalOptionMgr::getInstance(), ALIFileIn::getInstance(), ParameterMgr::getParameterValue(), ALIUtils::IsNumber(), Model::SDFName(), sigma_, SigmaDimensionFactor(), and sigmaOriginalOriginal_.

Referenced by fill().

122 {
123 
125  //---------- translate parameter used for sigma_
126  /* ALIdouble sig;
127  char** endptr;
128  sig = strtod( wordlist[2].c_str(), endptr );
129  // ALIint isNumber = sscanf(wordlist[2].c_str(),"%f",sig);
130  if ( *endptr == wordlist[2].c_str() ) {
131  // if ( !isNumber ) { */
132  ALIdouble sig = 0.;
133  if ( !ALIUtils::IsNumber( wordlist[2] ) ) {
134  if ( parmgr->getParameterValue( wordlist[2], sig ) == 0 ) {
136  // std::cerr << "!!! parameter for sigma not found: " << wordlist[2].c_str() << std::endl;
137  std::cerr << "!!! parameter for sigma not found: " << wordlist[0] << " " << wordlist[1] << " " << wordlist[2] << std::endl;
138  exit(2);
139  }
140  //d sig *= SigmaDimensionFactor();
141  //- std::cout << sig<< " valueparam " << wordlist[2] << std::endl;
142  } else {
143  //d sig = DimensionMgr()::getInstance()->extractValue( wordlist[2], ValueDimensionFactor() );
144  sig = atof( wordlist[2].c_str() );
145  // for range studies, make all 'cal' entries 'fix'
146  ALIdouble rs;
148  gomgr->getGlobalOptionValue("range_studies", rs );
149  if(rs == 1) sig *= 1.E-6;
150 
151  //- std::cout << sig << " valuem " << wordlist[2] << std::endl;
152  }
153  sig *= SigmaDimensionFactor();
154  if (ALIUtils::debug >= 4) {
155  std::cout << "SIGMA = " << sig << " (SigmaDimensionFactor= " << SigmaDimensionFactor() << std::endl;
156  }
157  sigma_ = sig;
159 
160 }
long double ALIdouble
Definition: CocoaGlobals.h:11
static ALIFileIn & getInstance(const ALIstring &name)
Definition: ALIFileIn.cc:23
static ParameterMgr * getInstance()
Definition: ParameterMgr.cc:19
static ALIint debug
Definition: ALIUtils.h:35
static ALIstring & SDFName()
the name of the System Description File
Definition: Model.h:86
static GlobalOptionMgr * getInstance()
ALIint getParameterValue(const ALIstring &name, ALIdouble &val)
int getGlobalOptionValue(const ALIstring &sstr, ALIdouble &val)
--— Search a string in theGlobalOptions and return 1 if found
static int IsNumber(const ALIstring &str)
Definition: ALIUtils.cc:34
virtual ALIdouble SigmaDimensionFactor() const
Definition: Entry.h:38
ALIdouble sigmaOriginalOriginal_
Definition: Entry.h:106
void ErrorInLine()
Definition: ALIFileIn.cc:204
tuple cout
Definition: gather_cfg.py:121
ALIdouble sigma_
Definition: Entry.h:105
void Entry::fillFromInputFileValue ( const std::vector< ALIstring > &  wordlist)
private

Definition at line 91 of file Entry.cc.

References ecal_dqm_sourceclient-live_cfg::cerr, gather_cfg::cout, ALIUtils::debug, ALIFileIn::ErrorInLine(), cmsRelvalreport::exit, ParameterMgr::getInstance(), ALIFileIn::getInstance(), ParameterMgr::getParameterValue(), ALIUtils::IsNumber(), Model::SDFName(), value_, ValueDimensionFactor(), and valueOriginalOriginal_.

Referenced by fill().

92 {
93 
94  //- ALIUtils::dumpVS( wordlist, " fillFromInputFileValue " ); //-
96  //---------- Translate parameter used for value_
97  ALIdouble val = 0.;
98  if ( !ALIUtils::IsNumber( wordlist[1] ) ) {
99  if ( parmgr->getParameterValue( wordlist[1], val ) == 0 ) {
101  std::cerr << "!!! parameter for value not found: " << wordlist[1].c_str() << std::endl;
102  exit(2);
103  }
104  //d val *= ValueDimensionFactor();
105  } else {
106  //d val = DimensionMgr()::getInstance()->extractValue( wordlist[1], ValueDimensionFactor() );
107  val = atof( wordlist[1].c_str() );
108  }
109  val *= ValueDimensionFactor();
110  if ( ALIUtils::debug >= 4 ) {
111  std::cout << "VALUE = " << val << " (ValueDimensionFactor= " << ValueDimensionFactor() <<std::endl;
112  }
113 
114  value_ = val;
116 
117 
118 }
long double ALIdouble
Definition: CocoaGlobals.h:11
static ALIFileIn & getInstance(const ALIstring &name)
Definition: ALIFileIn.cc:23
ALIdouble value_
Definition: Entry.h:103
static ParameterMgr * getInstance()
Definition: ParameterMgr.cc:19
static ALIint debug
Definition: ALIUtils.h:35
static ALIstring & SDFName()
the name of the System Description File
Definition: Model.h:86
ALIint getParameterValue(const ALIstring &name, ALIdouble &val)
static int IsNumber(const ALIstring &str)
Definition: ALIUtils.cc:34
ALIdouble valueOriginalOriginal_
Definition: Entry.h:104
void ErrorInLine()
Definition: ALIFileIn.cc:204
virtual ALIdouble ValueDimensionFactor() const
Definition: Entry.h:37
tuple cout
Definition: gather_cfg.py:121
void Entry::fillFromReportOutFileQuality ( const EntryData entryData)
private

Definition at line 235 of file Entry.cc.

References EntryData::quality(), and quality_.

Referenced by fill().

236 {
237  quality_ = entryData->quality();
238 }
ALIuint quality_
Definition: Entry.h:107
ALIint quality() const
Definition: EntryData.h:34
void Entry::fillFromReportOutFileSigma ( const EntryData entryData)
private

Definition at line 218 of file Entry.cc.

References EntryMgr::getDimOutAngleSig(), EntryMgr::getDimOutLengthSig(), EntryMgr::getInstance(), EntryData::sigma(), sigma_, sigmaOriginalOriginal_, and type_.

Referenced by fill().

219 {
220  sigma_ = entryData->sigma();
221  //---- For extra entries, value is not in proper units, as the 'report.out' file does not have the type (length/angle/nodim)
222  EntryMgr* entryMgr = EntryMgr::getInstance();
223  if( type_ == "centre" || type_ == "length" ) {
224  sigma_ *= entryMgr->getDimOutLengthSig();
225  //- std::cout << " fillFromReportOut " << value_ << " +- " << sigma_ << std::endl;
226  }else if( type_ == "angles" || type_ == "angle" ) {
227  sigma_ *= entryMgr->getDimOutAngleSig();
228  }
229 
231 
232 }
ALIstring type_
Definition: Entry.h:102
ALIdouble getDimOutLengthSig() const
Definition: EntryMgr.h:26
ALIdouble sigma() const
Definition: EntryData.h:33
ALIdouble sigmaOriginalOriginal_
Definition: Entry.h:106
ALIdouble getDimOutAngleSig() const
Definition: EntryMgr.h:30
static EntryMgr * getInstance()
Definition: EntryMgr.cc:17
ALIdouble sigma_
Definition: Entry.h:105
void Entry::fillFromReportOutFileValue ( EntryData entryData)
private

Definition at line 196 of file Entry.cc.

References gather_cfg::cout, ALIUtils::debug, EntryMgr::getDimOutAngleVal(), EntryMgr::getDimOutLengthVal(), EntryMgr::getInstance(), name(), OpticalObject::name(), OptOCurrent(), EntryData::setValueDisplacement(), type_, value_, EntryData::valueDisplacement(), EntryData::valueOriginal(), and valueOriginalOriginal_.

Referenced by fill().

197 {
198  value_ = entryData->valueOriginal();
199  //---- For extra entries, value is not in proper units, as the 'report.out' file does not have the type (length/angle/nodim)
200  EntryMgr* entryMgr = EntryMgr::getInstance();
201  //- std::cout << OptOCurrent()->name() << " " << name_ << " fillFromReportOutFileValue " << type_ << std::endl;
202  if( type_ == "centre" || type_ == "length" ) {
203  value_ *= entryMgr->getDimOutLengthVal();
204  //set valueDisp as it will be used to displace entries
205  entryData->setValueDisplacement( entryData->valueDisplacement() * entryMgr->getDimOutLengthVal());
206  if(ALIUtils::debug >= 5) std::cout << " fillFromReportOut " << OptOCurrent()->name() << " " << name() << "" << value_ << " disp " << entryData->valueDisplacement() * entryMgr->getDimOutLengthVal() << std::endl;
207  }else if( type_ == "angles" || type_ == "angle" ) {
208  value_ *= entryMgr->getDimOutAngleVal();
209  entryData->setValueDisplacement( entryData->valueDisplacement() * entryMgr->getDimOutAngleVal());
210  if(ALIUtils::debug >= 5) std::cout << " fillFromReportOut " << OptOCurrent()->name() << " " << name() << "" << value_ << " disp " << entryData->valueDisplacement() * entryMgr->getDimOutAngleVal() << std::endl;
211  }
212 
214 
215 }
ALIstring type_
Definition: Entry.h:102
ALIdouble getDimOutAngleVal() const
Definition: EntryMgr.h:28
ALIdouble value_
Definition: Entry.h:103
void setValueDisplacement(const ALIdouble val)
Definition: EntryData.h:35
static ALIint debug
Definition: ALIUtils.h:35
ALIdouble getDimOutLengthVal() const
Definition: EntryMgr.h:24
ALIdouble valueOriginal() const
Definition: EntryData.h:31
ALIdouble valueOriginalOriginal_
Definition: Entry.h:104
const ALIstring & name() const
Definition: Entry.h:52
static EntryMgr * getInstance()
Definition: EntryMgr.cc:17
tuple cout
Definition: gather_cfg.py:121
const ALIstring & name() const
Definition: OpticalObject.h:60
OpticalObject * OptOCurrent() const
Definition: Entry.h:61
ALIdouble valueDisplacement() const
Definition: EntryData.h:32
void Entry::fillName ( const ALIstring name)
virtual

Definition at line 243 of file Entry.cc.

References setName().

Referenced by OpticalObject::fillCoordinateEntry(), OpticalObject::fillExtraEntry(), and OpticalObject::setAnglesNull().

244 {
245  setName( name );
246 }
void setName(const ALIstring &name)
Definition: Entry.h:75
const ALIstring & name() const
Definition: Entry.h:52
void Entry::fillNull ( )

Definition at line 251 of file Entry.cc.

References quality_, sigma_, sigmaOriginalOriginal_, value_, and valueOriginalOriginal_.

Referenced by OpticalObject::setAnglesNull().

252 {
253  //- fillName( name );
254  value_ = 0.;
256  sigma_ = 0.;
258  quality_ = 0;
259 
260 }
ALIdouble value_
Definition: Entry.h:103
ALIdouble valueOriginalOriginal_
Definition: Entry.h:104
ALIdouble sigmaOriginalOriginal_
Definition: Entry.h:106
ALIuint quality_
Definition: Entry.h:107
ALIdouble sigma_
Definition: Entry.h:105
ALIint Entry::fitPos ( ) const
inline

Definition at line 60 of file Entry.h.

References fitPos_.

Referenced by Fit::dumpEntryAfterFit(), CocoaDBMgr::GetEntryError(), and Fit::setCorrelationFromParamFitted().

60 { return fitPos_; }
ALIint fitPos_
Definition: Entry.h:109
EntryDim Entry::getDimType ( ) const
inline

Definition at line 86 of file Entry.h.

References theDimType.

86 { return theDimType;}
EntryDim theDimType
Definition: Entry.h:119
ALIdouble Entry::lastAdditionToValueDisplacementByFitting ( ) const
inline

Definition at line 68 of file Entry.h.

References lastAdditionToValueDisplacementByFitting_.

68  {
ALIdouble lastAdditionToValueDisplacementByFitting_
Definition: Entry.h:112
const ALIstring Entry::longName ( ) const

Definition at line 371 of file Entry.cc.

References OpticalObject::name(), name_, and OptOCurrent_.

Referenced by fill().

372 {
373  return OptOCurrent_->name()+"/"+name_;
374 }
OpticalObject * OptOCurrent_
Definition: Entry.h:108
ALIstring name_
Definition: Entry.h:101
const ALIstring & name() const
Definition: OpticalObject.h:60
const ALIstring& Entry::name ( ) const
inline
OpticalObject* Entry::OptOCurrent ( ) const
inline
virtual ALIdouble Entry::OutputSigmaDimensionFactor ( ) const
inlinevirtual

Reimplemented in EntryLength, and EntryAngle.

Definition at line 40 of file Entry.h.

Referenced by Fit::dumpEntryAfterFit(), and FittedEntry::FittedEntry().

40 { return 1.; }
virtual ALIdouble Entry::OutputValueDimensionFactor ( ) const
inlinevirtual

Reimplemented in EntryLength, and EntryAngle.

Definition at line 39 of file Entry.h.

Referenced by Fit::dumpEntryAfterFit(), FittedEntry::FittedEntry(), and Fit::getEntryValue().

39 { return 1.; }
ALIint Entry::quality ( ) const
inline
void Entry::resetValueDisplacementByFitting ( )

Definition at line 351 of file Entry.cc.

References valueDisplacementByFitting_.

352 {
354 }
ALIdouble valueDisplacementByFitting_
Definition: Entry.h:111
void Entry::setFitPos ( const ALIint  fitpos)
inline

Definition at line 80 of file Entry.h.

References fitPos_.

80 { fitPos_ = fitpos; }
ALIint fitPos_
Definition: Entry.h:109
void Entry::setLastAdditionToValueDisplacementByFitting ( const ALIdouble  val)
inline

Definition at line 70 of file Entry.h.

References lastAdditionToValueDisplacementByFitting_.

70  {
ALIdouble lastAdditionToValueDisplacementByFitting_
Definition: Entry.h:112
void Entry::setName ( const ALIstring name)
inline

Definition at line 75 of file Entry.h.

References name(), and name_.

Referenced by Vispa.Gui.PortWidget.PortWidget::__init__(), Vispa.Views.PropertyView.Property::__init__(), EntryAngleAffAngles::FillName(), EntryLengthAffCentre::FillName(), and fillName().

75 { name_ = name; }
const ALIstring & name() const
Definition: Entry.h:52
ALIstring name_
Definition: Entry.h:101
void Entry::setOptOCurrent ( OpticalObject opto)
inline

Definition at line 81 of file Entry.h.

References OptOCurrent_.

Referenced by OpticalObject::fillCoordinateEntry(), OpticalObject::fillExtraEntry(), and OpticalObject::setAnglesNull().

81 { OptOCurrent_ = opto; }
OpticalObject * OptOCurrent_
Definition: Entry.h:108
void Entry::setQuality ( ALIuint  qual)
inline

Definition at line 79 of file Entry.h.

References quality_.

79 { quality_ = qual; }
ALIuint quality_
Definition: Entry.h:107
void Entry::setSigma ( ALIdouble  sig)
inline

Definition at line 78 of file Entry.h.

References sigma_.

Referenced by FittedEntriesReader::readFittedEntriesFromFile().

78 { sigma_ = sig; }
ALIdouble sigma_
Definition: Entry.h:105
void Entry::setType ( ALIstring  type)
inline

Definition at line 76 of file Entry.h.

References type(), and type_.

76 { type_ = type; }
ALIstring type_
Definition: Entry.h:102
const ALIstring & type() const
Definition: Entry.h:54
void Entry::setValue ( ALIdouble  val)
inline
ALIdouble Entry::sigma ( ) const
inline

Definition at line 57 of file Entry.h.

References sigma_.

Referenced by OpticalObject::buildWordList(), Fit::dumpEntryAfterFit(), FittedEntry::FittedEntry(), CocoaDBMgr::GetEntryError(), and CocoaToDDLMgr::specPar().

57 { return sigma_; }
ALIdouble sigma_
Definition: Entry.h:105
virtual ALIdouble Entry::SigmaDimensionFactor ( ) const
inlinevirtual

Reimplemented in EntryLength, EntryAngle, and EntryNoDim.

Definition at line 38 of file Entry.h.

Referenced by OpticalObject::buildWordList(), and fillFromInputFileSigma().

38 { return 1.; }
ALIdouble Entry::sigmaOriginalOriginal ( ) const
inline

Definition at line 58 of file Entry.h.

References sigmaOriginalOriginal_.

58 { return sigmaOriginalOriginal_; }
ALIdouble sigmaOriginalOriginal_
Definition: Entry.h:106
virtual ALIdouble Entry::startingDisplacement ( )
inlinevirtual

Reimplemented in EntryLength, EntryAngle, and EntryNoDim.

Definition at line 67 of file Entry.h.

Referenced by Measurement::DerivativeRespectEntry().

67 { return 0.; };
void Entry::substractToHalfFittedDisplacementToValue ( )

Definition at line 330 of file Entry.cc.

References addFittedDisplacementToValue(), and lastAdditionToValueDisplacementByFitting_.

331 {
333  // addFittedDisplacementToValue( -1.01*theLastAdditionToValueDisplacementByFitting );
334  //addFittedDisplacementToValue( -theLastAdditionToValueDisplacementByFitting );
336  // addFittedDisplacementToValue( 0. );
337 
338 }
void addFittedDisplacementToValue(const ALIdouble val)
Definition: Entry.cc:313
ALIdouble lastAdditionToValueDisplacementByFitting_
Definition: Entry.h:112
const ALIstring& Entry::type ( ) const
inline
ALIdouble Entry::value ( ) const
inline
virtual ALIdouble Entry::ValueDimensionFactor ( ) const
inlinevirtual

Reimplemented in EntryLength, EntryAngle, and EntryNoDim.

Definition at line 37 of file Entry.h.

Referenced by OpticalObject::buildWordList(), OpticalObject::fillExtraEntry(), and fillFromInputFileValue().

37 { return 1.; }
ALIdouble Entry::valueDisplaced ( ) const
virtual

Reimplemented in EntryLengthAffCentre, and EntryAngleAffAngles.

Definition at line 342 of file Entry.cc.

References gather_cfg::cout, ALIUtils::debug, OpticalObject::extraEntryNo(), OpticalObject::ExtraEntryValueList(), OpticalObject::ExtraEntryValueOriginalList(), name(), OpticalObject::name(), and OptOCurrent().

Referenced by MeasurementDiffEntry::calculateSimulatedValue().

343 {
344  ALIuint entryNo = OptOCurrent()->extraEntryNo( name() );
345  if(ALIUtils::debug >= 5) std::cout << entryNo << " Entry::valueDisplaced " << name() << " in " << OptOCurrent()->name()
346  << " orig " << OptOCurrent()->ExtraEntryValueOriginalList()[entryNo] << " new " << OptOCurrent()->ExtraEntryValueList()[entryNo] << std::endl;
347  return OptOCurrent()->ExtraEntryValueList()[entryNo] - OptOCurrent()->ExtraEntryValueOriginalList()[entryNo];
348 }
const std::vector< ALIdouble > & ExtraEntryValueOriginalList()
Definition: OpticalObject.h:77
std::vector< ALIdouble > & ExtraEntryValueList()
Definition: OpticalObject.h:73
static ALIint debug
Definition: ALIUtils.h:35
const ALIstring & name() const
Definition: Entry.h:52
const ALIint extraEntryNo(const ALIstring &entry_name) const
tuple cout
Definition: gather_cfg.py:121
const ALIstring & name() const
Definition: OpticalObject.h:60
OpticalObject * OptOCurrent() const
Definition: Entry.h:61
unsigned int ALIuint
Definition: CocoaGlobals.h:17
ALIdouble Entry::valueDisplacementByFitting ( ) const
inline

Definition at line 63 of file Entry.h.

References valueDisplacementByFitting_.

Referenced by Fit::dumpEntryAfterFit(), FittedEntry::FittedEntry(), OpticalObject::getEntryCentre(), OpticalObject::getEntryRMangle(), and Fit::getEntryValue().

63  {
64  //- cout << this << " " << name() << " get valueDisplacementByFitting " << theValueDisplacementByFitting << endl;
ALIdouble valueDisplacementByFitting_
Definition: Entry.h:111
virtual ALIdouble Entry::valueInGlobalReferenceFrame ( ) const
inlinevirtual

Reimplemented in EntryLengthAffCentre.

Definition at line 49 of file Entry.h.

References value().

49 {return value();};
ALIdouble value() const
Definition: Entry.h:55
ALIdouble Entry::valueOriginalOriginal ( ) const
inline

Definition at line 56 of file Entry.h.

References valueOriginalOriginal_.

56 { return valueOriginalOriginal_; }
ALIdouble valueOriginalOriginal_
Definition: Entry.h:104

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const Entry c 
)
friend

Definition at line 357 of file Entry.cc.

358 {
359 
360  os << "ENTRY: " << c.name() << " of type: " << c.type() << std::endl
361  << " value " << c.value_ << " original " << c.valueOriginalOriginal_ << std::endl
362  << " sigma " << c.sigma_ << " original " << c.sigmaOriginalOriginal_ << std::endl
363  << " quality " << c.quality_ << " opto " << (c.OptOCurrent_)->name() << std::endl
364  << " fitpos " << c.fitPos_ << " valueDisplacementByFitting " << c.valueDisplacementByFitting_ << " lastAdditionToValueDisplacementByFitting " << c.lastAdditionToValueDisplacementByFitting_ << std::endl;
365 
366  return os;
367 
368 }
const ALIstring & type() const
Definition: Entry.h:54
ALIdouble value_
Definition: Entry.h:103
OpticalObject * OptOCurrent_
Definition: Entry.h:108
ALIdouble valueOriginalOriginal_
Definition: Entry.h:104
ALIdouble sigmaOriginalOriginal_
Definition: Entry.h:106
ALIdouble lastAdditionToValueDisplacementByFitting_
Definition: Entry.h:112
ALIuint quality_
Definition: Entry.h:107
const ALIstring & name() const
Definition: Entry.h:52
ALIdouble valueDisplacementByFitting_
Definition: Entry.h:111
ALIint fitPos_
Definition: Entry.h:109
ALIdouble sigma_
Definition: Entry.h:105

Member Data Documentation

ALIint Entry::fitPos_
protected

Definition at line 109 of file Entry.h.

Referenced by fitPos(), operator<<(), and setFitPos().

ALIdouble Entry::lastAdditionToValueDisplacementByFitting_
protected
ALIstring Entry::name_
protected
OpticalObject* Entry::OptOCurrent_
protected

Definition at line 108 of file Entry.h.

Referenced by longName(), operator<<(), OptOCurrent(), and setOptOCurrent().

ALIuint Entry::quality_
protected
ALIdouble Entry::sigma_
protected
ALIdouble Entry::sigmaOriginalOriginal_
protected
EntryDim Entry::theDimType
protected
ALIstring Entry::type_
protected
ALIdouble Entry::value_
protected
ALIdouble Entry::valueDisplacementByFitting_
protected
ALIdouble Entry::valueOriginalOriginal_
protected