CMS 3D CMS Logo

SiStripPartition Class Reference

Container class for database partition parameters. More...

#include <OnlineDB/SiStripConfigDb/interface/SiStripPartition.h>

List of all members.

Public Types

typedef std::pair< uint32_t,
uint32_t > 
Versions

Public Member Functions

Versions apvCalibVersion () const
Versions apvLatencyVersion () const
Versions apvTimingVersion () const
Versions cabVersion () const
Versions dcuVersion () const
Versions fastCablingVersion () const
Versions fecVersion () const
Versions fedVersion () const
Versions fineDelayVersion () const
void forceCurrentState (bool)
bool forceCurrentState () const
void forceVersions (bool)
bool forceVersions () const
uint32_t globalAnalysisVersion () const
std::string inputDcuInfoXml () const
std::vector< std::string > inputFecXml () const
std::vector< std::string > inputFedXml () const
std::string inputModuleXml () const
bool operator!= (const SiStripPartition &) const
SiStripPartitionoperator= (const SiStripPartition &)
bool operator== (const SiStripPartition &) const
Versions optoScanVersion () const
void partitionName (std::string)
std::string partitionName () const
Versions pedestalsVersion () const
void print (std::stringstream &, bool using_db=false) const
void pset (const edm::ParameterSet &)
Versions psuVersion () const
void reset ()
void runNumber (uint32_t)
uint32_t runNumber () const
Versions runTableVersion () const
sistrip::RunType runType () const
 SiStripPartition (const SiStripPartition &)
 SiStripPartition (std::string partition_name)
 SiStripPartition ()
void update (const SiStripConfigDb *const )
Versions vpspScanVersion () const
 ~SiStripPartition ()

Static Public Attributes

static std::string defaultPartitionName_ = "DefaultPartition"

Private Member Functions

Versions versions (std::vector< uint32_t >)

Private Attributes

Versions apvCalibV_
Versions apvLatencyV_
Versions apvTimingV_
Versions cabVersion_
Versions dcuVersion_
Versions fastCablingV_
Versions fecVersion_
Versions fedVersion_
Versions fineDelayV_
bool forceCurrentState_
bool forceVersions_
uint32_t globalAnalysisV_
std::string inputDcuInfoXml_
std::vector< std::string > inputFecXml_
std::vector< std::string > inputFedXml_
std::string inputModuleXml_
Versions optoScanV_
std::string partitionName_
Versions pedestalsV_
Versions psuVersion_
uint32_t runNumber_
Versions runTableVersion_
sistrip::RunType runType_
Versions vpspScanV_


Detailed Description

Container class for database partition parameters.

Author:
R.Bainbridge

Definition at line 25 of file SiStripPartition.h.


Member Typedef Documentation

typedef std::pair<uint32_t,uint32_t> SiStripPartition::Versions

Definition at line 45 of file SiStripPartition.h.


Constructor & Destructor Documentation

SiStripPartition::SiStripPartition (  ) 

Definition at line 18 of file SiStripPartition.cc.

00018                                    :
00019   partitionName_(defaultPartitionName_), 
00020   runNumber_(0),
00021   runType_(sistrip::UNDEFINED_RUN_TYPE),
00022   forceVersions_(false),
00023   forceCurrentState_(false),
00024   cabVersion_(0,0),
00025   fedVersion_(0,0),
00026   fecVersion_(0,0),
00027   dcuVersion_(0,0),
00028   psuVersion_(0,0),
00029   globalAnalysisV_(0),
00030   runTableVersion_(0,0),
00031   fastCablingV_(0,0),
00032   apvTimingV_(0,0),
00033   optoScanV_(0,0),
00034   vpspScanV_(0,0),
00035   apvCalibV_(0,0),
00036   pedestalsV_(0,0),
00037   apvLatencyV_(0,0),
00038   fineDelayV_(0,0),
00039   inputModuleXml_(""),
00040   inputDcuInfoXml_(""),
00041   inputFecXml_(),
00042   inputFedXml_()
00043 {;}

SiStripPartition::SiStripPartition ( std::string  partition_name  ) 

Definition at line 47 of file SiStripPartition.cc.

References defaultPartitionName_, and partitionName_.

00047                                                         :
00048   partitionName_(partition), 
00049   runNumber_(0),
00050   runType_(sistrip::UNDEFINED_RUN_TYPE),
00051   forceVersions_(false),
00052   forceCurrentState_(false),
00053   cabVersion_(0,0),
00054   fedVersion_(0,0),
00055   fecVersion_(0,0),
00056   dcuVersion_(0,0),
00057   psuVersion_(0,0),
00058   globalAnalysisV_(0),
00059   runTableVersion_(0,0),
00060   fastCablingV_(0,0),
00061   apvTimingV_(0,0),
00062   optoScanV_(0,0),
00063   vpspScanV_(0,0),
00064   apvCalibV_(0,0),
00065   pedestalsV_(0,0),
00066   apvLatencyV_(0,0),
00067   fineDelayV_(0,0),
00068   inputModuleXml_(""),
00069   inputDcuInfoXml_(""),
00070   inputFecXml_(),
00071   inputFedXml_()
00072 {
00073   if ( partitionName_.empty() ) { partitionName_ = defaultPartitionName_; }
00074 }

SiStripPartition::SiStripPartition ( const SiStripPartition input  ) 

Definition at line 78 of file SiStripPartition.cc.

00078                                                                   :
00079   partitionName_( input.partitionName() ), 
00080   runNumber_( input.runNumber() ),
00081   runType_( input.runType() ),
00082   forceVersions_( input.forceVersions() ),
00083   forceCurrentState_( input.forceCurrentState() ),
00084   cabVersion_( input.cabVersion() ),
00085   fedVersion_( input.fedVersion() ),
00086   fecVersion_( input.fecVersion() ),
00087   dcuVersion_( input.dcuVersion() ),
00088   psuVersion_( input.psuVersion() ),
00089   globalAnalysisV_( input.globalAnalysisVersion() ),
00090   runTableVersion_( input.runTableVersion() ),
00091   fastCablingV_( input.fastCablingVersion() ),
00092   apvTimingV_( input.apvTimingVersion() ),
00093   optoScanV_( input.optoScanVersion() ),
00094   vpspScanV_( input.vpspScanVersion() ),
00095   apvCalibV_( input.apvCalibVersion() ),
00096   pedestalsV_( input.pedestalsVersion() ),
00097   apvLatencyV_( input.apvLatencyVersion() ),
00098   fineDelayV_( input.fineDelayVersion() ),
00099   inputModuleXml_( input.inputModuleXml() ),
00100   inputDcuInfoXml_( input.inputDcuInfoXml() ),
00101   inputFecXml_( input.inputFecXml() ),
00102   inputFedXml_( input.inputFedXml() )
00103 {;}

SiStripPartition::~SiStripPartition (  ) 

Definition at line 173 of file SiStripPartition.cc.

References inputFecXml_, and inputFedXml_.

00173                                     {
00174   inputFecXml_.clear();
00175   inputFedXml_.clear();
00176 }


Member Function Documentation

SiStripPartition::Versions SiStripPartition::apvCalibVersion (  )  const [inline]

Definition at line 201 of file SiStripPartition.h.

References apvCalibV_.

Referenced by operator=(), and operator==().

00201 { return apvCalibV_; }

SiStripPartition::Versions SiStripPartition::apvLatencyVersion (  )  const [inline]

Definition at line 203 of file SiStripPartition.h.

References apvLatencyV_.

Referenced by operator=(), and operator==().

00203 { return apvLatencyV_; }

SiStripPartition::Versions SiStripPartition::apvTimingVersion (  )  const [inline]

Definition at line 198 of file SiStripPartition.h.

References apvTimingV_.

Referenced by operator=(), and operator==().

00198 { return apvTimingV_; }

SiStripPartition::Versions SiStripPartition::cabVersion (  )  const [inline]

Definition at line 189 of file SiStripPartition.h.

References cabVersion_.

Referenced by operator=(), and operator==().

00189 { return cabVersion_; }

SiStripPartition::Versions SiStripPartition::dcuVersion (  )  const [inline]

Definition at line 192 of file SiStripPartition.h.

References dcuVersion_.

Referenced by operator=(), and operator==().

00192 { return dcuVersion_; }

SiStripPartition::Versions SiStripPartition::fastCablingVersion (  )  const [inline]

Definition at line 197 of file SiStripPartition.h.

References fastCablingV_.

Referenced by operator=(), and operator==().

00197 { return fastCablingV_; }

SiStripPartition::Versions SiStripPartition::fecVersion (  )  const [inline]

Definition at line 191 of file SiStripPartition.h.

References fecVersion_.

Referenced by operator=(), and operator==().

00191 { return fecVersion_; }

SiStripPartition::Versions SiStripPartition::fedVersion (  )  const [inline]

Definition at line 190 of file SiStripPartition.h.

References fedVersion_.

Referenced by operator=(), and operator==().

00190 { return fedVersion_; }

SiStripPartition::Versions SiStripPartition::fineDelayVersion (  )  const [inline]

Definition at line 204 of file SiStripPartition.h.

References fineDelayV_.

Referenced by operator=(), and operator==().

00204 { return fineDelayV_; }

void SiStripPartition::forceCurrentState ( bool  force  )  [inline]

Definition at line 214 of file SiStripPartition.h.

References forceCurrentState_.

00214 { forceCurrentState_ = force; }

bool SiStripPartition::forceCurrentState (  )  const [inline]

Definition at line 187 of file SiStripPartition.h.

References forceCurrentState_.

Referenced by operator=(), and operator==().

00187 { return forceCurrentState_; }

void SiStripPartition::forceVersions ( bool  force  )  [inline]

Definition at line 213 of file SiStripPartition.h.

References forceVersions_.

00213 { forceVersions_ = force; }

bool SiStripPartition::forceVersions (  )  const [inline]

Definition at line 186 of file SiStripPartition.h.

References forceVersions_.

Referenced by operator=(), and operator==().

00186 { return forceVersions_; }

uint32_t SiStripPartition::globalAnalysisVersion (  )  const [inline]

Definition at line 195 of file SiStripPartition.h.

References globalAnalysisV_.

Referenced by operator=(), and operator==().

00195 { return globalAnalysisV_; } 

std::string SiStripPartition::inputDcuInfoXml (  )  const [inline]

Definition at line 207 of file SiStripPartition.h.

References inputDcuInfoXml_.

Referenced by operator=(), and operator==().

00207 { return inputDcuInfoXml_; }

std::vector< std::string > SiStripPartition::inputFecXml (  )  const [inline]

Definition at line 208 of file SiStripPartition.h.

References inputFecXml_.

Referenced by operator=(), and operator==().

00208 { return inputFecXml_; }

std::vector< std::string > SiStripPartition::inputFedXml (  )  const [inline]

Definition at line 209 of file SiStripPartition.h.

References inputFedXml_.

Referenced by operator=(), and operator==().

00209 { return inputFedXml_; }

std::string SiStripPartition::inputModuleXml (  )  const [inline]

Definition at line 206 of file SiStripPartition.h.

References inputModuleXml_.

Referenced by operator=(), and operator==().

00206 { return inputModuleXml_; }

bool SiStripPartition::operator!= ( const SiStripPartition input  )  const

Definition at line 167 of file SiStripPartition.cc.

00167                                                                         {
00168   return !( *this == input );
00169 }

SiStripPartition & SiStripPartition::operator= ( const SiStripPartition input  ) 

Definition at line 107 of file SiStripPartition.cc.

References apvCalibV_, apvCalibVersion(), apvLatencyV_, apvLatencyVersion(), apvTimingV_, apvTimingVersion(), cabVersion(), cabVersion_, dcuVersion(), dcuVersion_, fastCablingV_, fastCablingVersion(), fecVersion(), fecVersion_, fedVersion(), fedVersion_, fineDelayV_, fineDelayVersion(), forceCurrentState(), forceCurrentState_, forceVersions(), forceVersions_, globalAnalysisV_, globalAnalysisVersion(), inputDcuInfoXml(), inputDcuInfoXml_, inputFecXml(), inputFecXml_, inputFedXml(), inputFedXml_, inputModuleXml(), inputModuleXml_, optoScanV_, optoScanVersion(), partitionName(), partitionName_, pedestalsV_, pedestalsVersion(), psuVersion(), psuVersion_, runNumber(), runNumber_, runTableVersion(), runTableVersion_, runType(), runType_, vpspScanV_, and vpspScanVersion().

00107                                                                              {
00108   if ( this == &input ) { return *this; } // self-assignment
00109   partitionName_ = input.partitionName(); 
00110   runNumber_ = input.runNumber();
00111   runType_ = input.runType();
00112   forceVersions_ = input.forceVersions();
00113   forceCurrentState_ = input.forceCurrentState();
00114   cabVersion_ = input.cabVersion();
00115   fedVersion_ = input.fedVersion();
00116   fecVersion_ = input.fecVersion();
00117   dcuVersion_ = input.dcuVersion();
00118   psuVersion_ = input.psuVersion();
00119   globalAnalysisV_ = input.globalAnalysisVersion();
00120   runTableVersion_ = input.runTableVersion();
00121   fastCablingV_ = input.fastCablingVersion();
00122   apvTimingV_ = input.apvTimingVersion();
00123   optoScanV_ = input.optoScanVersion();
00124   vpspScanV_ = input.vpspScanVersion();
00125   apvCalibV_ = input.apvCalibVersion();
00126   pedestalsV_ = input.pedestalsVersion();
00127   apvLatencyV_ = input.apvLatencyVersion();
00128   fineDelayV_ = input.fineDelayVersion();
00129   inputModuleXml_ = input.inputModuleXml();
00130   inputDcuInfoXml_ = input.inputDcuInfoXml();
00131   inputFecXml_ = input.inputFecXml();
00132   inputFedXml_ = input.inputFedXml();
00133   return *this;
00134 }

bool SiStripPartition::operator== ( const SiStripPartition input  )  const

Definition at line 138 of file SiStripPartition.cc.

References apvCalibV_, apvCalibVersion(), apvLatencyV_, apvLatencyVersion(), apvTimingV_, apvTimingVersion(), cabVersion(), cabVersion_, dcuVersion(), dcuVersion_, fastCablingV_, fastCablingVersion(), fecVersion(), fecVersion_, fedVersion(), fedVersion_, fineDelayV_, fineDelayVersion(), forceCurrentState(), forceCurrentState_, forceVersions(), forceVersions_, globalAnalysisV_, globalAnalysisVersion(), inputDcuInfoXml(), inputDcuInfoXml_, inputFecXml(), inputFecXml_, inputFedXml(), inputFedXml_, inputModuleXml(), inputModuleXml_, optoScanV_, optoScanVersion(), partitionName(), partitionName_, pedestalsV_, pedestalsVersion(), psuVersion(), psuVersion_, runNumber(), runNumber_, runTableVersion(), runTableVersion_, runType(), runType_, vpspScanV_, and vpspScanVersion().

00138                                                                         {
00139   return ( partitionName_ == input.partitionName() && 
00140            runNumber_ == input.runNumber() &&
00141            runType_ == input.runType() &&
00142            forceVersions_ == input.forceVersions() &&
00143            forceCurrentState_ == input.forceCurrentState() &&
00144            cabVersion_ == input.cabVersion() &&
00145            fedVersion_ == input.fedVersion() &&
00146            fecVersion_ == input.fecVersion() &&
00147            dcuVersion_ == input.dcuVersion() &&
00148            psuVersion_ == input.psuVersion() &&
00149            globalAnalysisV_ == input.globalAnalysisVersion() &&
00150            runTableVersion_ == input.runTableVersion() &&
00151            fastCablingV_ == input.fastCablingVersion() &&
00152            apvTimingV_ == input.apvTimingVersion() &&
00153            optoScanV_ == input.optoScanVersion() &&
00154            vpspScanV_ == input.vpspScanVersion() &&
00155            apvCalibV_ == input.apvCalibVersion() &&
00156            pedestalsV_ == input.pedestalsVersion() &&
00157            apvLatencyV_ == input.apvLatencyVersion() &&
00158            fineDelayV_ == input.fineDelayVersion() &&
00159            inputModuleXml_ == input.inputModuleXml() &&
00160            inputDcuInfoXml_ == input.inputDcuInfoXml() &&
00161            inputFecXml_ == input.inputFecXml() &&
00162            inputFedXml_ == input.inputFedXml() );
00163 }

SiStripPartition::Versions SiStripPartition::optoScanVersion (  )  const [inline]

Definition at line 199 of file SiStripPartition.h.

References optoScanV_.

Referenced by operator=(), and operator==().

00199 { return optoScanV_; }

void SiStripPartition::partitionName ( std::string  name  )  [inline]

Definition at line 211 of file SiStripPartition.h.

References partitionName_.

00211 { partitionName_ = name ; } 

std::string SiStripPartition::partitionName (  )  const [inline]

Definition at line 183 of file SiStripPartition.h.

References partitionName_.

Referenced by SiStripDbParams::addPartition(), operator=(), and operator==().

00183 { return partitionName_; } 

SiStripPartition::Versions SiStripPartition::pedestalsVersion (  )  const [inline]

Definition at line 202 of file SiStripPartition.h.

References pedestalsV_.

Referenced by operator=(), and operator==().

00202 { return pedestalsV_; }

void SiStripPartition::print ( std::stringstream &  ss,
bool  using_db = false 
) const

Definition at line 710 of file SiStripPartition.cc.

References sistrip::APV_LATENCY, sistrip::APV_TIMING, apvCalibV_, apvLatencyV_, apvTimingV_, cabVersion_, sistrip::CALIBRATION, dcuVersion_, lat::endl(), sistrip::FAST_CABLING, fastCablingV_, fecVersion_, fedVersion_, sistrip::FINE_DELAY_TTC, fineDelayV_, forceCurrentState_, forceVersions_, globalAnalysisV_, inputDcuInfoXml_, inputFecXml_, inputFedXml_, inputModuleXml_, sistrip::OPTO_SCAN, optoScanV_, partitionName_, sistrip::PEDESTALS, pedestalsV_, sistrip::PHYSICS, psuVersion_, runNumber_, runTableVersion_, SiStripEnumsAndStrings::runType(), runType_, sistrip::UNDEFINED_RUN_TYPE, sistrip::UNKNOWN_RUN_TYPE, sistrip::VPSP_SCAN, and vpspScanV_.

Referenced by operator<<().

00710                                                                        {
00711 
00712   ss << "  Partition                  : \"" << partitionName_ << "\"" << std::endl;
00713   
00714   if ( using_db ) {
00715     
00716     ss << "  Run number                 : ";
00717     if ( forceCurrentState_ )  { ss << "Forced \"current state\"! (equivalent to versions below)"; }
00718     else if ( forceVersions_ ) { ss << "Forced versions specified below!"; }
00719     else /* use run number */  { ss << runNumber_; }
00720     
00721     ss << std::endl;
00722     if ( !forceVersions_ ) { 
00723       ss << "  Run type                   : " << SiStripEnumsAndStrings::runType( runType_ ) << std::endl;
00724     }
00725     
00726     ss << "  Cabling major/minor vers   : " << cabVersion_.first << "." << cabVersion_.second << std::endl
00727        << "  FEC major/minor vers       : " << fecVersion_.first << "." << fecVersion_.second << std::endl
00728        << "  FED major/minor vers       : " << fedVersion_.first << "." << fedVersion_.second << std::endl
00729        << "  DCU-DetId map maj/min vers : " << dcuVersion_.first << "." << dcuVersion_.second << std::endl
00730        << "  DCU-PSU map maj/min vers   : " << psuVersion_.first << "." << psuVersion_.second << std::endl;
00731 
00732     ss << "  Global analysis version    : " << globalAnalysisV_ << std::endl;
00733 
00734 
00735     if ( runType_ == sistrip::PHYSICS ||
00736          runType_ == sistrip::UNDEFINED_RUN_TYPE ||
00737          runType_ == sistrip::UNKNOWN_RUN_TYPE ) { 
00738       
00739       ss << "  FED cabling maj/min vers   : " << fastCablingV_.first << "." << fastCablingV_.second << std::endl;
00740       ss << "  APV timing maj/min vers    : " << apvTimingV_.first << "." << apvTimingV_.second << std::endl;
00741       ss << "  Opto scan maj/min vers     : " << optoScanV_.first << "." << optoScanV_.second << std::endl;
00742       ss << "  VPSP scan maj/min vers     : " << vpspScanV_.first << "." << vpspScanV_.second << std::endl;
00743       ss << "  APV calib maj/min vers     : " << apvCalibV_.first << "." << apvCalibV_.second << std::endl;
00744       ss << "  Pedestals maj/min vers     : " << pedestalsV_.first << "." << pedestalsV_.second << std::endl;
00745       ss << "  APV latency maj/min vers   : " << apvLatencyV_.first << "." << apvLatencyV_.second << std::endl;
00746       ss << "  Fine delay maj/min vers    : " << fineDelayV_.first << "." << fineDelayV_.second << std::endl;
00747       
00748     } else {
00749       
00750       if ( runType_ != sistrip::FAST_CABLING ) { 
00751         ss << "  FED cabling maj/min vers   : " << fastCablingV_.first << "." << fastCablingV_.second << std::endl;
00752       } else {
00753         ss << "  FED cabling maj/min vers   : " << runTableVersion_.first << "." << runTableVersion_.second
00754            << " <= This \"state\" version overriden by \"history\" version " 
00755            << fastCablingV_.first << "." << fastCablingV_.second 
00756            << " for this FED cabling run!" << std::endl;
00757       }
00758 
00759       if ( runType_ != sistrip::APV_TIMING ) { 
00760         ss << "  APV timing maj/min vers    : " << apvTimingV_.first << "." << apvTimingV_.second << std::endl;
00761       } else {
00762         ss << "  APV timing maj/min vers    : " << runTableVersion_.first << "." << runTableVersion_.second
00763            << " <= This \"state\" version overriden by \"history\" version " 
00764            << apvTimingV_.first << "." << apvTimingV_.second 
00765            << " for this APV timing run!" << std::endl;
00766       }
00767 
00768       if ( runType_ != sistrip::OPTO_SCAN ) { 
00769         ss << "  Opto scan maj/min vers     : " << optoScanV_.first << "." << optoScanV_.second << std::endl;
00770       } else {
00771         ss << "  Opto scan maj/min vers     : " << runTableVersion_.first << "." << runTableVersion_.second
00772            << " <= This \"state\" version overriden by \"history\" version " 
00773            << optoScanV_.first << "." << optoScanV_.second 
00774            << " for this opto scan run!" << std::endl;
00775       }
00776 
00777       if ( runType_ != sistrip::VPSP_SCAN ) { 
00778         ss << "  VPSP scan maj/min vers     : " << vpspScanV_.first << "." << vpspScanV_.second << std::endl;
00779       } else {
00780         ss << "  VPSP scan maj/min vers     : " << runTableVersion_.first << "." << runTableVersion_.second
00781            << " <= This \"state\" version overriden by \"history\" version " 
00782            << vpspScanV_.first << "." << vpspScanV_.second 
00783            << " for this VPSP scan run!" << std::endl;
00784       }
00785 
00786       if ( runType_ != sistrip::CALIBRATION ) { 
00787         ss << "  APV calib maj/min vers     : " << apvCalibV_.first << "." << apvCalibV_.second << std::endl;
00788       } else {
00789         ss << "  APV calib maj/min vers     : " << runTableVersion_.first << "." << runTableVersion_.second
00790            << " <= This \"state\" version overriden by \"history\" version " 
00791            << apvCalibV_.first << "." << apvCalibV_.second 
00792            << " for this APV calib run!" << std::endl;
00793       }
00794 
00795       if ( runType_ != sistrip::PEDESTALS ) { 
00796         ss << "  Pedestals maj/min vers     : " << pedestalsV_.first << "." << pedestalsV_.second << std::endl;
00797       } else {
00798         ss << "  Pedestals maj/min vers     : " << runTableVersion_.first << "." << runTableVersion_.second
00799            << " <= This \"state\" version overriden by \"history\" version " 
00800            << pedestalsV_.first << "." << pedestalsV_.second 
00801            << " for this pedestals run!" << std::endl;
00802       }
00803 
00804       if ( runType_ != sistrip::APV_LATENCY ) { 
00805         ss << "  APV latency maj/min vers   : " << apvLatencyV_.first << "." << apvLatencyV_.second << std::endl;
00806       } else {
00807         ss << "  APV latency maj/min vers   : " << runTableVersion_.first << "." << runTableVersion_.second
00808            << " <= This \"state\" version overriden by \"history\" version " 
00809            << apvLatencyV_.first << "." << apvLatencyV_.second 
00810            << " for this APV latency run!" << std::endl;
00811       }
00812 
00813       if ( runType_ != sistrip::FINE_DELAY_TTC ) { 
00814         ss << "  Fine delay maj/min vers    : " << fineDelayV_.first << "." << fineDelayV_.second << std::endl;
00815       } else {
00816         ss << "  Fine delay maj/min vers    : " << runTableVersion_.first << "." << runTableVersion_.second
00817            << " <= This \"state\" version overriden by \"history\" version " 
00818            << fineDelayV_.first << "." << fineDelayV_.second 
00819            << " for this fine delay run!" << std::endl;
00820       }
00821 
00822     }
00823 
00824   } else {
00825     
00826     ss << "  Input \"module.xml\" file    : " << inputModuleXml_ << std::endl
00827        << "  Input \"dcuinfo.xml\" file   : " << inputDcuInfoXml_ << std::endl
00828        << "  Input \"fec.xml\" file(s)    : ";
00829     std::vector<std::string>::const_iterator ifec = inputFecXml_.begin();
00830     for ( ; ifec != inputFecXml_.end(); ifec++ ) { ss << *ifec << ", "; }
00831     ss << std::endl;
00832     ss << "  Input \"fed.xml\" file(s)    : ";
00833     std::vector<std::string>::const_iterator ifed = inputFedXml_.begin();
00834     for ( ; ifed != inputFedXml_.end(); ifed++ ) { ss << *ifed << ", "; }
00835     ss << std::endl;
00836     
00837   }
00838   
00839 }

void SiStripPartition::pset ( const edm::ParameterSet pset  ) 

Definition at line 212 of file SiStripPartition.cc.

References apvCalibV_, apvLatencyV_, apvTimingV_, cabVersion_, dcuVersion_, false, fastCablingV_, fecVersion_, fedVersion_, fineDelayV_, forceCurrentState_, forceVersions_, edm::ParameterSet::getUntrackedParameter(), globalAnalysisV_, inputDcuInfoXml_, inputFecXml_, inputFedXml_, inputModuleXml_, optoScanV_, partitionName_, pedestalsV_, psuVersion_, runNumber_, tmp1, tmp2, tmp3, versions(), and vpspScanV_.

Referenced by SiStripDbParams::pset().

00212                                                          {
00213 
00214   partitionName_     = pset.getUntrackedParameter<std::string>( "PartitionName", "" );
00215   runNumber_         = pset.getUntrackedParameter<unsigned int>( "RunNumber", 0 );
00216   forceVersions_     = pset.getUntrackedParameter<bool>( "ForceVersions", false );
00217   forceCurrentState_ = pset.getUntrackedParameter<bool>( "ForceCurrentState", false );
00218 
00219   std::vector<uint32_t> tmp1(2,0);
00220   cabVersion_ = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "CablingVersion", tmp1 ) );
00221   fedVersion_ = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "FedVersion", tmp1 ) );
00222   fecVersion_ = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "FecVersion", tmp1 ) );
00223   dcuVersion_ = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "DcuDetIdsVersion", tmp1 ) );
00224   psuVersion_ = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "DcuPsuMapVersion", tmp1 ) );
00225 
00226   std::vector<uint32_t> tmp2(2,0);
00227   globalAnalysisV_ = pset.getUntrackedParameter<uint32_t>( "GlobalAnalysisVersion", 0 );
00228   fastCablingV_    = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "FastCablingVersion", tmp2 ) );
00229   apvTimingV_      = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "ApvTimingVersion", tmp2 ) );
00230   optoScanV_       = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "OptoScanVersion", tmp2 ) );
00231   vpspScanV_       = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "VpspScanVersion", tmp2 ) );
00232   apvCalibV_       = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "ApvCalibVersion", tmp2 ) );
00233   pedestalsV_      = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "PedestalsVersion", tmp2 ) );
00234   apvLatencyV_     = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "ApvLatencyVersion", tmp2 ) );
00235   fineDelayV_      = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "FineDelayVersion", tmp2 ) );
00236   
00237   std::vector<std::string> tmp3(1,"");
00238   inputModuleXml_   = pset.getUntrackedParameter<std::string>( "InputModuleXml", "" );
00239   inputDcuInfoXml_  = pset.getUntrackedParameter<std::string>( "InputDcuInfoXml", "" ); 
00240   inputFecXml_      = pset.getUntrackedParameter< std::vector<std::string> >( "InputFecXml", tmp3 ); 
00241   inputFedXml_      = pset.getUntrackedParameter< std::vector<std::string> >( "InputFedXml", tmp3 );
00242   
00243 }

SiStripPartition::Versions SiStripPartition::psuVersion (  )  const [inline]

Definition at line 193 of file SiStripPartition.h.

References psuVersion_.

Referenced by operator=(), and operator==().

00193 { return psuVersion_; }

void SiStripPartition::reset ( void   ) 

Definition at line 180 of file SiStripPartition.cc.

References apvCalibV_, apvLatencyV_, apvTimingV_, cabVersion_, dcuVersion_, fastCablingV_, fecVersion_, fedVersion_, fineDelayV_, forceCurrentState_, forceVersions_, globalAnalysisV_, inputDcuInfoXml_, inputFecXml_, inputFedXml_, inputModuleXml_, optoScanV_, partitionName_, pedestalsV_, psuVersion_, runNumber_, runTableVersion_, runType_, sistrip::UNDEFINED_RUN_TYPE, and vpspScanV_.

00180                              {
00181   partitionName_     = "";
00182   runNumber_         = 0;
00183   runType_           = sistrip::UNDEFINED_RUN_TYPE;
00184   forceVersions_     = false;
00185   forceCurrentState_ = false;
00186 
00187   cabVersion_ = std::make_pair(0,0);
00188   fedVersion_ = std::make_pair(0,0);
00189   fecVersion_ = std::make_pair(0,0);
00190   dcuVersion_ = std::make_pair(0,0);
00191   psuVersion_ = std::make_pair(0,0);
00192   
00193   globalAnalysisV_ = 0;
00194   runTableVersion_ = std::make_pair(0,0);
00195   fastCablingV_ = std::make_pair(0,0);
00196   apvTimingV_   = std::make_pair(0,0);
00197   optoScanV_    = std::make_pair(0,0);
00198   vpspScanV_    = std::make_pair(0,0);
00199   apvCalibV_    = std::make_pair(0,0);
00200   pedestalsV_   = std::make_pair(0,0);
00201   apvLatencyV_  = std::make_pair(0,0);
00202   fineDelayV_   = std::make_pair(0,0);
00203   
00204   inputModuleXml_   = "";
00205   inputDcuInfoXml_  = "";
00206   inputFecXml_.clear(); inputFecXml_.push_back("");
00207   inputFedXml_.clear(); inputFedXml_.push_back("");
00208 }

void SiStripPartition::runNumber ( uint32_t  run  )  [inline]

Definition at line 212 of file SiStripPartition.h.

References runNumber_.

00212 { runNumber_ = run; }

uint32_t SiStripPartition::runNumber (  )  const [inline]

Definition at line 184 of file SiStripPartition.h.

References runNumber_.

Referenced by operator=(), and operator==().

00184 { return runNumber_; }

SiStripPartition::Versions SiStripPartition::runTableVersion (  )  const [inline]

Definition at line 196 of file SiStripPartition.h.

References runTableVersion_.

Referenced by operator=(), and operator==().

00196 { return runTableVersion_; }

sistrip::RunType SiStripPartition::runType (  )  const [inline]

Definition at line 185 of file SiStripPartition.h.

References runType_.

Referenced by operator=(), and operator==().

00185 { return runType_; }

void SiStripPartition::update ( const SiStripConfigDb * const  db  ) 

Definition at line 247 of file SiStripPartition.cc.

References sistrip::APV_LATENCY, sistrip::APV_TIMING, apvCalibV_, apvLatencyV_, apvTimingV_, cabVersion_, sistrip::CALIBRATION, sistrip::CALIBRATION_DECO, sistrip::DAQ_SCOPE_MODE, dcuVersion_, defaultPartitionName_, SiStripConfigDb::deviceFactory(), sistrip::FAST_CABLING, fastCablingV_, fecVersion_, sistrip::FED_CABLING, sistrip::FED_TIMING, fedVersion_, sistrip::FINE_DELAY_PLL, sistrip::FINE_DELAY_TTC, fineDelayV_, forceCurrentState_, forceVersions_, globalAnalysisV_, SiStripConfigDb::handleException(), LogTrace, sistrip::mlConfigDb_, sistrip::MULTI_MODE, sistrip::OPTO_SCAN, optoScanV_, partitionName_, sistrip::PEDESTALS, pedestalsV_, sistrip::PHYSICS, psuVersion_, sistrip::QUITE_FAST_CABLING, mergeAndRegister_online::run, runNumber_, runTableVersion_, runType_, ss, sistrip::UNDEFINED_RUN_TYPE, sistrip::UNKNOWN_RUN_TYPE, sistrip::VPSP_SCAN, and vpspScanV_.

00247                                                                {
00248   
00249   // Check
00250   if ( !db ) {
00251     edm::LogError(mlConfigDb_)
00252       << "[SiStripPartition::" << __func__ << "]"
00253       << " NULL pointer to SiStripConfigDb object!"
00254       << " Aborting update...";
00255     return;
00256   }
00257   
00258   // Check
00259   DeviceFactory* const df = db->deviceFactory(__func__);
00260   if ( !df ) {
00261     edm::LogError(mlConfigDb_)
00262       << "[SiStripPartition::" << __func__ << "]"
00263       << " NULL pointer to DeviceFactory object!"
00264       << " Aborting update...";
00265     return;
00266   }
00267 
00268   // Check partition name
00269   if ( partitionName_ == defaultPartitionName_ ) { return; }
00270 
00271   // Debug
00272   std::stringstream ss;
00273   ss << "[SiStripPartition::" << __func__ << "]"
00274      << " Updating description versions for partition \""
00275      << partitionName_
00276      << "\"...";
00277   LogTrace(mlConfigDb_) << ss.str();
00278 
00279   try {
00280 
00281     // Reset container indicating state versions for commissioning runs 
00282     runTableVersion_ = Versions(0,0);
00283 
00284     // Update versions if using versions from "current state"
00285     if ( forceCurrentState_ || forceVersions_ ) { 
00286     
00287       // Find state for given partition
00288       tkStateVector states;
00289 #ifdef USING_NEW_DATABASE_MODEL
00290       states = df->getCurrentStates(); 
00291 #else
00292       states = *( df->getCurrentStates() ); 
00293 #endif
00294       tkStateVector::const_iterator istate = states.begin();
00295       tkStateVector::const_iterator jstate = states.end();
00296       while ( istate != jstate ) {
00297         if ( *istate && partitionName_ == (*istate)->getPartitionName() ) { break; }
00298         istate++;
00299       }
00300       
00301       // Set versions if state was found
00302       if ( istate != states.end() ) {
00303         
00304 #ifdef USING_NEW_DATABASE_MODEL
00305         if ( !cabVersion_.first &&
00306              !cabVersion_.second ) { 
00307           cabVersion_.first = (*istate)->getConnectionVersionMajorId(); 
00308           cabVersion_.second = (*istate)->getConnectionVersionMinorId(); 
00309         }
00310 #endif
00311     
00312         if ( !fecVersion_.first &&
00313              !fecVersion_.second ) { 
00314           fecVersion_.first = (*istate)->getFecVersionMajorId(); 
00315           fecVersion_.second = (*istate)->getFecVersionMinorId(); 
00316         }
00317         if ( !fedVersion_.first &&
00318              !fedVersion_.second ) { 
00319           fedVersion_.first = (*istate)->getFedVersionMajorId(); 
00320           fedVersion_.second = (*istate)->getFedVersionMinorId(); 
00321         }
00322         
00323 #ifdef USING_NEW_DATABASE_MODEL
00324         if ( !dcuVersion_.first &&
00325              !dcuVersion_.second ) { 
00326           dcuVersion_.first = (*istate)->getDcuInfoVersionMajorId(); 
00327           dcuVersion_.second = (*istate)->getDcuInfoVersionMinorId(); 
00328         }
00329 #endif
00330         
00331 #ifdef USING_NEW_DATABASE_MODEL
00332         if ( !psuVersion_.first &&
00333              !psuVersion_.second ) { 
00334           psuVersion_.first = (*istate)->getDcuPsuMapVersionMajorId();
00335           psuVersion_.second = (*istate)->getDcuPsuMapVersionMinorId(); 
00336         }
00337 #endif
00338         
00339 #ifdef USING_NEW_DATABASE_MODEL
00340         
00341         // Retrieve global and local versions 
00342         if ( forceCurrentState_ || globalAnalysisV_ ) { // use global version (or current state)
00343 
00344           // Set global version
00345           if ( forceCurrentState_ ) { globalAnalysisV_ = (*istate)->getAnalysisVersionMapPointerId(); }
00346           
00347           // Retrieve local versions
00348           HashMapAnalysisVersions local_versions = df->getLocalAnalysisVersions( globalAnalysisV_ );
00349           
00350           // Iterate through map< AnalysisType, pair<Major,Minor> >
00351           HashMapAnalysisVersions::const_iterator ivers = local_versions.begin();
00352           HashMapAnalysisVersions::const_iterator jvers = local_versions.end();
00353           for ( ; ivers != jvers; ++ivers ) {
00354             if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_FASTFEDCABLING ) { 
00355               fastCablingV_.first = ivers->second.first;
00356               fastCablingV_.second = ivers->second.second;
00357             } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_TIMING ) {
00358               apvTimingV_.first = ivers->second.first;
00359               apvTimingV_.second = ivers->second.second;
00360             } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_OPTOSCAN ) {
00361               optoScanV_.first = ivers->second.first;
00362               optoScanV_.second = ivers->second.second;
00363             } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_VPSPSCAN ) {
00364               vpspScanV_.first = ivers->second.first;
00365               vpspScanV_.second = ivers->second.second;
00366             } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_CALIBRATION ) {
00367               apvCalibV_.first = ivers->second.first;
00368               apvCalibV_.second = ivers->second.second;
00369             } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_PEDESTALS ) {
00370               pedestalsV_.first = ivers->second.first;
00371               pedestalsV_.second = ivers->second.second;
00372             } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_APVLATENCY ) {
00373               apvLatencyV_.first = ivers->second.first;
00374               apvLatencyV_.second = ivers->second.second;
00375             } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_FINEDELAY ) {
00376               fineDelayV_.first = ivers->second.first;
00377               fineDelayV_.second = ivers->second.second;
00378             } else if ( ivers->first == CommissioningAnalysisDescription::T_UNKNOWN ) {
00379               std::stringstream ss;
00380               edm::LogError(mlConfigDb_)
00381                 << "[SiStripPartition::" << __func__ << "]"
00382                 << " Found UNKNOWN AnalysisType!";
00383               edm::LogWarning(mlConfigDb_) << ss.str();
00384             } else {
00385               std::stringstream ss;
00386               edm::LogError(mlConfigDb_)
00387                 << "[SiStripPartition::" << __func__ << "]"
00388                 << " Unable to match content to any AnalysisType!";
00389               edm::LogWarning(mlConfigDb_) << ss.str();
00390             }
00391           }
00392       
00393         } else if ( !globalAnalysisV_ ) { // use local versions
00394         
00395           // Retrieve local versions and set if necessary
00396           globalAnalysisV_ = (*istate)->getAnalysisVersionMapPointerId(); 
00397           HashMapAnalysisVersions local_versions = df->getLocalAnalysisVersions( globalAnalysisV_ );
00398           
00399           // Iterate through map< AnalysisType, pair<Major,Minor> >
00400           HashMapAnalysisVersions::const_iterator ivers = local_versions.begin();
00401           HashMapAnalysisVersions::const_iterator jvers = local_versions.end();
00402           for ( ; ivers != jvers; ++ivers ) {
00403             if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_FASTFEDCABLING ) { 
00404               if ( !fastCablingV_.first && !fastCablingV_.second ) {
00405                 fastCablingV_.first = ivers->second.first;
00406                 fastCablingV_.second = ivers->second.second;
00407               }
00408             } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_TIMING ) {
00409               if ( !apvTimingV_.first && !apvTimingV_.second ) {
00410                 apvTimingV_.first = ivers->second.first;
00411                 apvTimingV_.second = ivers->second.second;
00412               }
00413             } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_OPTOSCAN ) {
00414               if ( !optoScanV_.first && !optoScanV_.second ) {
00415                 optoScanV_.first = ivers->second.first;
00416                 optoScanV_.second = ivers->second.second;
00417               }
00418             } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_VPSPSCAN ) {
00419               if ( !vpspScanV_.first && !vpspScanV_.second ) {
00420                 vpspScanV_.first = ivers->second.first;
00421                 vpspScanV_.second = ivers->second.second;
00422               }
00423             } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_CALIBRATION ) {
00424               if ( !apvCalibV_.first && !apvCalibV_.second ) {
00425                 apvCalibV_.first = ivers->second.first;
00426                 apvCalibV_.second = ivers->second.second;
00427               }
00428             } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_PEDESTALS ) {
00429               if ( !pedestalsV_.first && !pedestalsV_.second ) {
00430                 pedestalsV_.first = ivers->second.first;
00431                 pedestalsV_.second = ivers->second.second;
00432               }
00433             } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_APVLATENCY ) {
00434               if ( !apvLatencyV_.first && !apvLatencyV_.second ) {
00435                 apvLatencyV_.first = ivers->second.first;
00436                 apvLatencyV_.second = ivers->second.second;
00437               }
00438             } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_FINEDELAY ) {
00439               if ( !fineDelayV_.first && !fineDelayV_.second ) {
00440                 fineDelayV_.first = ivers->second.first;
00441                 fineDelayV_.second = ivers->second.second;
00442               }
00443             } else if ( ivers->first == CommissioningAnalysisDescription::T_UNKNOWN ) {
00444               std::stringstream ss;
00445               edm::LogError(mlConfigDb_)
00446                 << "[SiStripPartition::" << __func__ << "]"
00447                 << " Found UNKNOWN AnalysisType!";
00448               edm::LogWarning(mlConfigDb_) << ss.str();
00449             } else {
00450               std::stringstream ss;
00451               edm::LogError(mlConfigDb_)
00452                 << "[SiStripPartition::" << __func__ << "]"
00453                 << " Unable to match content to any AnalysisType!";
00454               edm::LogWarning(mlConfigDb_) << ss.str();
00455             }
00456           }
00457       
00458         }
00459 
00460 #endif
00461       
00462       } else {
00463         std::stringstream ss;
00464         edm::LogError(mlConfigDb_)
00465           << "[SiStripPartition::" << __func__ << "]"
00466           << " Unable to find \"current state\" for partition \""
00467           << partitionName_ << "\"";
00468       }
00469     
00470     } else { // ---------- USE RUN NUMBER ----------
00471     
00472       // Retrieve TkRun object for given run (0 means "latest run")
00473       TkRun* run = 0;
00474       if ( !runNumber_ ) { run = df->getLastRun( partitionName_ ); }
00475       else { run = df->getRun( partitionName_, runNumber_ ); }
00476   
00477       // Retrieve versioning for given TkRun object 
00478       if ( run ) {
00479         
00480         if ( run->getRunNumber() ) {
00481           
00482           if ( !runNumber_ ) { runNumber_ = run->getRunNumber(); }
00483           
00484           if ( runNumber_ == run->getRunNumber() ) {
00485             
00486 #ifdef USING_NEW_DATABASE_MODEL
00487             cabVersion_.first = run->getConnectionVersionMajorId(); 
00488             cabVersion_.second = run->getConnectionVersionMinorId(); 
00489 #endif
00490             
00491             fecVersion_.first = run->getFecVersionMajorId(); 
00492             fecVersion_.second = run->getFecVersionMinorId(); 
00493             
00494             fedVersion_.first = run->getFedVersionMajorId(); 
00495             fedVersion_.second = run->getFedVersionMinorId(); 
00496             
00497 #ifdef USING_NEW_DATABASE_MODEL
00498             dcuVersion_.first = run->getDcuInfoVersionMajorId(); 
00499             dcuVersion_.second = run->getDcuInfoVersionMinorId(); 
00500 #endif
00501             
00502 #ifdef USING_NEW_DATABASE_MODEL
00503             psuVersion_.first = run->getDcuPsuMapVersionMajorId();
00504             psuVersion_.second = run->getDcuPsuMapVersionMinorId(); 
00505 #endif
00506             
00507             // Check run type
00508             uint16_t type = run->getModeId( run->getMode() );
00509             if      ( type ==  1 ) { runType_ = sistrip::PHYSICS; }
00510             else if ( type ==  2 ) { runType_ = sistrip::PEDESTALS; }
00511             else if ( type ==  3 ) { runType_ = sistrip::CALIBRATION; }
00512             else if ( type == 33 ) { runType_ = sistrip::CALIBRATION_DECO; }
00513             else if ( type ==  4 ) { runType_ = sistrip::OPTO_SCAN; }
00514             else if ( type ==  5 ) { runType_ = sistrip::APV_TIMING; }
00515             else if ( type ==  6 ) { runType_ = sistrip::APV_LATENCY; }
00516             else if ( type ==  7 ) { runType_ = sistrip::FINE_DELAY_PLL; }
00517             else if ( type ==  8 ) { runType_ = sistrip::FINE_DELAY_TTC; }
00518             else if ( type == 10 ) { runType_ = sistrip::MULTI_MODE; }
00519             else if ( type == 12 ) { runType_ = sistrip::FED_TIMING; }
00520             else if ( type == 13 ) { runType_ = sistrip::FED_CABLING; }
00521             else if ( type == 14 ) { runType_ = sistrip::VPSP_SCAN; }
00522             else if ( type == 15 ) { runType_ = sistrip::DAQ_SCOPE_MODE; }
00523             else if ( type == 16 ) { runType_ = sistrip::QUITE_FAST_CABLING; }
00524             else if ( type == 21 ) { runType_ = sistrip::FAST_CABLING; }
00525             else if ( type ==  0 ) { 
00526               runType_ = sistrip::UNDEFINED_RUN_TYPE;
00527               edm::LogWarning(mlConfigDb_)
00528                 << "[SiStripPartition::" << __func__ << "]"
00529                 << " NULL run type returned!"
00530                 << " for partition \"" << partitionName_ << "\"";
00531             } else { 
00532               runType_ = sistrip::UNKNOWN_RUN_TYPE; 
00533               edm::LogWarning(mlConfigDb_)
00534                 << "[SiStripPartition::" << __func__ << "]"
00535                 << " UNKNOWN run type (" << type<< ") returned!"
00536                 << " for partition \"" << partitionName_ << "\"";
00537             }
00538 
00539 
00540 #ifdef USING_NEW_DATABASE_MODEL
00541             
00542             // Retrieve global and local versions from state associated with given run
00543             globalAnalysisV_ = run->getAnalysisVersionMapPointerId(); 
00544             HashMapAnalysisVersions local_versions = df->getLocalAnalysisVersions( globalAnalysisV_ );
00545             HashMapAnalysisVersions::const_iterator ivers = local_versions.begin();
00546             HashMapAnalysisVersions::const_iterator jvers = local_versions.end();
00547             for ( ; ivers != jvers; ++ivers ) {
00548               if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_FASTFEDCABLING ) { 
00549                 fastCablingV_.first = ivers->second.first;
00550                 fastCablingV_.second = ivers->second.second;
00551               } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_TIMING ) {
00552                 apvTimingV_.first = ivers->second.first;
00553                 apvTimingV_.second = ivers->second.second;
00554               } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_OPTOSCAN ) {
00555                 optoScanV_.first = ivers->second.first;
00556                 optoScanV_.second = ivers->second.second;
00557               } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_VPSPSCAN ) {
00558                 vpspScanV_.first = ivers->second.first;
00559                 vpspScanV_.second = ivers->second.second;
00560               } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_CALIBRATION ) {
00561                 apvCalibV_.first = ivers->second.first;
00562                 apvCalibV_.second = ivers->second.second;
00563               } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_PEDESTALS ) {
00564                 pedestalsV_.first = ivers->second.first;
00565                 pedestalsV_.second = ivers->second.second;
00566               } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_APVLATENCY ) {
00567                 apvLatencyV_.first = ivers->second.first;
00568                 apvLatencyV_.second = ivers->second.second;
00569               } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_FINEDELAY ) {
00570                 fineDelayV_.first = ivers->second.first;
00571                 fineDelayV_.second = ivers->second.second;
00572               } else if ( ivers->first == CommissioningAnalysisDescription::T_UNKNOWN ) {
00573                 std::stringstream ss;
00574                 edm::LogError(mlConfigDb_)
00575                   << "[SiStripPartition::" << __func__ << "]"
00576                   << " Found UNKNOWN AnalysisType!";
00577                 edm::LogWarning(mlConfigDb_) << ss.str();
00578               } else {
00579                 std::stringstream ss;
00580                 edm::LogError(mlConfigDb_)
00581                   << "[SiStripPartition::" << __func__ << "]"
00582                   << " Unable to match content to any AnalysisType!";
00583                 edm::LogWarning(mlConfigDb_) << ss.str();
00584               }
00585             }
00586 
00587             // If commissioning run, override version of analysis type with version PRODUCED by run (from history)
00588             if ( runType_ != sistrip::PHYSICS &&
00589                  runType_ != sistrip::UNDEFINED_RUN_TYPE &&
00590                  runType_ != sistrip::UNKNOWN_RUN_TYPE ) { 
00591               
00592               // Determine analysis type from run type
00593               CommissioningAnalysisDescription::commissioningType type = CommissioningAnalysisDescription::T_UNKNOWN;
00594               if      ( runType_ == sistrip::FAST_CABLING )   { type = CommissioningAnalysisDescription::T_ANALYSIS_FASTFEDCABLING; }
00595               else if ( runType_ == sistrip::APV_TIMING )     { type = CommissioningAnalysisDescription::T_ANALYSIS_TIMING; }
00596               else if ( runType_ == sistrip::OPTO_SCAN )      { type = CommissioningAnalysisDescription::T_ANALYSIS_OPTOSCAN; }
00597               else if ( runType_ == sistrip::VPSP_SCAN )      { type = CommissioningAnalysisDescription::T_ANALYSIS_VPSPSCAN; }
00598               else if ( runType_ == sistrip::CALIBRATION )    { type = CommissioningAnalysisDescription::T_ANALYSIS_CALIBRATION; }
00599               else if ( runType_ == sistrip::PEDESTALS )      { type = CommissioningAnalysisDescription::T_ANALYSIS_PEDESTALS; }
00600               else if ( runType_ == sistrip::APV_LATENCY )    { type = CommissioningAnalysisDescription::T_ANALYSIS_APVLATENCY; }
00601               else if ( runType_ == sistrip::FINE_DELAY_TTC ) { type = CommissioningAnalysisDescription::T_ANALYSIS_FINEDELAY; }
00602 
00603               // Retrieve local versions for COMMISSIONING runs from history
00604               HashMapRunVersion local_versions = df->getAnalysisHistory( partitionName_, type );
00605 
00606               // Iterate through map< RunNumber, vector< pair<Major,Minor> > > to find appropriate run
00607               HashMapRunVersion::const_iterator ivers = local_versions.end();
00608               if ( runNumber_ == 0 ) { ivers = --(local_versions.end()); }
00609               else { ivers = local_versions.find( runNumber_ ); } 
00610               
00611               // Set appropriate versions
00612               if ( ivers != local_versions.end() ) {
00613                 if ( type == CommissioningAnalysisDescription::T_ANALYSIS_FASTFEDCABLING ) { 
00614                   runTableVersion_ = fastCablingV_;
00615                   fastCablingV_.first = ivers->second.back().first;
00616                   fastCablingV_.second = ivers->second.back().second;
00617 
00618                   //@@
00619 
00620                 } else if ( type == CommissioningAnalysisDescription::T_ANALYSIS_TIMING ) {
00621                   runTableVersion_ = apvTimingV_;
00622                   apvTimingV_.first = ivers->second.back().first;
00623                   apvTimingV_.second = ivers->second.back().second;
00624                 } else if ( type == CommissioningAnalysisDescription::T_ANALYSIS_OPTOSCAN ) {
00625                   runTableVersion_ = optoScanV_;
00626                   optoScanV_.first = ivers->second.back().first;
00627                   optoScanV_.second = ivers->second.back().second;
00628                 } else if ( type == CommissioningAnalysisDescription::T_ANALYSIS_VPSPSCAN ) {
00629                   runTableVersion_ = vpspScanV_;
00630                   vpspScanV_.first = ivers->second.back().first;
00631                   vpspScanV_.second = ivers->second.back().second;
00632                 } else if ( type == CommissioningAnalysisDescription::T_ANALYSIS_CALIBRATION ) {
00633                   runTableVersion_ = apvCalibV_;
00634                   apvCalibV_.first = ivers->second.back().first;
00635                   apvCalibV_.second = ivers->second.back().second;
00636                 } else if ( type == CommissioningAnalysisDescription::T_ANALYSIS_PEDESTALS ) {
00637                   runTableVersion_ = pedestalsV_;
00638                   pedestalsV_.first = ivers->second.back().first;
00639                   pedestalsV_.second = ivers->second.back().second;
00640                 } else if ( type == CommissioningAnalysisDescription::T_ANALYSIS_APVLATENCY ) {
00641                   runTableVersion_ = apvLatencyV_;
00642                   apvLatencyV_.first = ivers->second.back().first;
00643                   apvLatencyV_.second = ivers->second.back().second;
00644                 } else if ( type == CommissioningAnalysisDescription::T_ANALYSIS_FINEDELAY ) {
00645                   runTableVersion_ = fineDelayV_;
00646                   fineDelayV_.first = ivers->second.back().first;
00647                   fineDelayV_.second = ivers->second.back().second;
00648                 } else if ( type == CommissioningAnalysisDescription::T_UNKNOWN ) {
00649                   std::stringstream ss;
00650                   edm::LogError(mlConfigDb_)
00651                     << "[SiStripPartition::" << __func__ << "]"
00652                     << " Found UNKNOWN AnalysisType!";
00653                   edm::LogWarning(mlConfigDb_) << ss.str();
00654                 } else {
00655                   std::stringstream ss;
00656                   edm::LogError(mlConfigDb_)
00657                     << "[SiStripPartition::" << __func__ << "]"
00658                     << " Unable to match content to any AnalysisType!";
00659                   edm::LogWarning(mlConfigDb_) << ss.str();
00660                 }
00661               } else {
00662                 std::stringstream ss;
00663                 edm::LogError(mlConfigDb_)
00664                   << "[SiStripPartition::" << __func__ << "]"
00665                   << " Unable to find run number " << runNumber_
00666                   << " in \"history\" hash map ";
00667                 edm::LogWarning(mlConfigDb_) << ss.str();
00668               }
00669 
00670             }
00671             
00672 #endif
00673         
00674           } else {
00675             edm::LogError(mlConfigDb_)
00676               << "[SiStripPartition::" << __func__ << "]"
00677               << " Mismatch of run number requested (" 
00678               << runNumber_
00679               << ") and received (" 
00680               << run->getRunNumber() << ")"
00681               << " to/from database for partition \"" 
00682               << partitionName_ << "\"";
00683           }
00684 
00685         } else {
00686           edm::LogError(mlConfigDb_)
00687             << "[SiStripPartition::" << __func__ << "]"
00688             << " NULL run number returned!"
00689             << " for partition \"" << partitionName_ << "\"";
00690         }
00691       
00692       } else {
00693         edm::LogError(mlConfigDb_)
00694           << "[SiStripPartition::" << __func__ << "]"
00695           << " NULL pointer to TkRun object!"
00696           << " Unable to retrieve versions for run number "
00697           << runNumber_
00698           << ". Run number may not be consistent with partition \"" 
00699           << partitionName_ << "\"!"; //@@ only using first here!!!
00700       }
00701 
00702     }
00703 
00704   } catch (...) { db->handleException( __func__, "" ); }
00705   
00706 }

SiStripPartition::Versions SiStripPartition::versions ( std::vector< uint32_t >  input  )  [private]

Definition at line 852 of file SiStripPartition.cc.

References sistrip::mlConfigDb_.

Referenced by pset().

00852                                                                                {
00853   if ( input.size() != 2 ) { 
00854     edm::LogWarning(mlConfigDb_)
00855       << "[SiStripPartition::" << __func__ << "]"
00856       << " Unexpected size (" << input.size()
00857       << ") for  vector containing version numbers (major,minor)!"
00858       << " Resizing to 2 elements (default values will be 0,0)...";
00859     input.resize(2,0);
00860   }
00861   return std::make_pair( input[0], input[1] );
00862 }

SiStripPartition::Versions SiStripPartition::vpspScanVersion (  )  const [inline]

Definition at line 200 of file SiStripPartition.h.

References vpspScanV_.

Referenced by operator=(), and operator==().

00200 { return vpspScanV_; }


Member Data Documentation

Versions SiStripPartition::apvCalibV_ [private]

Definition at line 161 of file SiStripPartition.h.

Referenced by apvCalibVersion(), operator=(), operator==(), print(), pset(), reset(), and update().

Versions SiStripPartition::apvLatencyV_ [private]

Definition at line 165 of file SiStripPartition.h.

Referenced by apvLatencyVersion(), operator=(), operator==(), print(), pset(), reset(), and update().

Versions SiStripPartition::apvTimingV_ [private]

Definition at line 155 of file SiStripPartition.h.

Referenced by apvTimingVersion(), operator=(), operator==(), print(), pset(), reset(), and update().

Versions SiStripPartition::cabVersion_ [private]

Definition at line 137 of file SiStripPartition.h.

Referenced by cabVersion(), operator=(), operator==(), print(), pset(), reset(), and update().

Versions SiStripPartition::dcuVersion_ [private]

Definition at line 143 of file SiStripPartition.h.

Referenced by dcuVersion(), operator=(), operator==(), print(), pset(), reset(), and update().

std::string SiStripPartition::defaultPartitionName_ = "DefaultPartition" [static]

Definition at line 43 of file SiStripPartition.h.

Referenced by SiStripDbParams::addPartition(), SiStripConfigDb::getDcuDetIds(), SiStripConfigDb::getDeviceDescriptions(), SiStripConfigDb::getFedConnections(), SiStripConfigDb::getFedDescriptions(), SiStripPartition(), update(), and SiStripConfigDb::usingDatabaseCache().

Versions SiStripPartition::fastCablingV_ [private]

Definition at line 153 of file SiStripPartition.h.

Referenced by fastCablingVersion(), operator=(), operator==(), print(), pset(), reset(), and update().

Versions SiStripPartition::fecVersion_ [private]

Definition at line 141 of file SiStripPartition.h.

Referenced by fecVersion(), operator=(), operator==(), print(), pset(), reset(), and update().

Versions SiStripPartition::fedVersion_ [private]

Definition at line 139 of file SiStripPartition.h.

Referenced by fedVersion(), operator=(), operator==(), print(), pset(), reset(), and update().

Versions SiStripPartition::fineDelayV_ [private]

Definition at line 167 of file SiStripPartition.h.

Referenced by fineDelayVersion(), operator=(), operator==(), print(), pset(), reset(), and update().

bool SiStripPartition::forceCurrentState_ [private]

Definition at line 133 of file SiStripPartition.h.

Referenced by forceCurrentState(), operator=(), operator==(), print(), pset(), reset(), and update().

bool SiStripPartition::forceVersions_ [private]

Definition at line 131 of file SiStripPartition.h.

Referenced by forceVersions(), operator=(), operator==(), print(), pset(), reset(), and update().

uint32_t SiStripPartition::globalAnalysisV_ [private]

Definition at line 149 of file SiStripPartition.h.

Referenced by globalAnalysisVersion(), operator=(), operator==(), print(), pset(), reset(), and update().

std::string SiStripPartition::inputDcuInfoXml_ [private]

Definition at line 173 of file SiStripPartition.h.

Referenced by inputDcuInfoXml(), operator=(), operator==(), print(), pset(), and reset().

std::vector<std::string> SiStripPartition::inputFecXml_ [private]

Definition at line 175 of file SiStripPartition.h.

Referenced by inputFecXml(), operator=(), operator==(), print(), pset(), reset(), and ~SiStripPartition().

std::vector<std::string> SiStripPartition::inputFedXml_ [private]

Definition at line 177 of file SiStripPartition.h.

Referenced by inputFedXml(), operator=(), operator==(), print(), pset(), reset(), and ~SiStripPartition().

std::string SiStripPartition::inputModuleXml_ [private]

Definition at line 171 of file SiStripPartition.h.

Referenced by inputModuleXml(), operator=(), operator==(), print(), pset(), and reset().

Versions SiStripPartition::optoScanV_ [private]

Definition at line 157 of file SiStripPartition.h.

Referenced by operator=(), operator==(), optoScanVersion(), print(), pset(), reset(), and update().

std::string SiStripPartition::partitionName_ [private]

Definition at line 125 of file SiStripPartition.h.

Referenced by operator=(), operator==(), partitionName(), print(), pset(), reset(), SiStripPartition(), and update().

Versions SiStripPartition::pedestalsV_ [private]

Definition at line 163 of file SiStripPartition.h.

Referenced by operator=(), operator==(), pedestalsVersion(), print(), pset(), reset(), and update().

Versions SiStripPartition::psuVersion_ [private]

Definition at line 145 of file SiStripPartition.h.

Referenced by operator=(), operator==(), print(), pset(), psuVersion(), reset(), and update().

uint32_t SiStripPartition::runNumber_ [private]

Definition at line 127 of file SiStripPartition.h.

Referenced by operator=(), operator==(), print(), pset(), reset(), runNumber(), and update().

Versions SiStripPartition::runTableVersion_ [private]

Definition at line 151 of file SiStripPartition.h.

Referenced by operator=(), operator==(), print(), reset(), runTableVersion(), and update().

sistrip::RunType SiStripPartition::runType_ [private]

Definition at line 129 of file SiStripPartition.h.

Referenced by operator=(), operator==(), print(), reset(), runType(), and update().

Versions SiStripPartition::vpspScanV_ [private]

Definition at line 159 of file SiStripPartition.h.

Referenced by operator=(), operator==(), print(), pset(), reset(), update(), and vpspScanVersion().


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