Skip to content

Commit

Permalink
Merge pull request #7220 from clelange/pixel-updates-CMSSW_7_X_Y
Browse files Browse the repository at this point in the history
added missing pixel features from CVS-head
  • Loading branch information
cmsbuild committed Feb 3, 2015
2 parents cff950f + 6689cd3 commit f52423b
Show file tree
Hide file tree
Showing 19 changed files with 806 additions and 336 deletions.
1 change: 1 addition & 0 deletions CalibFormats/SiPixelObjects/interface/PixelAliasList.h
Expand Up @@ -9,6 +9,7 @@
#include "CalibFormats/SiPixelObjects/interface/PixelConfigAlias.h"
#include "CalibFormats/SiPixelObjects/interface/PixelVersionAlias.h"

#include <stdlib.h>

namespace pos{
/*! \class PixelAliasList PixelAliasList.h "interface/PixelAliasList.h"
Expand Down
2 changes: 1 addition & 1 deletion CalibFormats/SiPixelObjects/interface/PixelCalibBase.h
Expand Up @@ -28,7 +28,7 @@ namespace pos{
PixelCalibBase();
virtual ~PixelCalibBase();
virtual std::string mode() const {return mode_;}
virtual void writeXMLHeader( pos::PixelConfigKey key,
virtual void writeXMLHeader( pos::PixelConfigKey &key,
int version,
std::string path,
std::ofstream *out,
Expand Down
Expand Up @@ -174,7 +174,7 @@ namespace pos{

virtual void writeASCII(std::string dir="") const;
void writeXML( pos::PixelConfigKey key, int version, std::string path) const {;}
virtual void writeXMLHeader( pos::PixelConfigKey key,
virtual void writeXMLHeader( pos::PixelConfigKey key,
int version,
std::string path,
std::ofstream *out,
Expand Down
2 changes: 1 addition & 1 deletion CalibFormats/SiPixelObjects/interface/PixelConfigBase.h
Expand Up @@ -66,7 +66,7 @@ namespace pos{
std::ofstream *out2) const {;}
virtual void writeXML( pos::PixelConfigKey key, int version, std::string path) const {;}
virtual void writeXMLHeader(pos::PixelConfigKey key, int version, std::string path, std::ofstream *out) const {;}
virtual void writeXML( std::ofstream *out) const {;}
virtual void writeXML( std::ofstream *out) const {std::cout << __LINE__ << " " << __PRETTY_FUNCTION__ << "\tUnimplemented method" << std::endl ;;}
virtual void writeXMLTrailer( std::ofstream *out) const {;}

void setAuthor (std::string author) {creator_ = author ;}
Expand Down
20 changes: 10 additions & 10 deletions CalibFormats/SiPixelObjects/interface/PixelConfigFile.h
Expand Up @@ -271,13 +271,13 @@ namespace pos{
assert(theKey<=getConfig().size());

unsigned int last=path.find_last_of("/");
assert(last!=std::string::npos);
assert(last!=(unsigned int)std::string::npos);

std::string base=path.substr(0,last);
std::string ext=path.substr(last+1);

unsigned int slashpos=base.find_last_of("/");
if (slashpos==std::string::npos) {
if (slashpos==(unsigned int)std::string::npos) {
std::cout << "[pos::PixelConfigFile::getPath()]\t\t\tOn path:" <<path <<std::endl;
std::cout << "[pos::PixelConfigFile::getPath()]\t\t\tRecall that you need a trailing /" <<std::endl;
::abort();
Expand Down Expand Up @@ -324,13 +324,13 @@ namespace pos{
assert(theKey<=configList().size());

unsigned int last=path.find_last_of("/");
assert(last!=std::string::npos);
assert(last!=(unsigned int)std::string::npos);

std::string base=path.substr(0,last);
std::string ext=path.substr(last+1);

unsigned int slashpos=base.find_last_of("/");
if (slashpos==std::string::npos) {
if (slashpos==(unsigned int)std::string::npos) {
std::cout << "[pos::PixelConfigFile::get()]\t\t\tAsking for data of type:"<<typeid(data).name()<<std::endl;
std::cout << "[pos::PixelConfigFile::get()]\t\t\tOn path:" <<path <<std::endl;
std::cout << "[pos::PixelConfigFile::get()]\t\t\tRecall that you need a trailing /" <<std::endl;
Expand All @@ -343,7 +343,7 @@ namespace pos{
// std::cout << "[pos::PixelConfigFile::get()]\t\t\tExtracted base:"<<base<<std::endl;
// std::cout << "[pos::PixelConfigFile::get()]\t\t\tExtracted ext :"<<ext <<std::endl;

unsigned int version;
unsigned int version=0;
int err=configList()[theKey].find(dir,version);
// assert(err==0);
if(0!=err)
Expand Down Expand Up @@ -508,13 +508,13 @@ namespace pos{


unsigned int last=path.find_last_of("/");
assert(last!=std::string::npos);
assert(last!=(unsigned int)std::string::npos);

std::string base=path.substr(0,last);
std::string ext=path.substr(last+1);

unsigned int slashpos=base.find_last_of("/");
if (slashpos==std::string::npos) {
if (slashpos==(unsigned int)std::string::npos) {
std::cout << __LINE__ << mthn << "Asking for data of type:" << typeid(data).name() <<std::endl;
std::cout << __LINE__ << mthn << "On path:" << path <<std::endl;
std::cout << __LINE__ << mthn << "Recall that you need a trailing /" <<std::endl;
Expand All @@ -527,7 +527,7 @@ namespace pos{
// std::cout << __LINE__ << mthn << "Extracted base:" << base <<std::endl;
// std::cout << __LINE__ << mthn << "Extracted ext :" << ext <<std::endl;

unsigned int version;
unsigned int version=0;
int err=configList()[theKey].find(dir,version);
// assert(err==0);
if(0!=err)
Expand Down Expand Up @@ -652,7 +652,7 @@ namespace pos{
std::string mthn = "]\t[pos::PixelConfigFile::get()]\t\t\t\t " ;

unsigned int last=path.find_last_of("/");
assert(last!=std::string::npos);
assert(last!=(unsigned int)std::string::npos);

std::string base=path.substr(0,last);
std::string ext=path.substr(last+1);
Expand Down Expand Up @@ -880,7 +880,7 @@ namespace pos{
static bool forceConfigReload = false;
return forceConfigReload;
}

};

}
Expand Down
2 changes: 2 additions & 0 deletions CalibFormats/SiPixelObjects/interface/PixelConfigList.h
Expand Up @@ -6,6 +6,8 @@
* A longer explanation will be placed here later
*/

#include <stdlib.h>

namespace pos{
/*! \class PixelConfigList PixelConfigList.h "interface/PixelConfigList.h"
* \brief This class implements..
Expand Down
5 changes: 5 additions & 0 deletions CalibFormats/SiPixelObjects/interface/PixelDelay25Calib.h
Expand Up @@ -63,6 +63,9 @@ namespace pos{
void writeFiles(int currentSDa, int currentRDa, int number);
void closeFiles();

// Added by Dario April 28th, 2010
std::string getStreamedContent(void) const {return calibFileContent_;} ;

private:

std::set<std::string> portcardNames_;
Expand All @@ -71,6 +74,8 @@ namespace pos{
std::ofstream graphout_;
std::string graph_;

// Added by Dario April 28th, 2010
std::string calibFileContent_ ;
};
}
/* @} */
Expand Down
23 changes: 22 additions & 1 deletion CalibFormats/SiPixelObjects/interface/PixelFEDCard.h
Expand Up @@ -11,6 +11,7 @@

#include <vector>
#include <string>
#include <stdint.h>

namespace pos{
/*! \ingroup ConfigurationObjects "Configuration Objects"
Expand Down Expand Up @@ -64,7 +65,7 @@ namespace pos{
virtual void writeXMLTrailer(std::ofstream *fedstream,
std::ofstream *recostream,
std::ofstream *tbmstream) const ;
unsigned long long enabledChannels(); // returns 64-bit integer mask 35..0
uint64_t enabledChannels(); // returns 64-bit integer mask 35..0


//Settable optical input parameters (one for each 12-receiver)
Expand Down Expand Up @@ -154,6 +155,26 @@ namespace pos{
//VME base address
unsigned long FEDBASE_0, fedNumber;

// Most recent additions requested by Will and Danek (Dario)
int BusyHoldMin ;
int BusyWhenBehind ;
int FeatureRegister ;
int FIFO2Limit ;
int LastDacOff ;
int SimHitsPerRoc ;
int TimeoutOROOSLimit ;
int TriggerHoldoff ;
int SPARE1 ;
int SPARE2 ;
int SPARE3 ;
int SPARE4 ;
int SPARE5 ;
int SPARE6 ;
int SPARE7 ;
int SPARE8 ;
int SPARE9 ;
int SPARE10 ;

private:

// Added by Dario (March 26th 2008)
Expand Down
Expand Up @@ -29,6 +29,7 @@ namespace pos{
public:

PixelROCDACSettings();
virtual ~PixelROCDACSettings(){;};

PixelROCDACSettings(const PixelROCName& rocid){rocid_= rocid;}

Expand Down
2 changes: 1 addition & 1 deletion CalibFormats/SiPixelObjects/interface/PixelTBMSettings.h
Expand Up @@ -38,7 +38,7 @@ namespace pos{
//Generate the DAC settings
void generateConfiguration(PixelFECConfigInterface* pixelFEC,
PixelNameTranslation* trans,
bool physics=false) const;
bool physics=false, bool doResets=true) const;

void writeBinary(std::string filename) const;

Expand Down
7 changes: 7 additions & 0 deletions CalibFormats/SiPixelObjects/interface/PixelTimeFormatter.h
Expand Up @@ -43,6 +43,13 @@ namespace pos{
double stop = endTime_.tv_sec + endTime_.tv_usec/1000000. ;
std::cout << "[PixelTimeFormatter::stopTimer()]\t\t\t Elapsed time: " << stop-start << " seconds for " << origin_ << std::endl ;
}

virtual void writeXMLHeader(pos::PixelConfigKey key,
int version, std::string path,
std::ofstream *out,
std::ofstream *out1 = NULL,
std::ofstream *out2 = NULL
) const {;}

//---------------------------------------------------------------------------------
static std::string getTime(void)
Expand Down
7 changes: 1 addition & 6 deletions CalibFormats/SiPixelObjects/interface/PixelTrimCommon.h
Expand Up @@ -44,12 +44,7 @@ namespace pos{

void writeASCII(std::string filename) const ;
void writeXML( pos::PixelConfigKey key, int version, std::string path) const {;}
virtual void writeXMLHeader(pos::PixelConfigKey key,
int version, std::string path,
std::ofstream *out,
std::ofstream *out1 = NULL,
std::ofstream *out2 = NULL
) const {;}
virtual void writeXMLHeader(pos::PixelConfigKey key, int version, std::string path, std::ofstream *out) const {;}
virtual void writeXML( std::ofstream *out) const {;}
virtual void writeXMLTrailer( std::ofstream *out) const {;}

Expand Down
2 changes: 1 addition & 1 deletion CalibFormats/SiPixelObjects/src/PixelBase64.cc
Expand Up @@ -2,7 +2,7 @@
base64.cpp and base64.h
Copyright (C) 2004-2008 René Nyffenegger
This source code is provided 'as-is', without any express or implied
warranty. In no event will the author be held liable for any damages
arising from the use of this software.
Expand Down
4 changes: 2 additions & 2 deletions CalibFormats/SiPixelObjects/src/PixelCalibConfiguration.cc
Expand Up @@ -81,7 +81,7 @@ PixelCalibConfiguration::PixelCalibConfiguration(std::vector< std::vector<std::s

if (tmp=="Mode:"){
in >> mode_;
std::cout << __LINE__ << "]\t" << mthn << "mode=" << mode_ << std::endl;
// std::cout << __LINE__ << "]\t" << mthn << "mode=" << mode_ << std::endl;
in >>tmp;
} else {
mode_="FEDChannelOffsetPixel";
Expand Down Expand Up @@ -1673,7 +1673,7 @@ bool PixelCalibConfiguration::containsScan(std::string name) const
}

//=============================================================================================
void PixelCalibConfiguration::writeXMLHeader(pos::PixelConfigKey key,
void PixelCalibConfiguration::writeXMLHeader(pos::PixelConfigKey key,
int version,
std::string path,
std::ofstream *outstream,
Expand Down

0 comments on commit f52423b

Please sign in to comment.