CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
SiStripPartition Class Reference

Container class for database partition parameters. More...

#include <SiStripPartition.h>

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
 
bool forceCurrentState () const
 
void forceCurrentState (bool)
 
bool forceVersions () const
 
void forceVersions (bool)
 
uint32_t globalAnalysisVersion () const
 
std::string inputDcuInfoXml () const
 
std::vector< std::string > inputFecXml () const
 
std::vector< std::string > inputFedXml () const
 
std::string inputModuleXml () const
 
Versions maskVersion () const
 
bool operator!= (const SiStripPartition &) const
 
SiStripPartitionoperator= (const SiStripPartition &)
 
bool operator== (const SiStripPartition &) const
 
Versions optoScanVersion () const
 
std::string partitionName () const
 
void partitionName (std::string)
 
Versions pedestalsVersion () const
 
void print (std::stringstream &, bool using_db=false) const
 
void pset (const edm::ParameterSet &)
 
Versions psuVersion () const
 
void reset ()
 
uint32_t runNumber () const
 
void runNumber (uint32_t)
 
Versions runTableVersion () const
 
sistrip::RunType runType () const
 
 SiStripPartition ()
 
 SiStripPartition (std::string partition_name)
 
 SiStripPartition (const 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 maskVersion_
 
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.

18  :
20  runNumber_(0),
22  forceVersions_(false),
23  forceCurrentState_(false),
24  cabVersion_(0,0),
25  fedVersion_(0,0),
26  fecVersion_(0,0),
27  dcuVersion_(0,0),
28  psuVersion_(0,0),
29  //#ifdef USING_DATABASE_MASKING
30  maskVersion_(0,0),
31  //#endif
33  runTableVersion_(0,0),
34  fastCablingV_(0,0),
35  apvTimingV_(0,0),
36  optoScanV_(0,0),
37  vpspScanV_(0,0),
38  apvCalibV_(0,0),
39  pedestalsV_(0,0),
40  apvLatencyV_(0,0),
41  fineDelayV_(0,0),
42  inputModuleXml_(""),
43  inputDcuInfoXml_(""),
44  inputFecXml_(),
45  inputFedXml_()
46 {;}
static std::string defaultPartitionName_
sistrip::RunType runType_
std::string partitionName_
std::vector< std::string > inputFedXml_
std::string inputDcuInfoXml_
std::string inputModuleXml_
std::vector< std::string > inputFecXml_
SiStripPartition::SiStripPartition ( std::string  partition_name)

Definition at line 50 of file SiStripPartition.cc.

References defaultPartitionName_, and partitionName_.

50  :
51  partitionName_(partition),
52  runNumber_(0),
54  forceVersions_(false),
55  forceCurrentState_(false),
56  cabVersion_(0,0),
57  fedVersion_(0,0),
58  fecVersion_(0,0),
59  dcuVersion_(0,0),
60  psuVersion_(0,0),
61  //#ifdef USING_DATABASE_MASKING
62  maskVersion_(0,0),
63  //#endif
65  runTableVersion_(0,0),
66  fastCablingV_(0,0),
67  apvTimingV_(0,0),
68  optoScanV_(0,0),
69  vpspScanV_(0,0),
70  apvCalibV_(0,0),
71  pedestalsV_(0,0),
72  apvLatencyV_(0,0),
73  fineDelayV_(0,0),
74  inputModuleXml_(""),
75  inputDcuInfoXml_(""),
76  inputFecXml_(),
77  inputFedXml_()
78 {
80 }
static std::string defaultPartitionName_
sistrip::RunType runType_
std::string partitionName_
std::vector< std::string > inputFedXml_
std::string inputDcuInfoXml_
std::string inputModuleXml_
std::vector< std::string > inputFecXml_
SiStripPartition::SiStripPartition ( const SiStripPartition input)

Definition at line 84 of file SiStripPartition.cc.

84  :
85  partitionName_( input.partitionName() ),
86  runNumber_( input.runNumber() ),
87  runType_( input.runType() ),
88  forceVersions_( input.forceVersions() ),
90  cabVersion_( input.cabVersion() ),
91  fedVersion_( input.fedVersion() ),
92  fecVersion_( input.fecVersion() ),
93  dcuVersion_( input.dcuVersion() ),
94  psuVersion_( input.psuVersion() ),
95  //#ifdef USING_DATABASE_MASKING
96  maskVersion_( input.maskVersion() ),
97  //#endif
101  apvTimingV_( input.apvTimingVersion() ),
102  optoScanV_( input.optoScanVersion() ),
103  vpspScanV_( input.vpspScanVersion() ),
104  apvCalibV_( input.apvCalibVersion() ),
105  pedestalsV_( input.pedestalsVersion() ),
106  apvLatencyV_( input.apvLatencyVersion() ),
107  fineDelayV_( input.fineDelayVersion() ),
108  inputModuleXml_( input.inputModuleXml() ),
110  inputFecXml_( input.inputFecXml() ),
111  inputFedXml_( input.inputFedXml() )
112 {;}
sistrip::RunType runType_
Versions maskVersion() const
Versions pedestalsVersion() const
Versions vpspScanVersion() const
Versions fineDelayVersion() const
Versions optoScanVersion() const
std::string partitionName() const
std::string partitionName_
uint32_t runNumber() const
uint32_t globalAnalysisVersion() const
Versions apvTimingVersion() const
Versions apvLatencyVersion() const
std::vector< std::string > inputFedXml_
Versions runTableVersion() const
std::vector< std::string > inputFecXml() const
bool forceCurrentState() const
std::string inputDcuInfoXml_
std::string inputModuleXml_
Versions apvCalibVersion() const
std::vector< std::string > inputFecXml_
std::vector< std::string > inputFedXml() const
Versions dcuVersion() const
bool forceVersions() const
Versions psuVersion() const
sistrip::RunType runType() const
Versions fecVersion() const
Versions cabVersion() const
Versions fedVersion() const
std::string inputDcuInfoXml() const
std::string inputModuleXml() const
Versions fastCablingVersion() const
SiStripPartition::~SiStripPartition ( )

Definition at line 188 of file SiStripPartition.cc.

References inputFecXml_, and inputFedXml_.

188  {
189  inputFecXml_.clear();
190  inputFedXml_.clear();
191 }
std::vector< std::string > inputFedXml_
std::vector< std::string > inputFecXml_

Member Function Documentation

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

Definition at line 212 of file SiStripPartition.h.

References apvCalibV_.

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

212 { return apvCalibV_; }
SiStripPartition::Versions SiStripPartition::apvLatencyVersion ( ) const
inline

Definition at line 214 of file SiStripPartition.h.

References apvLatencyV_.

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

214 { return apvLatencyV_; }
SiStripPartition::Versions SiStripPartition::apvTimingVersion ( ) const
inline

Definition at line 209 of file SiStripPartition.h.

References apvTimingV_.

Referenced by SiStripCondObjBuilderFromDb::checkForCompatibility(), operator=(), and operator==().

209 { return apvTimingV_; }
SiStripPartition::Versions SiStripPartition::cabVersion ( ) const
inline

Definition at line 197 of file SiStripPartition.h.

References cabVersion_.

Referenced by SiStripCondObjBuilderFromDb::checkForCompatibility(), operator=(), and operator==().

197 { return cabVersion_; }
SiStripPartition::Versions SiStripPartition::dcuVersion ( ) const
inline

Definition at line 200 of file SiStripPartition.h.

References dcuVersion_.

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

200 { return dcuVersion_; }
SiStripPartition::Versions SiStripPartition::fastCablingVersion ( ) const
inline

Definition at line 208 of file SiStripPartition.h.

References fastCablingV_.

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

208 { return fastCablingV_; }
SiStripPartition::Versions SiStripPartition::fecVersion ( ) const
inline

Definition at line 199 of file SiStripPartition.h.

References fecVersion_.

Referenced by SiStripCondObjBuilderFromDb::checkForCompatibility(), operator=(), and operator==().

199 { return fecVersion_; }
SiStripPartition::Versions SiStripPartition::fedVersion ( ) const
inline

Definition at line 198 of file SiStripPartition.h.

References fedVersion_.

Referenced by SiStripCondObjBuilderFromDb::checkForCompatibility(), operator=(), and operator==().

198 { return fedVersion_; }
SiStripPartition::Versions SiStripPartition::fineDelayVersion ( ) const
inline

Definition at line 215 of file SiStripPartition.h.

References fineDelayV_.

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

215 { return fineDelayV_; }
bool SiStripPartition::forceCurrentState ( ) const
inline

Definition at line 195 of file SiStripPartition.h.

References forceCurrentState_.

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

195 { return forceCurrentState_; }
void SiStripPartition::forceCurrentState ( bool  force)
inline

Definition at line 225 of file SiStripPartition.h.

References forceCurrentState_.

225 { forceCurrentState_ = force; }
bool SiStripPartition::forceVersions ( ) const
inline

Definition at line 194 of file SiStripPartition.h.

References forceVersions_.

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

194 { return forceVersions_; }
void SiStripPartition::forceVersions ( bool  force)
inline

Definition at line 224 of file SiStripPartition.h.

References forceVersions_.

224 { forceVersions_ = force; }
uint32_t SiStripPartition::globalAnalysisVersion ( ) const
inline

Definition at line 206 of file SiStripPartition.h.

References globalAnalysisV_.

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

206 { return globalAnalysisV_; }
std::string SiStripPartition::inputDcuInfoXml ( ) const
inline

Definition at line 218 of file SiStripPartition.h.

References inputDcuInfoXml_.

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

218 { return inputDcuInfoXml_; }
std::string inputDcuInfoXml_
std::vector< std::string > SiStripPartition::inputFecXml ( ) const
inline

Definition at line 219 of file SiStripPartition.h.

References inputFecXml_.

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

219 { return inputFecXml_; }
std::vector< std::string > inputFecXml_
std::vector< std::string > SiStripPartition::inputFedXml ( ) const
inline

Definition at line 220 of file SiStripPartition.h.

References inputFedXml_.

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

220 { return inputFedXml_; }
std::vector< std::string > inputFedXml_
std::string SiStripPartition::inputModuleXml ( ) const
inline

Definition at line 217 of file SiStripPartition.h.

References inputModuleXml_.

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

217 { return inputModuleXml_; }
std::string inputModuleXml_
SiStripPartition::Versions SiStripPartition::maskVersion ( ) const
inline

Definition at line 203 of file SiStripPartition.h.

References maskVersion_.

Referenced by SiStripCondObjBuilderFromDb::checkForCompatibility(), operator=(), and operator==().

203 { return maskVersion_; }
bool SiStripPartition::operator!= ( const SiStripPartition input) const

Definition at line 182 of file SiStripPartition.cc.

References LaserDQM_cfg::input.

182  {
183  return !( *this == input );
184 }
SiStripPartition & SiStripPartition::operator= ( const SiStripPartition input)

Definition at line 116 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_, maskVersion(), maskVersion_, optoScanV_, optoScanVersion(), partitionName(), partitionName_, pedestalsV_, pedestalsVersion(), psuVersion(), psuVersion_, runNumber(), runNumber_, runTableVersion(), runTableVersion_, runType(), runType_, vpspScanV_, and vpspScanVersion().

116  {
117  if ( this == &input ) { return *this; } // self-assignment
118  partitionName_ = input.partitionName();
119  runNumber_ = input.runNumber();
120  runType_ = input.runType();
121  forceVersions_ = input.forceVersions();
123  cabVersion_ = input.cabVersion();
124  fedVersion_ = input.fedVersion();
125  fecVersion_ = input.fecVersion();
126  dcuVersion_ = input.dcuVersion();
127  psuVersion_ = input.psuVersion();
128  //#ifdef USING_DATABASE_MASKING
129  maskVersion_ = input.maskVersion();
130  //#endif
134  apvTimingV_ = input.apvTimingVersion();
135  optoScanV_ = input.optoScanVersion();
136  vpspScanV_ = input.vpspScanVersion();
137  apvCalibV_ = input.apvCalibVersion();
138  pedestalsV_ = input.pedestalsVersion();
140  fineDelayV_ = input.fineDelayVersion();
143  inputFecXml_ = input.inputFecXml();
144  inputFedXml_ = input.inputFedXml();
145  return *this;
146 }
sistrip::RunType runType_
Versions maskVersion() const
Versions pedestalsVersion() const
Versions vpspScanVersion() const
Versions fineDelayVersion() const
Versions optoScanVersion() const
std::string partitionName() const
std::string partitionName_
uint32_t runNumber() const
uint32_t globalAnalysisVersion() const
Versions apvTimingVersion() const
Versions apvLatencyVersion() const
std::vector< std::string > inputFedXml_
Versions runTableVersion() const
std::vector< std::string > inputFecXml() const
bool forceCurrentState() const
std::string inputDcuInfoXml_
std::string inputModuleXml_
Versions apvCalibVersion() const
std::vector< std::string > inputFecXml_
std::vector< std::string > inputFedXml() const
Versions dcuVersion() const
bool forceVersions() const
Versions psuVersion() const
sistrip::RunType runType() const
Versions fecVersion() const
Versions cabVersion() const
Versions fedVersion() const
std::string inputDcuInfoXml() const
std::string inputModuleXml() const
Versions fastCablingVersion() const
bool SiStripPartition::operator== ( const SiStripPartition input) const

Definition at line 150 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_, maskVersion(), maskVersion_, optoScanV_, optoScanVersion(), partitionName(), partitionName_, pedestalsV_, pedestalsVersion(), psuVersion(), psuVersion_, runNumber(), runNumber_, runTableVersion(), runTableVersion_, runType(), runType_, vpspScanV_, and vpspScanVersion().

150  {
151  return ( partitionName_ == input.partitionName() &&
152  runNumber_ == input.runNumber() &&
153  runType_ == input.runType() &&
154  forceVersions_ == input.forceVersions() &&
156  cabVersion_ == input.cabVersion() &&
157  fedVersion_ == input.fedVersion() &&
158  fecVersion_ == input.fecVersion() &&
159  dcuVersion_ == input.dcuVersion() &&
160  psuVersion_ == input.psuVersion() &&
161  //#ifdef USING_DATABASE_MASKING
162  maskVersion_ == input.maskVersion() &&
163  //#endif
165  runTableVersion_ == input.runTableVersion() &&
166  fastCablingV_ == input.fastCablingVersion() &&
167  apvTimingV_ == input.apvTimingVersion() &&
168  optoScanV_ == input.optoScanVersion() &&
169  vpspScanV_ == input.vpspScanVersion() &&
170  apvCalibV_ == input.apvCalibVersion() &&
171  pedestalsV_ == input.pedestalsVersion() &&
172  apvLatencyV_ == input.apvLatencyVersion() &&
173  fineDelayV_ == input.fineDelayVersion() &&
174  inputModuleXml_ == input.inputModuleXml() &&
175  inputDcuInfoXml_ == input.inputDcuInfoXml() &&
176  inputFecXml_ == input.inputFecXml() &&
177  inputFedXml_ == input.inputFedXml() );
178 }
sistrip::RunType runType_
Versions maskVersion() const
Versions pedestalsVersion() const
Versions vpspScanVersion() const
Versions fineDelayVersion() const
Versions optoScanVersion() const
std::string partitionName() const
std::string partitionName_
uint32_t runNumber() const
uint32_t globalAnalysisVersion() const
Versions apvTimingVersion() const
Versions apvLatencyVersion() const
std::vector< std::string > inputFedXml_
Versions runTableVersion() const
std::vector< std::string > inputFecXml() const
bool forceCurrentState() const
std::string inputDcuInfoXml_
std::string inputModuleXml_
Versions apvCalibVersion() const
std::vector< std::string > inputFecXml_
std::vector< std::string > inputFedXml() const
Versions dcuVersion() const
bool forceVersions() const
Versions psuVersion() const
sistrip::RunType runType() const
Versions fecVersion() const
Versions cabVersion() const
Versions fedVersion() const
std::string inputDcuInfoXml() const
std::string inputModuleXml() const
Versions fastCablingVersion() const
SiStripPartition::Versions SiStripPartition::optoScanVersion ( ) const
inline

Definition at line 210 of file SiStripPartition.h.

References optoScanV_.

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

210 { return optoScanV_; }
std::string SiStripPartition::partitionName ( ) const
inline
void SiStripPartition::partitionName ( std::string  name)
inline
SiStripPartition::Versions SiStripPartition::pedestalsVersion ( ) const
inline

Definition at line 213 of file SiStripPartition.h.

References pedestalsV_.

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

213 { return pedestalsV_; }
void SiStripPartition::print ( std::stringstream &  ss,
bool  using_db = false 
) const

Definition at line 716 of file SiStripPartition.cc.

References sistrip::APV_LATENCY, sistrip::APV_TIMING, apvCalibV_, apvLatencyV_, apvTimingV_, cabVersion_, sistrip::CALIBRATION, dcuVersion_, sistrip::FAST_CABLING, fastCablingV_, fecVersion_, fedVersion_, sistrip::FINE_DELAY_TTC, fineDelayV_, forceCurrentState_, forceVersions_, globalAnalysisV_, inputDcuInfoXml_, inputFecXml_, inputFedXml_, inputModuleXml_, maskVersion_, 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<<().

716  {
717 
718  ss << " Partition : \"" << partitionName_ << "\"" << std::endl;
719 
720  if ( using_db ) {
721 
722  ss << " Run number : ";
723  if ( forceCurrentState_ ) { ss << "Forced \"current state\"! (equivalent to versions below)"; }
724  else if ( forceVersions_ ) { ss << "Forced versions specified below!"; }
725  else /* use run number */ { ss << runNumber_; }
726 
727  ss << std::endl;
728  if ( !forceVersions_ ) {
729  ss << " Run type : " << SiStripEnumsAndStrings::runType( runType_ ) << std::endl;
730  }
731 
732  ss << " Cabling major/minor vers : " << cabVersion_.first << "." << cabVersion_.second << std::endl
733  << " FEC major/minor vers : " << fecVersion_.first << "." << fecVersion_.second << std::endl
734  << " FED major/minor vers : " << fedVersion_.first << "." << fedVersion_.second << std::endl
735  << " DCU-DetId map maj/min vers : " << dcuVersion_.first << "." << dcuVersion_.second << std::endl
736  //#ifdef USING_DATABASE_MASKING
737  << " DCU-PSU map maj/min vers : " << psuVersion_.first << "." << psuVersion_.second << std::endl
738  << " Mask maj/min vers : " << maskVersion_.first << "." << maskVersion_.second << std::endl;
739  //#else
740  // << " DCU-PSU map maj/min vers : " << psuVersion_.first << "." << psuVersion_.second << std::endl;
741  //#endif
742 
743  ss << " Global analysis version : " << globalAnalysisV_ << std::endl;
744 
745 
746  if ( runType_ == sistrip::PHYSICS ||
749 
750  ss << " FED cabling maj/min vers : " << fastCablingV_.first << "." << fastCablingV_.second << std::endl;
751  ss << " APV timing maj/min vers : " << apvTimingV_.first << "." << apvTimingV_.second << std::endl;
752  ss << " Opto scan maj/min vers : " << optoScanV_.first << "." << optoScanV_.second << std::endl;
753  ss << " VPSP scan maj/min vers : " << vpspScanV_.first << "." << vpspScanV_.second << std::endl;
754  ss << " APV calib maj/min vers : " << apvCalibV_.first << "." << apvCalibV_.second << std::endl;
755  ss << " Pedestals maj/min vers : " << pedestalsV_.first << "." << pedestalsV_.second << std::endl;
756  ss << " APV latency maj/min vers : " << apvLatencyV_.first << "." << apvLatencyV_.second << std::endl;
757  ss << " Fine delay maj/min vers : " << fineDelayV_.first << "." << fineDelayV_.second << std::endl;
758 
759  } else {
760 
761  if ( runType_ != sistrip::FAST_CABLING ) {
762  ss << " FED cabling maj/min vers : " << fastCablingV_.first << "." << fastCablingV_.second << std::endl;
763  } else {
764  ss << " FED cabling maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
765  << " <= This \"state\" version overriden by \"history\" version "
766  << fastCablingV_.first << "." << fastCablingV_.second
767  << " for this FED cabling run!" << std::endl;
768  }
769 
770  if ( runType_ != sistrip::APV_TIMING ) {
771  ss << " APV timing maj/min vers : " << apvTimingV_.first << "." << apvTimingV_.second << std::endl;
772  } else {
773  ss << " APV timing maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
774  << " <= This \"state\" version overriden by \"history\" version "
775  << apvTimingV_.first << "." << apvTimingV_.second
776  << " for this APV timing run!" << std::endl;
777  }
778 
779  if ( runType_ != sistrip::OPTO_SCAN ) {
780  ss << " Opto scan maj/min vers : " << optoScanV_.first << "." << optoScanV_.second << std::endl;
781  } else {
782  ss << " Opto scan maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
783  << " <= This \"state\" version overriden by \"history\" version "
784  << optoScanV_.first << "." << optoScanV_.second
785  << " for this opto scan run!" << std::endl;
786  }
787 
788  if ( runType_ != sistrip::VPSP_SCAN ) {
789  ss << " VPSP scan maj/min vers : " << vpspScanV_.first << "." << vpspScanV_.second << std::endl;
790  } else {
791  ss << " VPSP scan maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
792  << " <= This \"state\" version overriden by \"history\" version "
793  << vpspScanV_.first << "." << vpspScanV_.second
794  << " for this VPSP scan run!" << std::endl;
795  }
796 
797  if ( runType_ != sistrip::CALIBRATION ) {
798  ss << " APV calib maj/min vers : " << apvCalibV_.first << "." << apvCalibV_.second << std::endl;
799  } else {
800  ss << " APV calib maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
801  << " <= This \"state\" version overriden by \"history\" version "
802  << apvCalibV_.first << "." << apvCalibV_.second
803  << " for this APV calib run!" << std::endl;
804  }
805 
806  if ( runType_ != sistrip::PEDESTALS ) {
807  ss << " Pedestals maj/min vers : " << pedestalsV_.first << "." << pedestalsV_.second << std::endl;
808  } else {
809  ss << " Pedestals maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
810  << " <= This \"state\" version overriden by \"history\" version "
811  << pedestalsV_.first << "." << pedestalsV_.second
812  << " for this pedestals run!" << std::endl;
813  }
814 
815  if ( runType_ != sistrip::APV_LATENCY ) {
816  ss << " APV latency maj/min vers : " << apvLatencyV_.first << "." << apvLatencyV_.second << std::endl;
817  } else {
818  ss << " APV latency maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
819  << " <= This \"state\" version overriden by \"history\" version "
820  << apvLatencyV_.first << "." << apvLatencyV_.second
821  << " for this APV latency run!" << std::endl;
822  }
823 
824  if ( runType_ != sistrip::FINE_DELAY_TTC ) {
825  ss << " Fine delay maj/min vers : " << fineDelayV_.first << "." << fineDelayV_.second << std::endl;
826  } else {
827  ss << " Fine delay maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
828  << " <= This \"state\" version overriden by \"history\" version "
829  << fineDelayV_.first << "." << fineDelayV_.second
830  << " for this fine delay run!" << std::endl;
831  }
832 
833  }
834 
835  } else {
836 
837  ss << " Input \"module.xml\" file : " << inputModuleXml_ << std::endl
838  << " Input \"dcuinfo.xml\" file : " << inputDcuInfoXml_ << std::endl
839  << " Input \"fec.xml\" file(s) : ";
840  std::vector<std::string>::const_iterator ifec = inputFecXml_.begin();
841  for ( ; ifec != inputFecXml_.end(); ifec++ ) { ss << *ifec << ", "; }
842  ss << std::endl;
843  ss << " Input \"fed.xml\" file(s) : ";
844  std::vector<std::string>::const_iterator ifed = inputFedXml_.begin();
845  for ( ; ifed != inputFedXml_.end(); ifed++ ) { ss << *ifed << ", "; }
846  ss << std::endl;
847 
848  }
849 
850 }
sistrip::RunType runType_
std::string partitionName_
static std::string runType(const sistrip::RunType &)
std::vector< std::string > inputFedXml_
std::string inputDcuInfoXml_
std::string inputModuleXml_
std::vector< std::string > inputFecXml_
void SiStripPartition::pset ( const edm::ParameterSet pset)

Definition at line 230 of file SiStripPartition.cc.

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

Referenced by SiStripDbParams::pset().

230  {
231 
232  partitionName_ = pset.getUntrackedParameter<std::string>( "PartitionName", "" );
233  runNumber_ = pset.getUntrackedParameter<unsigned int>( "RunNumber", 0 );
234  forceVersions_ = pset.getUntrackedParameter<bool>( "ForceVersions", false );
235  forceCurrentState_ = pset.getUntrackedParameter<bool>( "ForceCurrentState", false );
236 
237  std::vector<uint32_t> tmp1(2,0);
238  cabVersion_ = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "CablingVersion", tmp1 ) );
239  fedVersion_ = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "FedVersion", tmp1 ) );
240  fecVersion_ = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "FecVersion", tmp1 ) );
241  dcuVersion_ = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "DcuDetIdsVersion", tmp1 ) );
242  psuVersion_ = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "DcuPsuMapVersion", tmp1 ) );
243  //#ifdef USING_DATABASE_MASKING
244  maskVersion_ = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "MaskVersion", tmp1 ) );
245  //#endif
246 
247  std::vector<uint32_t> tmp2(2,0);
248  globalAnalysisV_ = pset.getUntrackedParameter<uint32_t>( "GlobalAnalysisVersion", 0 );
249  fastCablingV_ = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "FastCablingVersion", tmp2 ) );
250  apvTimingV_ = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "ApvTimingVersion", tmp2 ) );
251  optoScanV_ = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "OptoScanVersion", tmp2 ) );
252  vpspScanV_ = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "VpspScanVersion", tmp2 ) );
253  apvCalibV_ = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "ApvCalibVersion", tmp2 ) );
254  pedestalsV_ = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "PedestalsVersion", tmp2 ) );
255  apvLatencyV_ = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "ApvLatencyVersion", tmp2 ) );
256  fineDelayV_ = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "FineDelayVersion", tmp2 ) );
257 
258  std::vector<std::string> tmp3(1,"");
259  inputModuleXml_ = pset.getUntrackedParameter<std::string>( "InputModuleXml", "" );
260  inputDcuInfoXml_ = pset.getUntrackedParameter<std::string>( "InputDcuInfoXml", "" );
261  inputFecXml_ = pset.getUntrackedParameter< std::vector<std::string> >( "InputFecXml", tmp3 );
262  inputFedXml_ = pset.getUntrackedParameter< std::vector<std::string> >( "InputFedXml", tmp3 );
263 
264 }
T getUntrackedParameter(std::string const &, T const &) const
std::string partitionName_
std::vector< std::string > inputFedXml_
Versions versions(std::vector< uint32_t >)
std::string inputDcuInfoXml_
std::string inputModuleXml_
std::vector< std::string > inputFecXml_
SiStripPartition::Versions SiStripPartition::psuVersion ( ) const
inline

Definition at line 201 of file SiStripPartition.h.

References psuVersion_.

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

201 { return psuVersion_; }
void SiStripPartition::reset ( void  )

Definition at line 195 of file SiStripPartition.cc.

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

195  {
196  partitionName_ = "";
197  runNumber_ = 0;
199  forceVersions_ = false;
200  forceCurrentState_ = false;
201 
202  cabVersion_ = std::make_pair(0,0);
203  fedVersion_ = std::make_pair(0,0);
204  fecVersion_ = std::make_pair(0,0);
205  dcuVersion_ = std::make_pair(0,0);
206  psuVersion_ = std::make_pair(0,0);
207  //#ifdef USING_DATABASE_MASKING
208  maskVersion_ = std::make_pair(0,0);
209  //#endif
210 
211  globalAnalysisV_ = 0;
212  runTableVersion_ = std::make_pair(0,0);
213  fastCablingV_ = std::make_pair(0,0);
214  apvTimingV_ = std::make_pair(0,0);
215  optoScanV_ = std::make_pair(0,0);
216  vpspScanV_ = std::make_pair(0,0);
217  apvCalibV_ = std::make_pair(0,0);
218  pedestalsV_ = std::make_pair(0,0);
219  apvLatencyV_ = std::make_pair(0,0);
220  fineDelayV_ = std::make_pair(0,0);
221 
222  inputModuleXml_ = "";
223  inputDcuInfoXml_ = "";
224  inputFecXml_.clear(); inputFecXml_.push_back("");
225  inputFedXml_.clear(); inputFedXml_.push_back("");
226 }
sistrip::RunType runType_
std::string partitionName_
std::vector< std::string > inputFedXml_
std::string inputDcuInfoXml_
std::string inputModuleXml_
std::vector< std::string > inputFecXml_
uint32_t SiStripPartition::runNumber ( ) const
inline

Definition at line 192 of file SiStripPartition.h.

References runNumber_.

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

192 { return runNumber_; }
void SiStripPartition::runNumber ( uint32_t  run)
inline

Definition at line 223 of file SiStripPartition.h.

References DTTTrigCorrFirst::run, and runNumber_.

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

Definition at line 207 of file SiStripPartition.h.

References runTableVersion_.

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

207 { return runTableVersion_; }
sistrip::RunType SiStripPartition::runType ( ) const
inline

Definition at line 193 of file SiStripPartition.h.

References runType_.

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

193 { return runType_; }
sistrip::RunType runType_
void SiStripPartition::update ( const SiStripConfigDb * const  db)

Definition at line 268 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, maskVersion_, sistrip::mlConfigDb_, sistrip::MULTI_MODE, sistrip::OPTO_SCAN, optoScanV_, partitionName_, sistrip::PEDESTALS, pedestalsV_, sistrip::PHYSICS, psuVersion_, sistrip::QUITE_FAST_CABLING, DTTTrigCorrFirst::run, runNumber_, runTableVersion_, runType_, sistrip::UNDEFINED_RUN_TYPE, sistrip::UNKNOWN_RUN_TYPE, sistrip::VPSP_SCAN, and vpspScanV_.

Referenced by progressbar.ProgressBar::__next__(), relval_steps.Matrix::__setitem__(), relval_steps.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), relval_steps.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

268  {
269 
270  // Check
271  if ( !db ) {
273  << "[SiStripPartition::" << __func__ << "]"
274  << " NULL pointer to SiStripConfigDb object!"
275  << " Aborting update...";
276  return;
277  }
278 
279  // Check
280  DeviceFactory* const df = db->deviceFactory(__func__);
281  if ( !df ) {
283  << "[SiStripPartition::" << __func__ << "]"
284  << " NULL pointer to DeviceFactory object!"
285  << " Aborting update...";
286  return;
287  }
288 
289  // Check partition name
290  if ( partitionName_ == defaultPartitionName_ ) { return; }
291 
292  // Debug
293  std::stringstream ss;
294  ss << "[SiStripPartition::" << __func__ << "]"
295  << " Updating description versions for partition \""
296  << partitionName_
297  << "\"...";
298  LogTrace(mlConfigDb_) << ss.str();
299 
300  try {
301 
302  // Reset container indicating state versions for commissioning runs
303  runTableVersion_ = Versions(0,0);
304 
305  // Update versions if using versions from "current state"
307 
308  // Find state for given partition
309  tkStateVector states;
310  states = df->getCurrentStates();
311  tkStateVector::const_iterator istate = states.begin();
312  tkStateVector::const_iterator jstate = states.end();
313  while ( istate != jstate ) {
314  if ( *istate && partitionName_ == (*istate)->getPartitionName() ) { break; }
315  istate++;
316  }
317 
318  // Set versions if state was found
319  if ( istate != states.end() ) {
320 
321  if ( !cabVersion_.first &&
322  !cabVersion_.second ) {
323  cabVersion_.first = (*istate)->getConnectionVersionMajorId();
324  cabVersion_.second = (*istate)->getConnectionVersionMinorId();
325  }
326  if ( !fecVersion_.first &&
327  !fecVersion_.second ) {
328  fecVersion_.first = (*istate)->getFecVersionMajorId();
329  fecVersion_.second = (*istate)->getFecVersionMinorId();
330  }
331  if ( !fedVersion_.first &&
332  !fedVersion_.second ) {
333  fedVersion_.first = (*istate)->getFedVersionMajorId();
334  fedVersion_.second = (*istate)->getFedVersionMinorId();
335  }
336  if ( !dcuVersion_.first &&
337  !dcuVersion_.second ) {
338  dcuVersion_.first = (*istate)->getDcuInfoVersionMajorId();
339  dcuVersion_.second = (*istate)->getDcuInfoVersionMinorId();
340  }
341  if ( !psuVersion_.first &&
342  !psuVersion_.second ) {
343  psuVersion_.first = (*istate)->getDcuPsuMapVersionMajorId();
344  psuVersion_.second = (*istate)->getDcuPsuMapVersionMinorId();
345  }
346  //#ifdef USING_DATABASE_MASKING
347  if ( !forceVersions_ &&
348  !maskVersion_.first &&
349  !maskVersion_.second ) {
350  maskVersion_.first = (*istate)->getMaskVersionMajorId();
351  maskVersion_.second = (*istate)->getMaskVersionMinorId();
352  }
353  //#endif
354 
355  // Retrieve global and local versions
356  if ( forceCurrentState_ || globalAnalysisV_ ) { // use global version (or current state)
357 
358  // Set global version
359  if ( forceCurrentState_ ) { globalAnalysisV_ = (*istate)->getAnalysisVersionMapPointerId(); }
360 
361  // Retrieve local versions
362  HashMapAnalysisVersions local_versions = df->getLocalAnalysisVersions( globalAnalysisV_ );
363 
364  // Iterate through map< AnalysisType, pair<Major,Minor> >
365  HashMapAnalysisVersions::const_iterator ivers = local_versions.begin();
366  HashMapAnalysisVersions::const_iterator jvers = local_versions.end();
367  for ( ; ivers != jvers; ++ivers ) {
368  if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_FASTFEDCABLING ) {
369  fastCablingV_.first = ivers->second.first;
370  fastCablingV_.second = ivers->second.second;
371  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_TIMING ) {
372  apvTimingV_.first = ivers->second.first;
373  apvTimingV_.second = ivers->second.second;
374  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_OPTOSCAN ) {
375  optoScanV_.first = ivers->second.first;
376  optoScanV_.second = ivers->second.second;
377  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_VPSPSCAN ) {
378  vpspScanV_.first = ivers->second.first;
379  vpspScanV_.second = ivers->second.second;
380  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_CALIBRATION ) {
381  apvCalibV_.first = ivers->second.first;
382  apvCalibV_.second = ivers->second.second;
383  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_PEDESTALS ) {
384  pedestalsV_.first = ivers->second.first;
385  pedestalsV_.second = ivers->second.second;
386  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_APVLATENCY ) {
387  apvLatencyV_.first = ivers->second.first;
388  apvLatencyV_.second = ivers->second.second;
389  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_FINEDELAY ) {
390  fineDelayV_.first = ivers->second.first;
391  fineDelayV_.second = ivers->second.second;
392  } else if ( ivers->first == CommissioningAnalysisDescription::T_UNKNOWN ) {
393  std::stringstream ss;
395  << "[SiStripPartition::" << __func__ << "]"
396  << " Found UNKNOWN AnalysisType!";
397  edm::LogWarning(mlConfigDb_) << ss.str();
398  } else {
399  std::stringstream ss;
401  << "[SiStripPartition::" << __func__ << "]"
402  << " Unable to match content to any AnalysisType!";
403  edm::LogWarning(mlConfigDb_) << ss.str();
404  }
405  }
406 
407  } else if ( !globalAnalysisV_ ) { // use local versions
408 
409  // Retrieve local versions and set if necessary
410  globalAnalysisV_ = (*istate)->getAnalysisVersionMapPointerId();
411  HashMapAnalysisVersions local_versions = df->getLocalAnalysisVersions( globalAnalysisV_ );
412 
413  // Iterate through map< AnalysisType, pair<Major,Minor> >
414  HashMapAnalysisVersions::const_iterator ivers = local_versions.begin();
415  HashMapAnalysisVersions::const_iterator jvers = local_versions.end();
416  for ( ; ivers != jvers; ++ivers ) {
417  if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_FASTFEDCABLING ) {
418  if ( !fastCablingV_.first && !fastCablingV_.second ) {
419  fastCablingV_.first = ivers->second.first;
420  fastCablingV_.second = ivers->second.second;
421  }
422  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_TIMING ) {
423  if ( !apvTimingV_.first && !apvTimingV_.second ) {
424  apvTimingV_.first = ivers->second.first;
425  apvTimingV_.second = ivers->second.second;
426  }
427  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_OPTOSCAN ) {
428  if ( !optoScanV_.first && !optoScanV_.second ) {
429  optoScanV_.first = ivers->second.first;
430  optoScanV_.second = ivers->second.second;
431  }
432  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_VPSPSCAN ) {
433  if ( !vpspScanV_.first && !vpspScanV_.second ) {
434  vpspScanV_.first = ivers->second.first;
435  vpspScanV_.second = ivers->second.second;
436  }
437  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_CALIBRATION ) {
438  if ( !apvCalibV_.first && !apvCalibV_.second ) {
439  apvCalibV_.first = ivers->second.first;
440  apvCalibV_.second = ivers->second.second;
441  }
442  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_PEDESTALS ) {
443  if ( !pedestalsV_.first && !pedestalsV_.second ) {
444  pedestalsV_.first = ivers->second.first;
445  pedestalsV_.second = ivers->second.second;
446  }
447  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_APVLATENCY ) {
448  if ( !apvLatencyV_.first && !apvLatencyV_.second ) {
449  apvLatencyV_.first = ivers->second.first;
450  apvLatencyV_.second = ivers->second.second;
451  }
452  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_FINEDELAY ) {
453  if ( !fineDelayV_.first && !fineDelayV_.second ) {
454  fineDelayV_.first = ivers->second.first;
455  fineDelayV_.second = ivers->second.second;
456  }
457  } else if ( ivers->first == CommissioningAnalysisDescription::T_UNKNOWN ) {
458  std::stringstream ss;
460  << "[SiStripPartition::" << __func__ << "]"
461  << " Found UNKNOWN AnalysisType!";
462  edm::LogWarning(mlConfigDb_) << ss.str();
463  } else {
464  std::stringstream ss;
466  << "[SiStripPartition::" << __func__ << "]"
467  << " Unable to match content to any AnalysisType!";
468  edm::LogWarning(mlConfigDb_) << ss.str();
469  }
470  }
471 
472  }
473 
474  } else {
475  std::stringstream ss;
477  << "[SiStripPartition::" << __func__ << "]"
478  << " Unable to find \"current state\" for partition \""
479  << partitionName_ << "\"";
480  }
481 
482  } else { // ---------- USE RUN NUMBER ----------
483 
484  // Retrieve TkRun object for given run (0 means "latest run")
485  TkRun* run = 0;
486  if ( !runNumber_ ) { run = df->getLastRun( partitionName_ ); }
487  else { run = df->getRun( partitionName_, runNumber_ ); }
488 
489  // Retrieve versioning for given TkRun object
490  if ( run ) {
491 
492  if ( run->getRunNumber() ) {
493 
494  if ( !runNumber_ ) { runNumber_ = run->getRunNumber(); }
495 
496  if ( runNumber_ == run->getRunNumber() ) {
497 
498  cabVersion_.first = run->getConnectionVersionMajorId();
499  cabVersion_.second = run->getConnectionVersionMinorId();
500 
501  fecVersion_.first = run->getFecVersionMajorId();
502  fecVersion_.second = run->getFecVersionMinorId();
503 
504  fedVersion_.first = run->getFedVersionMajorId();
505  fedVersion_.second = run->getFedVersionMinorId();
506 
507  dcuVersion_.first = run->getDcuInfoVersionMajorId();
508  dcuVersion_.second = run->getDcuInfoVersionMinorId();
509 
510  psuVersion_.first = run->getDcuPsuMapVersionMajorId();
511  psuVersion_.second = run->getDcuPsuMapVersionMinorId();
512 
513  //#ifdef USING_DATABASE_MASKING
514  maskVersion_.first = run->getMaskVersionMajorId();
515  maskVersion_.second = run->getMaskVersionMinorId();
516  //#endif
517 
518  // Check run type
519  uint16_t type = run->getModeId( run->getMode() );
520  if ( type == 1 ) { runType_ = sistrip::PHYSICS; }
521  else if ( type == 2 ) { runType_ = sistrip::PEDESTALS; }
522  else if ( type == 3 ) { runType_ = sistrip::CALIBRATION; }
523  else if ( type == 33 ) { runType_ = sistrip::CALIBRATION_DECO; }
524  else if ( type == 4 ) { runType_ = sistrip::OPTO_SCAN; }
525  else if ( type == 5 ) { runType_ = sistrip::APV_TIMING; }
526  else if ( type == 6 ) { runType_ = sistrip::APV_LATENCY; }
527  else if ( type == 7 ) { runType_ = sistrip::FINE_DELAY_PLL; }
528  else if ( type == 8 ) { runType_ = sistrip::FINE_DELAY_TTC; }
529  else if ( type == 10 ) { runType_ = sistrip::MULTI_MODE; }
530  else if ( type == 12 ) { runType_ = sistrip::FED_TIMING; }
531  else if ( type == 13 ) { runType_ = sistrip::FED_CABLING; }
532  else if ( type == 14 ) { runType_ = sistrip::VPSP_SCAN; }
533  else if ( type == 15 ) { runType_ = sistrip::DAQ_SCOPE_MODE; }
534  else if ( type == 16 ) { runType_ = sistrip::QUITE_FAST_CABLING; }
535  else if ( type == 21 ) { runType_ = sistrip::FAST_CABLING; }
536  else if ( type == 0 ) {
539  << "[SiStripPartition::" << __func__ << "]"
540  << " NULL run type returned!"
541  << " for partition \"" << partitionName_ << "\"";
542  } else {
545  << "[SiStripPartition::" << __func__ << "]"
546  << " UNKNOWN run type (" << type<< ") returned!"
547  << " for partition \"" << partitionName_ << "\"";
548  }
549 
550  // Retrieve global and local versions from state associated with given run
551  globalAnalysisV_ = run->getAnalysisVersionMapPointerId();
552  HashMapAnalysisVersions local_versions = df->getLocalAnalysisVersions( globalAnalysisV_ );
553  HashMapAnalysisVersions::const_iterator ivers = local_versions.begin();
554  HashMapAnalysisVersions::const_iterator jvers = local_versions.end();
555  for ( ; ivers != jvers; ++ivers ) {
556  if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_FASTFEDCABLING ) {
557  fastCablingV_.first = ivers->second.first;
558  fastCablingV_.second = ivers->second.second;
559  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_TIMING ) {
560  apvTimingV_.first = ivers->second.first;
561  apvTimingV_.second = ivers->second.second;
562  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_OPTOSCAN ) {
563  optoScanV_.first = ivers->second.first;
564  optoScanV_.second = ivers->second.second;
565  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_VPSPSCAN ) {
566  vpspScanV_.first = ivers->second.first;
567  vpspScanV_.second = ivers->second.second;
568  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_CALIBRATION ) {
569  apvCalibV_.first = ivers->second.first;
570  apvCalibV_.second = ivers->second.second;
571  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_PEDESTALS ) {
572  pedestalsV_.first = ivers->second.first;
573  pedestalsV_.second = ivers->second.second;
574  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_APVLATENCY ) {
575  apvLatencyV_.first = ivers->second.first;
576  apvLatencyV_.second = ivers->second.second;
577  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_FINEDELAY ) {
578  fineDelayV_.first = ivers->second.first;
579  fineDelayV_.second = ivers->second.second;
580  } else if ( ivers->first == CommissioningAnalysisDescription::T_UNKNOWN ) {
581  std::stringstream ss;
583  << "[SiStripPartition::" << __func__ << "]"
584  << " Found UNKNOWN AnalysisType!";
585  edm::LogWarning(mlConfigDb_) << ss.str();
586  } else {
587  std::stringstream ss;
589  << "[SiStripPartition::" << __func__ << "]"
590  << " Unable to match content to any AnalysisType!";
591  edm::LogWarning(mlConfigDb_) << ss.str();
592  }
593  }
594 
595  // If commissioning run, override version of analysis type with version PRODUCED by run (from history)
596  if ( runType_ != sistrip::PHYSICS &&
599 
600  // Determine analysis type from run type
601  CommissioningAnalysisDescription::commissioningType type = CommissioningAnalysisDescription::T_UNKNOWN;
602  if ( runType_ == sistrip::FAST_CABLING ) { type = CommissioningAnalysisDescription::T_ANALYSIS_FASTFEDCABLING; }
603  else if ( runType_ == sistrip::APV_TIMING ) { type = CommissioningAnalysisDescription::T_ANALYSIS_TIMING; }
604  else if ( runType_ == sistrip::OPTO_SCAN ) { type = CommissioningAnalysisDescription::T_ANALYSIS_OPTOSCAN; }
605  else if ( runType_ == sistrip::VPSP_SCAN ) { type = CommissioningAnalysisDescription::T_ANALYSIS_VPSPSCAN; }
606  else if ( runType_ == sistrip::CALIBRATION ) { type = CommissioningAnalysisDescription::T_ANALYSIS_CALIBRATION; }
607  else if ( runType_ == sistrip::PEDESTALS ) { type = CommissioningAnalysisDescription::T_ANALYSIS_PEDESTALS; }
608  else if ( runType_ == sistrip::APV_LATENCY ) { type = CommissioningAnalysisDescription::T_ANALYSIS_APVLATENCY; }
609  else if ( runType_ == sistrip::FINE_DELAY_TTC ) { type = CommissioningAnalysisDescription::T_ANALYSIS_FINEDELAY; }
610 
611  // Retrieve local versions for COMMISSIONING runs from history
612  HashMapRunVersion local_versions = df->getAnalysisHistory( partitionName_, type );
613 
614  // Iterate through map< RunNumber, vector< pair<Major,Minor> > > to find appropriate run
615  HashMapRunVersion::const_iterator ivers = local_versions.end();
616  if ( runNumber_ == 0 ) { ivers = --(local_versions.end()); }
617  else { ivers = local_versions.find( runNumber_ ); }
618 
619  // Set appropriate versions
620  if ( ivers != local_versions.end() ) {
621  if ( type == CommissioningAnalysisDescription::T_ANALYSIS_FASTFEDCABLING ) {
623  fastCablingV_.first = ivers->second.back().first;
624  fastCablingV_.second = ivers->second.back().second;
625 
626  //@@
627 
628  } else if ( type == CommissioningAnalysisDescription::T_ANALYSIS_TIMING ) {
630  apvTimingV_.first = ivers->second.back().first;
631  apvTimingV_.second = ivers->second.back().second;
632  } else if ( type == CommissioningAnalysisDescription::T_ANALYSIS_OPTOSCAN ) {
634  optoScanV_.first = ivers->second.back().first;
635  optoScanV_.second = ivers->second.back().second;
636  } else if ( type == CommissioningAnalysisDescription::T_ANALYSIS_VPSPSCAN ) {
638  vpspScanV_.first = ivers->second.back().first;
639  vpspScanV_.second = ivers->second.back().second;
640  } else if ( type == CommissioningAnalysisDescription::T_ANALYSIS_CALIBRATION ) {
642  apvCalibV_.first = ivers->second.back().first;
643  apvCalibV_.second = ivers->second.back().second;
644  } else if ( type == CommissioningAnalysisDescription::T_ANALYSIS_PEDESTALS ) {
646  pedestalsV_.first = ivers->second.back().first;
647  pedestalsV_.second = ivers->second.back().second;
648  } else if ( type == CommissioningAnalysisDescription::T_ANALYSIS_APVLATENCY ) {
650  apvLatencyV_.first = ivers->second.back().first;
651  apvLatencyV_.second = ivers->second.back().second;
652  } else if ( type == CommissioningAnalysisDescription::T_ANALYSIS_FINEDELAY ) {
654  fineDelayV_.first = ivers->second.back().first;
655  fineDelayV_.second = ivers->second.back().second;
656  } else if ( type == CommissioningAnalysisDescription::T_UNKNOWN ) {
657  std::stringstream ss;
659  << "[SiStripPartition::" << __func__ << "]"
660  << " Found UNKNOWN AnalysisType!";
661  edm::LogWarning(mlConfigDb_) << ss.str();
662  } else {
663  std::stringstream ss;
665  << "[SiStripPartition::" << __func__ << "]"
666  << " Unable to match content to any AnalysisType!";
667  edm::LogWarning(mlConfigDb_) << ss.str();
668  }
669  } else {
670  std::stringstream ss;
672  << "[SiStripPartition::" << __func__ << "]"
673  << " Unable to find run number " << runNumber_
674  << " in \"history\" hash map ";
675  edm::LogWarning(mlConfigDb_) << ss.str();
676  }
677 
678  }
679 
680  } else {
682  << "[SiStripPartition::" << __func__ << "]"
683  << " Mismatch of run number requested ("
684  << runNumber_
685  << ") and received ("
686  << run->getRunNumber() << ")"
687  << " to/from database for partition \""
688  << partitionName_ << "\"";
689  }
690 
691  } else {
693  << "[SiStripPartition::" << __func__ << "]"
694  << " NULL run number returned!"
695  << " for partition \"" << partitionName_ << "\"";
696  }
697 
698  } else {
700  << "[SiStripPartition::" << __func__ << "]"
701  << " NULL pointer to TkRun object!"
702  << " Unable to retrieve versions for run number "
703  << runNumber_
704  << ". Run number may not be consistent with partition \""
705  << partitionName_ << "\"!"; //@@ only using first here!!!
706  }
707 
708  }
709 
710  } catch (...) { db->handleException( __func__, "" ); }
711 
712 }
static std::string defaultPartitionName_
sistrip::RunType runType_
type
Definition: HCALResponse.h:21
DeviceFactory *const deviceFactory(std::string method_name="") const
void handleException(const std::string &method_name, const std::string &extra_info="") const
std::string partitionName_
std::pair< uint32_t, uint32_t > Versions
static const char mlConfigDb_[]
#define LogTrace(id)
SiStripPartition::Versions SiStripPartition::versions ( std::vector< uint32_t >  input)
private

Definition at line 863 of file SiStripPartition.cc.

References sistrip::mlConfigDb_.

Referenced by pset().

863  {
864  if ( input.size() != 2 ) {
866  << "[SiStripPartition::" << __func__ << "]"
867  << " Unexpected size (" << input.size()
868  << ") for vector containing version numbers (major,minor)!"
869  << " Resizing to 2 elements (default values will be 0,0)...";
870  input.resize(2,0);
871  }
872  return std::make_pair( input[0], input[1] );
873 }
static const char mlConfigDb_[]
SiStripPartition::Versions SiStripPartition::vpspScanVersion ( ) const
inline

Definition at line 211 of file SiStripPartition.h.

References vpspScanV_.

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

211 { return vpspScanV_; }

Member Data Documentation

Versions SiStripPartition::apvCalibV_
private

Definition at line 169 of file SiStripPartition.h.

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

Versions SiStripPartition::apvLatencyV_
private

Definition at line 173 of file SiStripPartition.h.

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

Versions SiStripPartition::apvTimingV_
private

Definition at line 163 of file SiStripPartition.h.

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

Versions SiStripPartition::cabVersion_
private

Definition at line 141 of file SiStripPartition.h.

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

Versions SiStripPartition::dcuVersion_
private

Definition at line 147 of file SiStripPartition.h.

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

std::string SiStripPartition::defaultPartitionName_ = "DefaultPartition"
static
Versions SiStripPartition::fastCablingV_
private

Definition at line 161 of file SiStripPartition.h.

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

Versions SiStripPartition::fecVersion_
private

Definition at line 145 of file SiStripPartition.h.

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

Versions SiStripPartition::fedVersion_
private

Definition at line 143 of file SiStripPartition.h.

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

Versions SiStripPartition::fineDelayV_
private

Definition at line 175 of file SiStripPartition.h.

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

bool SiStripPartition::forceCurrentState_
private

Definition at line 137 of file SiStripPartition.h.

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

bool SiStripPartition::forceVersions_
private

Definition at line 135 of file SiStripPartition.h.

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

uint32_t SiStripPartition::globalAnalysisV_
private
std::string SiStripPartition::inputDcuInfoXml_
private

Definition at line 181 of file SiStripPartition.h.

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

std::vector<std::string> SiStripPartition::inputFecXml_
private
std::vector<std::string> SiStripPartition::inputFedXml_
private
std::string SiStripPartition::inputModuleXml_
private

Definition at line 179 of file SiStripPartition.h.

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

Versions SiStripPartition::maskVersion_
private

Definition at line 152 of file SiStripPartition.h.

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

Versions SiStripPartition::optoScanV_
private

Definition at line 165 of file SiStripPartition.h.

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

std::string SiStripPartition::partitionName_
private
Versions SiStripPartition::pedestalsV_
private

Definition at line 171 of file SiStripPartition.h.

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

Versions SiStripPartition::psuVersion_
private

Definition at line 149 of file SiStripPartition.h.

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

uint32_t SiStripPartition::runNumber_
private

Definition at line 131 of file SiStripPartition.h.

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

Versions SiStripPartition::runTableVersion_
private

Definition at line 159 of file SiStripPartition.h.

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

sistrip::RunType SiStripPartition::runType_
private

Definition at line 133 of file SiStripPartition.h.

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

Versions SiStripPartition::vpspScanV_
private

Definition at line 167 of file SiStripPartition.h.

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