CMS 3D CMS Logo

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_.

Referenced by empty().

22  : type_(type), fitPos_(-1) {
23  // std::cout << "entry" << std::endl;
24  //---------- Set displacement by fitting to zero
26  if (ALIUtils::debug >= 5)
27  std::cout << this << " theValueDisplacementByFitting set " << valueDisplacementByFitting_ << std::endl;
28 }
type
Definition: HCALResponse.h:21
ALIstring type_
Definition: Entry.h:103
static ALIint debug
Definition: ALIUtils.h:34
ALIdouble valueDisplacementByFitting_
Definition: Entry.h:112
ALIint fitPos_
Definition: Entry.h:110
Entry::~Entry ( )
virtual

Definition at line 280 of file Entry.cc.

280 {}

Member Function Documentation

void Entry::addFittedDisplacementToValue ( const ALIdouble  val)

Definition at line 286 of file Entry.cc.

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

Referenced by setOptOCurrent(), and substractToHalfFittedDisplacementToValue().

286  {
289  if (ALIUtils::debug >= 3)
290  std::cout << OptOCurrent()->name() << " " << name() << " Entry::addFittedDisplacementToValue " << val
291  << " total= " << valueDisplacementByFitting_ << std::endl;
292 
293  //---------- Displace original centre, rotation matrix, ...
296 }
void resetGlobalCoordinates()
virtual void displaceOriginal(ALIdouble disp)
Definition: Entry.cc:258
static ALIint debug
Definition: ALIUtils.h:34
ALIdouble lastAdditionToValueDisplacementByFitting_
Definition: Entry.h:113
const ALIstring & name() const
Definition: Entry.h:50
ALIdouble valueDisplacementByFitting_
Definition: Entry.h:112
const ALIstring & name() const
Definition: OpticalObject.h:58
OpticalObject * OptOCurrent() const
Definition: Entry.h:59
void Entry::displace ( ALIdouble  disp)
virtual

Reimplemented in EntryAngleAffAngles, and EntryLengthAffCentre.

Definition at line 247 of file Entry.cc.

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

Referenced by Measurement::DerivativeRespectEntry(), and OutputSigmaDimensionFactor().

247  {
248  if (ALIUtils::debug >= 9)
249  std::cout << "ExtraEntry::Displace" << disp << std::endl;
250  ALIuint entryNo = OptOCurrent()->extraEntryNo(name());
251 
252  OptOCurrent()->displaceExtraEntry(entryNo, disp);
253 }
static ALIint debug
Definition: ALIUtils.h:34
const ALIstring & name() const
Definition: Entry.h:50
const ALIint extraEntryNo(const ALIstring &entry_name) const
void displaceExtraEntry(const ALIuint entryNo, const ALIdouble disp)
OpticalObject * OptOCurrent() const
Definition: Entry.h:59
unsigned int ALIuint
Definition: CocoaGlobals.h:17
void Entry::displaceOriginal ( ALIdouble  disp)
virtual

Reimplemented in EntryAngleAffAngles, and EntryLengthAffCentre.

Definition at line 258 of file Entry.cc.

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

Referenced by addFittedDisplacementToValue(), and OutputSigmaDimensionFactor().

258  {
259  if (ALIUtils::debug >= 9)
260  std::cout << "ExtraEntry::DisplaceOriginal" << disp << std::endl;
261  ALIuint entryNo = OptOCurrent()->extraEntryNo(name());
262 
263  OptOCurrent()->displaceExtraEntryOriginal(entryNo, disp);
264 }
void displaceExtraEntryOriginal(const ALIuint entryNo, const ALIdouble disp)
static ALIint debug
Definition: ALIUtils.h:34
const ALIstring & name() const
Definition: Entry.h:50
const ALIint extraEntryNo(const ALIstring &entry_name) const
OpticalObject * OptOCurrent() const
Definition: Entry.h:59
unsigned int ALIuint
Definition: CocoaGlobals.h:17
void Entry::displaceOriginalOriginal ( ALIdouble  disp)
virtual

Reimplemented in EntryAngleAffAngles, and EntryLengthAffCentre.

Definition at line 269 of file Entry.cc.

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

Referenced by OutputSigmaDimensionFactor(), and FittedEntriesReader::readFittedEntriesFromFile().

269  {
270  if (ALIUtils::debug >= 9)
271  std::cout << "ExtraEntry::DisplaceOriginalOriginal" << disp << std::endl;
272  ALIuint entryNo = OptOCurrent()->extraEntryNo(name());
273 
275 }
static ALIint debug
Definition: ALIUtils.h:34
void displaceExtraEntryOriginalOriginal(const ALIuint entryNo, const ALIdouble disp)
const ALIstring & name() const
Definition: Entry.h:50
const ALIint extraEntryNo(const ALIstring &entry_name) const
OpticalObject * OptOCurrent() const
Definition: Entry.h:59
unsigned int ALIuint
Definition: CocoaGlobals.h:17
void Entry::fill ( const std::vector< ALIstring > &  wordlist)

Definition at line 31 of file Entry.cc.

References beam_dqm_sourceclient-live_cfg::cerr, gather_cfg::cout, ALIUtils::debug, ALIUtils::dumpVS(), ALIFileIn::ErrorInLine(), beamvalidation::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().

31  {
32  ALIdouble byshort;
34  gomgr->getGlobalOptionValue("reportOutEntriesByShortName", byshort);
35 
36  //----- Check format of input file
37  if (ALIUtils::debug >= 4)
38  std::cout << "@@@ Filling entry: " << name() << std::endl;
39  //--- Check there are 4 attributes
40  if (wordlist.size() != 4) {
42  ALIUtils::dumpVS(wordlist, " !!! Incorrect format for Entry:", std::cerr);
43  std::cerr << std::endl << " There should be four words: name value sigma quality " << std::endl;
44  exit(2);
45  }
46 
47  EntryData* entryData;
48  if (byshort == 0) {
50  } else {
52  }
53  if (ALIUtils::debug >= 5)
54  std::cout << " entryData " << entryData << " " << OptOCurrent()->longName() << " " << name() << std::endl;
55 
56  /*t
57  if( name_ == "centre_R" || name_ == "centre_PHI" || name_ == "centre_THE" ){
58  if( EntryMgr::getInstance()->numberOfEntries() > 0 ) {
59  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;
60  abort();
61  }
62  }
63  */
64 
65  ALIdouble fre;
66  gomgr->getGlobalOptionValue("reportOutReadValue", fre);
67  if (entryData != nullptr && fre == 1) {
68  // std::cout << OptOCurrent()->name() << " " << name_ << "call fillFromReportOutFileValue " << type_ << std::endl;
69  fillFromReportOutFileValue(entryData);
70  } else {
71  // std::cout << OptOCurrent()->name() << " " << name_ << "call fillFromInputFileValue " << type_ << std::endl;
72  fillFromInputFileValue(wordlist);
73  }
74  gomgr->getGlobalOptionValue("reportOutReadSigma", fre);
75  if (entryData != nullptr && fre == 1) {
76  fillFromReportOutFileSigma(entryData);
77  } else {
78  fillFromInputFileSigma(wordlist);
79  }
80  gomgr->getGlobalOptionValue("reportOutReadQuality", fre);
81  if (entryData != nullptr && fre == 1) {
83  } else {
84  fillFromInputFileQuality(wordlist);
85  }
86 }
long double ALIdouble
Definition: CocoaGlobals.h:11
static ALIFileIn & getInstance(const ALIstring &name)
Definition: ALIFileIn.cc:22
void fillFromReportOutFileQuality(const EntryData *entryData)
Definition: Entry.cc:225
void fillFromInputFileValue(const std::vector< ALIstring > &wordlist)
Definition: Entry.cc:89
static ALIint debug
Definition: ALIUtils.h:34
static ALIstring & SDFName()
the name of the System Description File
Definition: Model.h:93
static GlobalOptionMgr * getInstance()
EntryData * findEntryByShortName(const ALIstring &optoName, const ALIstring &entryName="")
Definition: EntryMgr.cc:58
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:210
const ALIstring longName() const
const ALIstring & name() const
Definition: Entry.h:50
void fillFromInputFileSigma(const std::vector< ALIstring > &wordlist)
Definition: Entry.cc:114
void ErrorInLine()
Definition: ALIFileIn.cc:196
static EntryMgr * getInstance()
Definition: EntryMgr.cc:16
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:465
void fillFromReportOutFileValue(EntryData *entryData)
Definition: Entry.cc:186
void fillFromInputFileQuality(const std::vector< ALIstring > &wordlist)
Definition: Entry.cc:155
OpticalObject * OptOCurrent() const
Definition: Entry.h:59
EntryData * findEntryByLongName(const ALIstring &optoName, const ALIstring &entryName="")
Definition: EntryMgr.cc:82
const ALIstring longName() const
Definition: Entry.cc:336
def exit(msg="")
void Entry::fillFromInputFileQuality ( const std::vector< ALIstring > &  wordlist)
private

Definition at line 155 of file Entry.cc.

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

Referenced by fill(), and getDimType().

155  {
156  //---------- set _quality
157  if (wordlist[3] == ALIstring("unk")) {
158  quality_ = 2;
159  } else if (wordlist[3] == ALIstring("cal")) {
160  quality_ = 1;
161  //t // for range studies, make all 'cal' entries 'fix'
162  //t ALIdouble rs;
163  //t Model::getGlobalOptionValue("range_studies", rs );
164  //t if(rs == 1) quality_ = 0;
165  } else if (wordlist[3] == ALIstring("fix")) {
166  quality_ = 0;
167  } else {
169  std::cerr << " quality should be 'unk' or 'cal' or 'fix', instead of " << wordlist[3] << std::endl;
170  exit(3);
171  }
172  //------ If sigma_ = 0 make quality_ 'fix'
173  if (sigma_ == 0) {
174  // std::cout << "SIG=0" << std::endl;
175  quality_ = 0;
176  }
177  if (ALIUtils::debug >= 4)
178  std::cout << OptOCurrent()->name() << " " << name() << " " << sigma_ << "QUALITY:" << quality_ << std::endl;
179 
181 }
static ALIFileIn & getInstance(const ALIstring &name)
Definition: ALIFileIn.cc:22
static ALIint debug
Definition: ALIUtils.h:34
static ALIstring & SDFName()
the name of the System Description File
Definition: Model.h:93
ALIdouble sigmaOriginalOriginal_
Definition: Entry.h:107
ALIuint quality_
Definition: Entry.h:108
const ALIstring & name() const
Definition: Entry.h:50
void ErrorInLine()
Definition: ALIFileIn.cc:196
std::string ALIstring
Definition: CocoaGlobals.h:9
const ALIstring & name() const
Definition: OpticalObject.h:58
ALIdouble sigma_
Definition: Entry.h:106
OpticalObject * OptOCurrent() const
Definition: Entry.h:59
def exit(msg="")
void Entry::fillFromInputFileSigma ( const std::vector< ALIstring > &  wordlist)
private

Definition at line 114 of file Entry.cc.

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

Referenced by fill(), and getDimType().

114  {
116  //---------- translate parameter used for sigma_
117  /* ALIdouble sig;
118  char** endptr;
119  sig = strtod( wordlist[2].c_str(), endptr );
120  // ALIint isNumber = sscanf(wordlist[2].c_str(),"%f",sig);
121  if ( *endptr == wordlist[2].c_str() ) {
122  // if ( !isNumber ) { */
123  ALIdouble sig = 0.;
124  if (!ALIUtils::IsNumber(wordlist[2])) {
125  if (parmgr->getParameterValue(wordlist[2], sig) == 0) {
127  // std::cerr << "!!! parameter for sigma not found: " << wordlist[2].c_str() << std::endl;
128  std::cerr << "!!! parameter for sigma not found: " << wordlist[0] << " " << wordlist[1] << " " << wordlist[2]
129  << std::endl;
130  exit(2);
131  }
132  //d sig *= SigmaDimensionFactor();
133  //- std::cout << sig<< " valueparam " << wordlist[2] << std::endl;
134  } else {
135  //d sig = DimensionMgr()::getInstance()->extractValue( wordlist[2], ValueDimensionFactor() );
136  sig = atof(wordlist[2].c_str());
137  // for range studies, make all 'cal' entries 'fix'
138  ALIdouble rs;
140  gomgr->getGlobalOptionValue("range_studies", rs);
141  if (rs == 1)
142  sig *= 1.E-6;
143 
144  //- std::cout << sig << " valuem " << wordlist[2] << std::endl;
145  }
146  sig *= SigmaDimensionFactor();
147  if (ALIUtils::debug >= 4) {
148  std::cout << "SIGMA = " << sig << " (SigmaDimensionFactor= " << SigmaDimensionFactor() << std::endl;
149  }
150  sigma_ = sig;
152 }
long double ALIdouble
Definition: CocoaGlobals.h:11
static ALIFileIn & getInstance(const ALIstring &name)
Definition: ALIFileIn.cc:22
static ParameterMgr * getInstance()
Definition: ParameterMgr.cc:18
static ALIint debug
Definition: ALIUtils.h:34
static ALIstring & SDFName()
the name of the System Description File
Definition: Model.h:93
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:33
virtual ALIdouble SigmaDimensionFactor() const
Definition: Entry.h:36
ALIdouble sigmaOriginalOriginal_
Definition: Entry.h:107
void ErrorInLine()
Definition: ALIFileIn.cc:196
ALIdouble sigma_
Definition: Entry.h:106
def exit(msg="")
void Entry::fillFromInputFileValue ( const std::vector< ALIstring > &  wordlist)
private

Definition at line 89 of file Entry.cc.

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

Referenced by fill(), and getDimType().

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

Definition at line 225 of file Entry.cc.

References EntryData::quality(), and quality_.

Referenced by fill(), and getDimType().

225 { quality_ = entryData->quality(); }
ALIuint quality_
Definition: Entry.h:108
ALIint quality() const
Definition: EntryData.h:33
void Entry::fillFromReportOutFileSigma ( const EntryData entryData)
private

Definition at line 210 of file Entry.cc.

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

Referenced by fill(), and getDimType().

210  {
211  sigma_ = entryData->sigma();
212  //---- For extra entries, value is not in proper units, as the 'report.out' file does not have the type (length/angle/nodim)
213  EntryMgr* entryMgr = EntryMgr::getInstance();
214  if (type_ == "centre" || type_ == "length") {
215  sigma_ *= entryMgr->getDimOutLengthSig();
216  //- std::cout << " fillFromReportOut " << value_ << " +- " << sigma_ << std::endl;
217  } else if (type_ == "angles" || type_ == "angle") {
218  sigma_ *= entryMgr->getDimOutAngleSig();
219  }
220 
222 }
ALIstring type_
Definition: Entry.h:103
ALIdouble getDimOutLengthSig() const
Definition: EntryMgr.h:24
ALIdouble sigma() const
Definition: EntryData.h:32
ALIdouble sigmaOriginalOriginal_
Definition: Entry.h:107
ALIdouble getDimOutAngleSig() const
Definition: EntryMgr.h:26
static EntryMgr * getInstance()
Definition: EntryMgr.cc:16
ALIdouble sigma_
Definition: Entry.h:106
void Entry::fillFromReportOutFileValue ( EntryData entryData)
private

Definition at line 186 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(), and getDimType().

186  {
187  value_ = entryData->valueOriginal();
188  //---- For extra entries, value is not in proper units, as the 'report.out' file does not have the type (length/angle/nodim)
189  EntryMgr* entryMgr = EntryMgr::getInstance();
190  //- std::cout << OptOCurrent()->name() << " " << name_ << " fillFromReportOutFileValue " << type_ << std::endl;
191  if (type_ == "centre" || type_ == "length") {
192  value_ *= entryMgr->getDimOutLengthVal();
193  //set valueDisp as it will be used to displace entries
194  entryData->setValueDisplacement(entryData->valueDisplacement() * entryMgr->getDimOutLengthVal());
195  if (ALIUtils::debug >= 5)
196  std::cout << " fillFromReportOut " << OptOCurrent()->name() << " " << name() << "" << value_ << " disp "
197  << entryData->valueDisplacement() * entryMgr->getDimOutLengthVal() << std::endl;
198  } else if (type_ == "angles" || type_ == "angle") {
199  value_ *= entryMgr->getDimOutAngleVal();
200  entryData->setValueDisplacement(entryData->valueDisplacement() * entryMgr->getDimOutAngleVal());
201  if (ALIUtils::debug >= 5)
202  std::cout << " fillFromReportOut " << OptOCurrent()->name() << " " << name() << "" << value_ << " disp "
203  << entryData->valueDisplacement() * entryMgr->getDimOutAngleVal() << std::endl;
204  }
205 
207 }
ALIstring type_
Definition: Entry.h:103
ALIdouble getDimOutAngleVal() const
Definition: EntryMgr.h:25
ALIdouble value_
Definition: Entry.h:104
void setValueDisplacement(const ALIdouble val)
Definition: EntryData.h:34
static ALIint debug
Definition: ALIUtils.h:34
ALIdouble getDimOutLengthVal() const
Definition: EntryMgr.h:23
ALIdouble valueOriginal() const
Definition: EntryData.h:30
ALIdouble valueOriginalOriginal_
Definition: Entry.h:105
const ALIstring & name() const
Definition: Entry.h:50
static EntryMgr * getInstance()
Definition: EntryMgr.cc:16
const ALIstring & name() const
Definition: OpticalObject.h:58
OpticalObject * OptOCurrent() const
Definition: Entry.h:59
ALIdouble valueDisplacement() const
Definition: EntryData.h:31
void Entry::fillName ( const ALIstring name)
virtual

Definition at line 230 of file Entry.cc.

References setName().

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

230 { setName(name); }
void setName(const ALIstring &name)
Definition: Entry.h:76
const ALIstring & name() const
Definition: Entry.h:50
void Entry::fillNull ( )

Definition at line 235 of file Entry.cc.

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

Referenced by OpticalObject::setAnglesNull().

235  {
236  //- fillName( name );
237  value_ = 0.;
239  sigma_ = 0.;
241  quality_ = 0;
242 }
ALIdouble value_
Definition: Entry.h:104
ALIdouble valueOriginalOriginal_
Definition: Entry.h:105
ALIdouble sigmaOriginalOriginal_
Definition: Entry.h:107
ALIuint quality_
Definition: Entry.h:108
ALIdouble sigma_
Definition: Entry.h:106
ALIint Entry::fitPos ( ) const
inline

Definition at line 58 of file Entry.h.

References fitPos_.

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

58 { return fitPos_; }
ALIint fitPos_
Definition: Entry.h:110
EntryDim Entry::getDimType ( ) const
inline
ALIdouble Entry::lastAdditionToValueDisplacementByFitting ( ) const
inline

Definition at line 69 of file Entry.h.

References lastAdditionToValueDisplacementByFitting_.

ALIdouble lastAdditionToValueDisplacementByFitting_
Definition: Entry.h:113
const ALIstring Entry::longName ( ) const

Definition at line 336 of file Entry.cc.

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

Referenced by fill(), and name().

336 { return OptOCurrent_->name() + "/" + name_; }
OpticalObject * OptOCurrent_
Definition: Entry.h:109
ALIstring name_
Definition: Entry.h:102
const ALIstring & name() const
Definition: OpticalObject.h:58
const ALIstring& Entry::name ( ) const
inline
OpticalObject* Entry::OptOCurrent ( ) const
inline
virtual ALIdouble Entry::OutputSigmaDimensionFactor ( ) const
inlinevirtual

Reimplemented in EntryAngle, and EntryLength.

Definition at line 38 of file Entry.h.

References displace(), displaceOriginal(), and displaceOriginalOriginal().

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

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

Reimplemented in EntryAngle, and EntryLength.

Definition at line 37 of file Entry.h.

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

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

Definition at line 321 of file Entry.cc.

References valueDisplacementByFitting_.

Referenced by valueDisplacementByFitting().

ALIdouble valueDisplacementByFitting_
Definition: Entry.h:112
void Entry::setFitPos ( const ALIint  fitpos)
inline

Definition at line 81 of file Entry.h.

References fitPos_.

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

Definition at line 70 of file Entry.h.

References lastAdditionToValueDisplacementByFitting_, and heppy_batch::val.

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

Definition at line 76 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().

76 { name_ = name; }
const ALIstring & name() const
Definition: Entry.h:50
ALIstring name_
Definition: Entry.h:102
void Entry::setOptOCurrent ( OpticalObject opto)
inline
void Entry::setQuality ( ALIuint  qual)
inline

Definition at line 80 of file Entry.h.

References quality_.

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

Definition at line 79 of file Entry.h.

References sigma_.

Referenced by FittedEntriesReader::readFittedEntriesFromFile().

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

Definition at line 77 of file Entry.h.

References type(), and type_.

77 { type_ = type; }
ALIstring type_
Definition: Entry.h:103
const ALIstring & type() const
Definition: Entry.h:52
void Entry::setValue ( ALIdouble  val)
inline
ALIdouble Entry::sigma ( ) const
inline
virtual ALIdouble Entry::SigmaDimensionFactor ( ) const
inlinevirtual

Reimplemented in EntryAngle, EntryLength, and EntryNoDim.

Definition at line 36 of file Entry.h.

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

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

Definition at line 56 of file Entry.h.

References sigmaOriginalOriginal_.

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

Reimplemented in EntryAngle, EntryLength, and EntryNoDim.

Definition at line 68 of file Entry.h.

Referenced by Measurement::DerivativeRespectEntry().

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

Definition at line 302 of file Entry.cc.

References addFittedDisplacementToValue(), and lastAdditionToValueDisplacementByFitting_.

Referenced by setOptOCurrent().

302  {
304  // addFittedDisplacementToValue( -1.01*theLastAdditionToValueDisplacementByFitting );
305  //addFittedDisplacementToValue( -theLastAdditionToValueDisplacementByFitting );
307  // addFittedDisplacementToValue( 0. );
308 }
void addFittedDisplacementToValue(const ALIdouble val)
Definition: Entry.cc:286
ALIdouble lastAdditionToValueDisplacementByFitting_
Definition: Entry.h:113
const ALIstring& Entry::type ( ) const
inline
ALIdouble Entry::value ( ) const
inline
virtual ALIdouble Entry::ValueDimensionFactor ( ) const
inlinevirtual

Reimplemented in EntryAngle, EntryLength, and EntryNoDim.

Definition at line 35 of file Entry.h.

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

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

Reimplemented in EntryLengthAffCentre, and EntryAngleAffAngles.

Definition at line 311 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(), and OptOCurrent().

311  {
312  ALIuint entryNo = OptOCurrent()->extraEntryNo(name());
313  if (ALIUtils::debug >= 5)
314  std::cout << entryNo << " Entry::valueDisplaced " << name() << " in " << OptOCurrent()->name() << " orig "
315  << OptOCurrent()->ExtraEntryValueOriginalList()[entryNo] << " new "
316  << OptOCurrent()->ExtraEntryValueList()[entryNo] << std::endl;
317  return OptOCurrent()->ExtraEntryValueList()[entryNo] - OptOCurrent()->ExtraEntryValueOriginalList()[entryNo];
318 }
static ALIint debug
Definition: ALIUtils.h:34
const std::vector< ALIdouble > & ExtraEntryValueOriginalList()
Definition: OpticalObject.h:69
const ALIstring & name() const
Definition: Entry.h:50
const ALIint extraEntryNo(const ALIstring &entry_name) const
std::vector< ALIdouble > & ExtraEntryValueList()
Definition: OpticalObject.h:67
const ALIstring & name() const
Definition: OpticalObject.h:58
OpticalObject * OptOCurrent() const
Definition: Entry.h:59
unsigned int ALIuint
Definition: CocoaGlobals.h:17
ALIdouble Entry::valueDisplacementByFitting ( ) const
inline

Definition at line 63 of file Entry.h.

References resetValueDisplacementByFitting(), and valueDisplacementByFitting_.

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

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

Reimplemented in EntryLengthAffCentre.

Definition at line 47 of file Entry.h.

References value().

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

Definition at line 54 of file Entry.h.

References valueOriginalOriginal_.

54 { return valueOriginalOriginal_; }
ALIdouble valueOriginalOriginal_
Definition: Entry.h:105

Friends And Related Function Documentation

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

Definition at line 324 of file Entry.cc.

324  {
325  os << "ENTRY: " << c.name() << " of type: " << c.type() << std::endl
326  << " value " << c.value_ << " original " << c.valueOriginalOriginal_ << std::endl
327  << " sigma " << c.sigma_ << " original " << c.sigmaOriginalOriginal_ << std::endl
328  << " quality " << c.quality_ << " opto " << (c.OptOCurrent_)->name() << std::endl
329  << " fitpos " << c.fitPos_ << " valueDisplacementByFitting " << c.valueDisplacementByFitting_
330  << " lastAdditionToValueDisplacementByFitting " << c.lastAdditionToValueDisplacementByFitting_ << std::endl;
331 
332  return os;
333 }
const ALIstring & type() const
Definition: Entry.h:52
ALIdouble value_
Definition: Entry.h:104
OpticalObject * OptOCurrent_
Definition: Entry.h:109
ALIdouble valueOriginalOriginal_
Definition: Entry.h:105
ALIdouble sigmaOriginalOriginal_
Definition: Entry.h:107
ALIdouble lastAdditionToValueDisplacementByFitting_
Definition: Entry.h:113
ALIuint quality_
Definition: Entry.h:108
const ALIstring & name() const
Definition: Entry.h:50
ALIdouble valueDisplacementByFitting_
Definition: Entry.h:112
ALIint fitPos_
Definition: Entry.h:110
ALIdouble sigma_
Definition: Entry.h:106

Member Data Documentation

ALIint Entry::fitPos_
protected

Definition at line 110 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 109 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