CMS 3D CMS Logo

EntryData Class Reference

#include <Alignment/CocoaModel/interface/EntryData.h>

List of all members.

Public Member Functions

 EntryData ()
const ALIstringentryName () const
void fill (const std::vector< ALIstring > &wordlist)
const ALIstringlongOptOName () const
const ALIstringoptOName () const
ALIint quality () const
void setValueDisplacement (const ALIdouble val)
const ALIstringshortOptOName () const
ALIdouble sigma () const
ALIdouble valueDisplacement () const
ALIdouble valueOriginal () const
 ~EntryData ()

Protected Attributes

ALIstring fEntryName
ALIstring fLongOptOName
ALIuint fQuality
ALIstring fShortOptOName
ALIdouble fSigma
ALIdouble fValueDisplacement
ALIdouble fValueOriginal

Friends

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


Detailed Description

Definition at line 15 of file EntryData.h.


Constructor & Destructor Documentation

EntryData::EntryData (  ) 

Definition at line 16 of file EntryData.cc.

00017 {
00018 }

EntryData::~EntryData (  ) 

Definition at line 86 of file EntryData.cc.

00087 {
00088 }


Member Function Documentation

const ALIstring& EntryData::entryName (  )  const [inline]

Definition at line 30 of file EntryData.h.

References fEntryName.

Referenced by operator<<().

00030 { return fEntryName; }  

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

Definition at line 20 of file EntryData.cc.

References TestMuL1L2Filter_cff::cerr, GenMuonPlsPt100GeV_cfg::cout, ALIUtils::debug, ALIUtils::dumpVS(), lat::endl(), EntryMgr::extractShortName(), fEntryName, fLongOptOName, fQuality, fShortOptOName, fSigma, fValueDisplacement, fValueOriginal, ALIUtils::getFloat(), and EntryMgr::getInstance().

Referenced by EntryMgr::readEntryFromReportOut().

00021 {
00022   if (ALIUtils::debug >=4) std::cout << "Filling entry data:" << std::endl;
00023   //----------- Check there are > 10 words
00024   if ( wordlist.size() < 10 ) {
00025     //t    ALIFileIn::getInstance( Model::SDFName() ).ErrorInLine();
00026     ALIUtils::dumpVS( wordlist, " !!! Incorrect format for EntryData:", std::cerr  );
00027     std::cerr << std::endl << " There should be at least 10 words" << std::endl;
00028     abort();
00029   }
00030   
00031   EntryMgr* entryMgr = EntryMgr::getInstance();
00032   //----- set name and type
00033   fLongOptOName = wordlist[2];
00034   fShortOptOName = entryMgr->extractShortName(wordlist[2]);
00035   fEntryName = wordlist[3];
00036 
00037   //----- set value
00038   fValueOriginal = ALIUtils::getFloat( wordlist[4] );
00039   fValueDisplacement = 0.;
00040   //  fValueOriginal = ALIUtils::getFloat( wordlist[7] );
00041   //  fValueDisplacement = ALIUtils::getFloat( wordlist[12] );
00042   /* done in Entry.cc
00043   if( wordlist[3].substr(0,6) == "centre" ) {
00044     fValue *= entryMgr->getDimOutLengthVal();
00045     if(ALIUtils::debug >= 5) std::cout << "value " << fValue << " " << entryMgr->getDimOutLengthVal() << std::endl;
00046   } else if( wordlist[3].substr(0,6) == "angles" ) {
00047     fValue *= entryMgr->getDimOutAngleVal();
00048   } else { 
00049     std::cerr << "!!!FATAL ERROR: reading from 'report.out' only supports centre or angles, NOT " << wordlist[3] << std::endl;
00050     abort();
00051   }
00052   */
00053 
00054   //----- set sigma
00055   fSigma = ALIUtils::getFloat( wordlist[6] );
00056   /* done in Entry.cc
00057   if( wordlist[3].substr(0,6) == "centre" ) {
00058     fSigma *= entryMgr->getDimOutLengthSig();
00059   }else if( wordlist[3].substr(0,6) == "angles" ) {
00060     fSigma *= entryMgr->getDimOutAngleSig();
00061   }  
00062   */
00063 
00064   //----- set quality
00065   if( wordlist[0] == ALIstring("UNK:") ) {
00066     fQuality = 2;
00067   } else if( wordlist[0] == ALIstring("CAL:") ) {
00068     fQuality = 1;
00069   } else if( wordlist[0] == ALIstring("FIX:") ) { 
00070     fQuality = 0;
00071   } else {
00072     //-    ALIFileIn::getInstance( Model::SDFName() ).ErrorInLine();
00073     std::cerr << " quality should be 'UNK:' or 'CAL:' or 'FIX:', instead of " << wordlist[0] << std::endl;
00074     abort();
00075   }
00076   
00077   if (ALIUtils::debug >= 4) {
00078     //t    std::cout << *this << std::endl;
00079   }
00080 }

const ALIstring& EntryData::longOptOName (  )  const [inline]

Definition at line 27 of file EntryData.h.

References fLongOptOName.

Referenced by EntryMgr::findEntryByLongName(), operator<<(), and optOName().

00027 { return fLongOptOName; }

const ALIstring& EntryData::optOName (  )  const [inline]

Definition at line 29 of file EntryData.h.

References longOptOName().

00029 { return longOptOName(); }

ALIint EntryData::quality (  )  const [inline]

Definition at line 34 of file EntryData.h.

References fQuality.

Referenced by Entry::fillFromReportOutFileQuality(), and operator<<().

00034 { return fQuality; }

void EntryData::setValueDisplacement ( const ALIdouble  val  )  [inline]

Definition at line 35 of file EntryData.h.

References fValueDisplacement.

Referenced by Entry::fillFromReportOutFileValue().

00036     { fValueDisplacement = val; }

const ALIstring& EntryData::shortOptOName (  )  const [inline]

Definition at line 28 of file EntryData.h.

References fShortOptOName.

00028 { return fShortOptOName; }

ALIdouble EntryData::sigma (  )  const [inline]

Definition at line 33 of file EntryData.h.

References fSigma.

Referenced by Entry::fillFromReportOutFileSigma(), and operator<<().

00033 { return fSigma; }

ALIdouble EntryData::valueDisplacement (  )  const [inline]

Definition at line 32 of file EntryData.h.

References fValueDisplacement.

Referenced by Entry::fillFromReportOutFileValue(), operator<<(), and Model::SetValueDisplacementsFromReportOut().

00032 { return fValueDisplacement; }

ALIdouble EntryData::valueOriginal (  )  const [inline]

Definition at line 31 of file EntryData.h.

References fValueOriginal.

Referenced by Entry::fillFromReportOutFileValue(), and operator<<().

00031 { return fValueOriginal; }


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const EntryData c 
) [friend]

Definition at line 92 of file EntryData.cc.

00093 {
00094 
00095   os << "ENTRY: " << ent.longOptOName() << " : " << ent.entryName()
00096      << " valueOriginal " << ent.valueOriginal()
00097      << " valueDisplacement " << ent.valueDisplacement()
00098      << " sigma " << ent.sigma() 
00099      << " quality " << ent.quality() << std::endl;
00100 
00101   return os;
00102 
00103 }


Member Data Documentation

ALIstring EntryData::fEntryName [protected]

Definition at line 44 of file EntryData.h.

Referenced by entryName(), and fill().

ALIstring EntryData::fLongOptOName [protected]

Definition at line 42 of file EntryData.h.

Referenced by fill(), and longOptOName().

ALIuint EntryData::fQuality [protected]

Definition at line 48 of file EntryData.h.

Referenced by fill(), and quality().

ALIstring EntryData::fShortOptOName [protected]

Definition at line 43 of file EntryData.h.

Referenced by fill(), and shortOptOName().

ALIdouble EntryData::fSigma [protected]

Definition at line 47 of file EntryData.h.

Referenced by fill(), and sigma().

ALIdouble EntryData::fValueDisplacement [protected]

Definition at line 46 of file EntryData.h.

Referenced by fill(), setValueDisplacement(), and valueDisplacement().

ALIdouble EntryData::fValueOriginal [protected]

Definition at line 45 of file EntryData.h.

Referenced by fill(), and valueOriginal().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:20:24 2009 for CMSSW by  doxygen 1.5.4