CMS 3D CMS Logo

Public Member Functions | Protected Attributes | Friends

EntryData Class Reference

#include <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.

{
}
EntryData::~EntryData ( )

Definition at line 86 of file EntryData.cc.

{
}

Member Function Documentation

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

Definition at line 30 of file EntryData.h.

References fEntryName.

Referenced by operator<<().

{ return fEntryName; }  
void EntryData::fill ( const std::vector< ALIstring > &  wordlist)

Definition at line 20 of file EntryData.cc.

References ExpressReco_HICollisions_FallBack::cerr, gather_cfg::cout, ALIUtils::debug, ALIUtils::dumpVS(), EntryMgr::extractShortName(), fEntryName, fLongOptOName, fQuality, fShortOptOName, fSigma, fValueDisplacement, fValueOriginal, ALIUtils::getFloat(), and EntryMgr::getInstance().

Referenced by EntryMgr::readEntryFromReportOut().

{
  if (ALIUtils::debug >=4) std::cout << "Filling entry data:" << std::endl;
  //----------- Check there are > 10 words
  if ( wordlist.size() < 10 ) {
    //t    ALIFileIn::getInstance( Model::SDFName() ).ErrorInLine();
    ALIUtils::dumpVS( wordlist, " !!! Incorrect format for EntryData:", std::cerr  );
    std::cerr << std::endl << " There should be at least 10 words" << std::endl;
    abort();
  }
  
  EntryMgr* entryMgr = EntryMgr::getInstance();
  //----- set name and type
  fLongOptOName = wordlist[2];
  fShortOptOName = entryMgr->extractShortName(wordlist[2]);
  fEntryName = wordlist[3];

  //----- set value
  fValueOriginal = ALIUtils::getFloat( wordlist[4] );
  fValueDisplacement = 0.;
  //  fValueOriginal = ALIUtils::getFloat( wordlist[7] );
  //  fValueDisplacement = ALIUtils::getFloat( wordlist[12] );
  /* done in Entry.cc
  if( wordlist[3].substr(0,6) == "centre" ) {
    fValue *= entryMgr->getDimOutLengthVal();
    if(ALIUtils::debug >= 5) std::cout << "value " << fValue << " " << entryMgr->getDimOutLengthVal() << std::endl;
  } else if( wordlist[3].substr(0,6) == "angles" ) {
    fValue *= entryMgr->getDimOutAngleVal();
  } else { 
    std::cerr << "!!!FATAL ERROR: reading from 'report.out' only supports centre or angles, NOT " << wordlist[3] << std::endl;
    abort();
  }
  */

  //----- set sigma
  fSigma = ALIUtils::getFloat( wordlist[6] );
  /* done in Entry.cc
  if( wordlist[3].substr(0,6) == "centre" ) {
    fSigma *= entryMgr->getDimOutLengthSig();
  }else if( wordlist[3].substr(0,6) == "angles" ) {
    fSigma *= entryMgr->getDimOutAngleSig();
  }  
  */

  //----- set quality
  if( wordlist[0] == ALIstring("UNK:") ) {
    fQuality = 2;
  } else if( wordlist[0] == ALIstring("CAL:") ) {
    fQuality = 1;
  } else if( wordlist[0] == ALIstring("FIX:") ) { 
    fQuality = 0;
  } else {
    //-    ALIFileIn::getInstance( Model::SDFName() ).ErrorInLine();
    std::cerr << " quality should be 'UNK:' or 'CAL:' or 'FIX:', instead of " << wordlist[0] << std::endl;
    abort();
  }
  
  if (ALIUtils::debug >= 4) {
    //t    std::cout << *this << std::endl;
  }
}
const ALIstring& EntryData::longOptOName ( ) const [inline]

Definition at line 27 of file EntryData.h.

References fLongOptOName.

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

{ return fLongOptOName; }
const ALIstring& EntryData::optOName ( ) const [inline]

Definition at line 29 of file EntryData.h.

References longOptOName().

{ return longOptOName(); }
ALIint EntryData::quality ( ) const [inline]

Definition at line 34 of file EntryData.h.

References fQuality.

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

{ return fQuality; }
void EntryData::setValueDisplacement ( const ALIdouble  val) [inline]

Definition at line 35 of file EntryData.h.

References fValueDisplacement.

Referenced by Entry::fillFromReportOutFileValue().

    { fValueDisplacement = val; }
const ALIstring& EntryData::shortOptOName ( ) const [inline]

Definition at line 28 of file EntryData.h.

References fShortOptOName.

{ return fShortOptOName; }
ALIdouble EntryData::sigma ( ) const [inline]

Definition at line 33 of file EntryData.h.

References fSigma.

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

{ return fSigma; }
ALIdouble EntryData::valueDisplacement ( ) const [inline]
ALIdouble EntryData::valueOriginal ( ) const [inline]

Definition at line 31 of file EntryData.h.

References fValueOriginal.

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

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

{

  os << "ENTRY: " << ent.longOptOName() << " : " << ent.entryName()
     << " valueOriginal " << ent.valueOriginal()
     << " valueDisplacement " << ent.valueDisplacement()
     << " sigma " << ent.sigma() 
     << " quality " << ent.quality() << std::endl;

  return os;

}

Member Data Documentation

Definition at line 44 of file EntryData.h.

Referenced by entryName(), and fill().

Definition at line 42 of file EntryData.h.

Referenced by fill(), and longOptOName().

Definition at line 48 of file EntryData.h.

Referenced by fill(), and quality().

Definition at line 43 of file EntryData.h.

Referenced by fill(), and shortOptOName().

Definition at line 47 of file EntryData.h.

Referenced by fill(), and sigma().

Definition at line 46 of file EntryData.h.

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

Definition at line 45 of file EntryData.h.

Referenced by fill(), and valueOriginal().