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::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  // 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 }
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::~Entry ( )
virtual

Definition at line 280 of file Entry.cc.

280 {}

Member Function Documentation

◆ addFittedDisplacementToValue()

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 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()
const ALIstring & name() const
Definition: Entry.h:50
virtual void displaceOriginal(ALIdouble disp)
Definition: Entry.cc:258
static ALIint debug
Definition: ALIUtils.h:34
const ALIstring & name() const
Definition: OpticalObject.h:58
OpticalObject * OptOCurrent() const
Definition: Entry.h:59
ALIdouble lastAdditionToValueDisplacementByFitting_
Definition: Entry.h:113
ALIdouble valueDisplacementByFitting_
Definition: Entry.h:112

◆ displace()

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().

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 }
const ALIstring & name() const
Definition: Entry.h:50
static ALIint debug
Definition: ALIUtils.h:34
OpticalObject * OptOCurrent() const
Definition: Entry.h:59
const ALIint extraEntryNo(const ALIstring &entry_name) const
void displaceExtraEntry(const ALIuint entryNo, const ALIdouble disp)
unsigned int ALIuint
Definition: CocoaGlobals.h:17

◆ displaceOriginal()

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().

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 }
const ALIstring & name() const
Definition: Entry.h:50
void displaceExtraEntryOriginal(const ALIuint entryNo, const ALIdouble disp)
static ALIint debug
Definition: ALIUtils.h:34
OpticalObject * OptOCurrent() const
Definition: Entry.h:59
const ALIint extraEntryNo(const ALIstring &entry_name) const
unsigned int ALIuint
Definition: CocoaGlobals.h:17

◆ displaceOriginalOriginal()

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().

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

◆ fill()

void Entry::fill ( const std::vector< ALIstring > &  wordlist)

Definition at line 31 of file Entry.cc.

References DMR_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::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 }
const ALIstring longName() const
Definition: Entry.cc:336
long double ALIdouble
Definition: CocoaGlobals.h:11
const ALIstring & name() const
Definition: Entry.h:50
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
OpticalObject * OptOCurrent() const
Definition: Entry.h:59
const ALIstring longName() const
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
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
EntryData * findEntryByLongName(const ALIstring &optoName, const ALIstring &entryName="")
Definition: EntryMgr.cc:82
def exit(msg="")

◆ fillFromInputFileQuality()

void Entry::fillFromInputFileQuality ( const std::vector< ALIstring > &  wordlist)
private

Definition at line 155 of file Entry.cc.

References DMR_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().

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 }
const ALIstring & name() const
Definition: Entry.h:50
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
const ALIstring & name() const
Definition: OpticalObject.h:58
OpticalObject * OptOCurrent() const
Definition: Entry.h:59
ALIdouble sigmaOriginalOriginal_
Definition: Entry.h:107
ALIuint quality_
Definition: Entry.h:108
void ErrorInLine()
Definition: ALIFileIn.cc:196
std::string ALIstring
Definition: CocoaGlobals.h:9
ALIdouble sigma_
Definition: Entry.h:106
def exit(msg="")

◆ fillFromInputFileSigma()

void Entry::fillFromInputFileSigma ( const std::vector< ALIstring > &  wordlist)
private

Definition at line 114 of file Entry.cc.

References DMR_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().

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
ALIdouble sigmaOriginalOriginal_
Definition: Entry.h:107
void ErrorInLine()
Definition: ALIFileIn.cc:196
virtual ALIdouble SigmaDimensionFactor() const
Definition: Entry.h:36
ALIdouble sigma_
Definition: Entry.h:106
def exit(msg="")

◆ fillFromInputFileValue()

void Entry::fillFromInputFileValue ( const std::vector< ALIstring > &  wordlist)
private

Definition at line 89 of file Entry.cc.

References DMR_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().

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  }
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
virtual ALIdouble ValueDimensionFactor() const
Definition: Entry.h:35
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
def exit(msg="")

◆ fillFromReportOutFileQuality()

void Entry::fillFromReportOutFileQuality ( const EntryData entryData)
private

Definition at line 225 of file Entry.cc.

References EntryData::quality(), and quality_.

Referenced by fill().

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

◆ fillFromReportOutFileSigma()

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().

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 getDimOutAngleSig() const
Definition: EntryMgr.h:26
ALIdouble sigmaOriginalOriginal_
Definition: Entry.h:107
ALIdouble sigma() const
Definition: EntryData.h:32
static EntryMgr * getInstance()
Definition: EntryMgr.cc:16
ALIdouble sigma_
Definition: Entry.h:106
ALIdouble getDimOutLengthSig() const
Definition: EntryMgr.h:24

◆ fillFromReportOutFileValue()

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().

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
const ALIstring & name() const
Definition: Entry.h:50
ALIdouble valueDisplacement() const
Definition: EntryData.h:31
ALIdouble valueOriginal() const
Definition: EntryData.h:30
ALIdouble value_
Definition: Entry.h:104
void setValueDisplacement(const ALIdouble val)
Definition: EntryData.h:34
static ALIint debug
Definition: ALIUtils.h:34
const ALIstring & name() const
Definition: OpticalObject.h:58
OpticalObject * OptOCurrent() const
Definition: Entry.h:59
ALIdouble getDimOutAngleVal() const
Definition: EntryMgr.h:25
ALIdouble valueOriginalOriginal_
Definition: Entry.h:105
ALIdouble getDimOutLengthVal() const
Definition: EntryMgr.h:23
static EntryMgr * getInstance()
Definition: EntryMgr.cc:16

◆ fillName()

void Entry::fillName ( const ALIstring name)
virtual

Definition at line 230 of file Entry.cc.

References name(), and setName().

Referenced by OpticalObject::fillExtraEntry().

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

◆ fillNull()

void Entry::fillNull ( )

Definition at line 235 of file Entry.cc.

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

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

◆ fitPos()

ALIint Entry::fitPos ( ) const
inline

Definition at line 58 of file Entry.h.

References fitPos_.

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

58 { return fitPos_; }
ALIint fitPos_
Definition: Entry.h:110

◆ getDimType()

EntryDim Entry::getDimType ( ) const
inline

Definition at line 87 of file Entry.h.

References theDimType.

87 { return theDimType; }
EntryDim theDimType
Definition: Entry.h:120

◆ lastAdditionToValueDisplacementByFitting()

ALIdouble Entry::lastAdditionToValueDisplacementByFitting ( ) const
inline

Definition at line 69 of file Entry.h.

References lastAdditionToValueDisplacementByFitting_.

ALIdouble lastAdditionToValueDisplacementByFitting_
Definition: Entry.h:113

◆ longName()

const ALIstring Entry::longName ( ) const

Definition at line 336 of file Entry.cc.

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

Referenced by fill().

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

◆ name()

const ALIstring& Entry::name ( ) const
inline

◆ OptOCurrent()

OpticalObject* Entry::OptOCurrent ( ) const
inline

◆ OutputSigmaDimensionFactor()

virtual ALIdouble Entry::OutputSigmaDimensionFactor ( ) const
inlinevirtual

Reimplemented in EntryAngle, and EntryLength.

Definition at line 38 of file Entry.h.

38 { return 1.; }

◆ OutputValueDimensionFactor()

virtual ALIdouble Entry::OutputValueDimensionFactor ( ) const
inlinevirtual

Reimplemented in EntryAngle, and EntryLength.

Definition at line 37 of file Entry.h.

37 { return 1.; }

◆ quality()

ALIint Entry::quality ( ) const
inline

Definition at line 57 of file Entry.h.

References quality_.

Referenced by CocoaDBMgr::GetEntryError(), CocoaDBMgr::GetOptAlignInfoFromOptO(), and CocoaToDDLMgr::specPar().

57 { return quality_; }
ALIuint quality_
Definition: Entry.h:108

◆ resetValueDisplacementByFitting()

void Entry::resetValueDisplacementByFitting ( )

Definition at line 321 of file Entry.cc.

References valueDisplacementByFitting_.

ALIdouble valueDisplacementByFitting_
Definition: Entry.h:112

◆ setFitPos()

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

◆ setLastAdditionToValueDisplacementByFitting()

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

◆ setName()

void Entry::setName ( const ALIstring name)
inline

Definition at line 76 of file Entry.h.

References name(), and name_.

Referenced by EntryAngleAffAngles::FillName(), EntryLengthAffCentre::FillName(), and fillName().

76 { name_ = name; }
const ALIstring & name() const
Definition: Entry.h:50
ALIstring name_
Definition: Entry.h:102

◆ setOptOCurrent()

void Entry::setOptOCurrent ( OpticalObject opto)
inline

Definition at line 82 of file Entry.h.

References OptOCurrent_.

Referenced by OpticalObject::fillExtraEntry().

82 { OptOCurrent_ = opto; }
OpticalObject * OptOCurrent_
Definition: Entry.h:109

◆ setQuality()

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

◆ setSigma()

void Entry::setSigma ( ALIdouble  sig)
inline

Definition at line 79 of file Entry.h.

References sigma_.

79 { sigma_ = sig; }
ALIdouble sigma_
Definition: Entry.h:106

◆ setType()

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

◆ setValue()

void Entry::setValue ( ALIdouble  val)
inline

Definition at line 78 of file Entry.h.

References heppy_batch::val, and value_.

78 { value_ = val; }
ALIdouble value_
Definition: Entry.h:104

◆ sigma()

ALIdouble Entry::sigma ( ) const
inline

Definition at line 55 of file Entry.h.

References sigma_.

Referenced by SiPixelCPEGenericErrorParm::fillCPEGenericErrorParm(), and CocoaToDDLMgr::specPar().

55 { return sigma_; }
ALIdouble sigma_
Definition: Entry.h:106

◆ SigmaDimensionFactor()

virtual ALIdouble Entry::SigmaDimensionFactor ( ) const
inlinevirtual

Reimplemented in EntryAngle, EntryLength, and EntryNoDim.

Definition at line 36 of file Entry.h.

Referenced by fillFromInputFileSigma().

36 { return 1.; }

◆ sigmaOriginalOriginal()

ALIdouble Entry::sigmaOriginalOriginal ( ) const
inline

Definition at line 56 of file Entry.h.

References sigmaOriginalOriginal_.

56 { return sigmaOriginalOriginal_; }
ALIdouble sigmaOriginalOriginal_
Definition: Entry.h:107

◆ startingDisplacement()

virtual ALIdouble Entry::startingDisplacement ( )
inlinevirtual

Reimplemented in EntryAngle, EntryLength, and EntryNoDim.

Definition at line 68 of file Entry.h.

68 { return 0.; };

◆ substractToHalfFittedDisplacementToValue()

void Entry::substractToHalfFittedDisplacementToValue ( )

Definition at line 302 of file Entry.cc.

References addFittedDisplacementToValue(), and lastAdditionToValueDisplacementByFitting_.

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

◆ type()

const ALIstring& Entry::type ( ) const
inline

Definition at line 52 of file Entry.h.

References type_.

Referenced by CocoaDBMgr::GetOptAlignInfoFromOptO(), setType(), and CocoaToDDLMgr::specPar().

52 { return type_; }
ALIstring type_
Definition: Entry.h:103

◆ value()

ALIdouble Entry::value ( ) const
inline

◆ ValueDimensionFactor()

virtual ALIdouble Entry::ValueDimensionFactor ( ) const
inlinevirtual

Reimplemented in EntryAngle, EntryLength, and EntryNoDim.

Definition at line 35 of file Entry.h.

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

35 { return 1.; }

◆ valueDisplaced()

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().

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 }
const ALIstring & name() const
Definition: Entry.h:50
static ALIint debug
Definition: ALIUtils.h:34
const ALIstring & name() const
Definition: OpticalObject.h:58
OpticalObject * OptOCurrent() const
Definition: Entry.h:59
const std::vector< ALIdouble > & ExtraEntryValueOriginalList()
Definition: OpticalObject.h:69
const ALIint extraEntryNo(const ALIstring &entry_name) const
std::vector< ALIdouble > & ExtraEntryValueList()
Definition: OpticalObject.h:67
unsigned int ALIuint
Definition: CocoaGlobals.h:17

◆ valueDisplacementByFitting()

ALIdouble Entry::valueDisplacementByFitting ( ) const
inline

Definition at line 63 of file Entry.h.

References valueDisplacementByFitting_.

Referenced by OpticalObject::getEntryCentre(), and OpticalObject::getEntryRMangle().

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

◆ valueInGlobalReferenceFrame()

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

◆ valueOriginalOriginal()

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

◆ operator<<

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 & name() const
Definition: Entry.h:50

Member Data Documentation

◆ fitPos_

ALIint Entry::fitPos_
protected

Definition at line 110 of file Entry.h.

Referenced by fitPos(), and setFitPos().

◆ lastAdditionToValueDisplacementByFitting_

ALIdouble Entry::lastAdditionToValueDisplacementByFitting_
protected

◆ name_

ALIstring Entry::name_
protected

◆ OptOCurrent_

OpticalObject* Entry::OptOCurrent_
protected

Definition at line 109 of file Entry.h.

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

◆ quality_

ALIuint Entry::quality_
protected

◆ sigma_

ALIdouble Entry::sigma_
protected

◆ sigmaOriginalOriginal_

ALIdouble Entry::sigmaOriginalOriginal_
protected

◆ theDimType

EntryDim Entry::theDimType
protected

◆ type_

ALIstring Entry::type_
protected

◆ value_

ALIdouble Entry::value_
protected

◆ valueDisplacementByFitting_

ALIdouble Entry::valueDisplacementByFitting_
protected

◆ valueOriginalOriginal_

ALIdouble Entry::valueOriginalOriginal_
protected