Skip to content

Commit

Permalink
CMSSW_6_2_X_2013-04-04-0200
Browse files Browse the repository at this point in the history
  • Loading branch information
ktf committed Apr 29, 2013
1 parent 7761c30 commit 5b59f3a
Show file tree
Hide file tree
Showing 26 changed files with 343 additions and 248 deletions.
48 changes: 27 additions & 21 deletions DQM/EcalBarrelMonitorClient/src/EcalBarrelMonitorClient.cc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
* \file EcalBarrelMonitorClient.cc
*
* $Date: 2012/06/28 12:14:27 $
* $Revision: 1.508 $
* $Date: 2013/04/02 09:07:29 $
* $Revision: 1.508.2.1 $
* \author G. Della Ricca
* \author F. Cossutti
*
Expand Down Expand Up @@ -894,6 +894,31 @@ void EcalBarrelMonitorClient::endLuminosityBlock(const edm::LuminosityBlock& l,
std::cout << std::endl;
}

if(begin_run_ && !end_run_){
unsigned iC(0);
for(; iC < enabledClients_.size(); iC++){
std::string& name(enabledClients_[iC]);

if(name == "Cluster" || name == "Cosmic" || name == "Occupancy" || name == "StatusFlags" || name == "Trend") continue;

std::string dir(prefixME_ + "/EB" + name + "Client");
if(!dqmStore_->dirExists(dir) || !dqmStore_->containsAnyMonitorable(dir)){
std::vector<std::string>::iterator itr(std::find(clientsNames_.begin(), clientsNames_.end(), name));
if(itr == clientsNames_.end()) continue; // something seriously wrong, but ignore
std::cout << "EB" << name << "Client is missing plots; resetting now" << std::endl;

break;
}
}
if(iC != enabledClients_.size()){
forced_status_ = false;
endRun();
beginRun();
run_ = l.id().run();
evt_ = 0;
}
}

if ( updateTime_ > 0 ) {
if ( (current_time_ - last_time_update_) < 60 * updateTime_ ) {
return;
Expand All @@ -907,25 +932,6 @@ void EcalBarrelMonitorClient::endLuminosityBlock(const edm::LuminosityBlock& l,
this->analyze();

}

for(unsigned iC(0); iC < enabledClients_.size(); iC++){
std::string& name(enabledClients_[iC]);

if(name == "Cluster" || name == "Cosmic" || name == "Occupancy" || name == "StatusFlags" || name == "Trend") continue;

if(!dqmStore_->dirExists(prefixME_ + "/EB" + name + "Client")){
std::vector<std::string>::iterator itr(std::find(clientsNames_.begin(), clientsNames_.end(), name));
if(itr == clientsNames_.end()) continue; // something seriously wrong, but ignore

std::cout << "EB" << name << "Client is missing plots; resetting now" << std::endl;

EBClient* client(clients_[itr - clientsNames_.begin()]);

client->cleanup();
client->setup();
}
}

}

void EcalBarrelMonitorClient::reset(void) {
Expand Down
8 changes: 4 additions & 4 deletions DQM/EcalEndcapMonitorClient/src/EETriggerTowerClient.cc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
* \file EETriggerTowerClient.cc
*
* $Date: 2012/04/27 13:46:08 $
* $Revision: 1.102 $
* $Date: 2013/04/02 09:03:29 $
* $Revision: 1.103 $
* \author G. Della Ricca
* \author F. Cossutti
*
Expand Down Expand Up @@ -252,9 +252,9 @@ void EETriggerTowerClient::analyze(void) {
}
if ( max > 0 ) {
if ( index == 0 ) {
me_o01_[ism-1]->setBinContent(ix, iy, -1);
if(me_o01_[ism-1]) me_o01_[ism-1]->setBinContent(ix, iy, -1);
} else {
me_o01_[ism-1]->setBinContent(ix, iy, index );
if(me_o01_[ism-1]) me_o01_[ism-1]->setBinContent(ix, iy, index );
}
}
double fraction = (total > 0) ? 1.0 - max/total : 0.;
Expand Down
43 changes: 22 additions & 21 deletions DQM/EcalEndcapMonitorClient/src/EcalEndcapMonitorClient.cc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
* \file EcalEndcapMonitorClient.cc
*
* $Date: 2012/09/04 08:01:37 $
* $Revision: 1.273 $
* $Date: 2013/04/02 09:03:29 $
* $Revision: 1.274 $
* \author G. Della Ricca
* \author F. Cossutti
*
Expand Down Expand Up @@ -943,28 +943,29 @@ void EcalEndcapMonitorClient::endLuminosityBlock(const edm::LuminosityBlock& l,
std::cout << std::endl;
}

bool clientMissing(false);
for(unsigned iC(0); iC < enabledClients_.size(); iC++){
std::string& name(enabledClients_[iC]);
if(begin_run_ && !end_run_){
unsigned iC(0);
for(; iC < enabledClients_.size(); iC++){
std::string& name(enabledClients_[iC]);

if(name == "Cluster" || name == "Cosmic" || name == "Occupancy" || name == "StatusFlags" || name == "Trend") continue;
if(name == "Cluster" || name == "Cosmic" || name == "Occupancy" || name == "StatusFlags" || name == "Trend") continue;

std::string dir(prefixME_ + "/EE" + name + "Client");
if(!dqmStore_->dirExists(dir) || !dqmStore_->containsAnyMonitorable(dir)){
std::vector<std::string>::iterator itr(std::find(clientsNames_.begin(), clientsNames_.end(), name));
if(itr == clientsNames_.end()) continue; // something seriously wrong, but ignore
std::cout << "EE" << name << "Client is missing plots; issuing beginRun" << std::endl;
std::string dir(prefixME_ + "/EE" + name + "Client");
if(!dqmStore_->dirExists(dir) || !dqmStore_->containsAnyMonitorable(dir)){
std::vector<std::string>::iterator itr(std::find(clientsNames_.begin(), clientsNames_.end(), name));
if(itr == clientsNames_.end()) continue; // something seriously wrong, but ignore
std::cout << "EE" << name << "Client is missing plots; issuing beginRun" << std::endl;

clientMissing = true;
break;
break;
}
}
if(iC != enabledClients_.size()){
forced_status_ = false;
endRun();
beginRun();
run_ = l.id().run();
evt_ = 0;
}
}
if(clientMissing){
forced_status_ = false;
endRun();
inputFile_ = "dummy";
beginRun();
inputFile_ = "";
}

if ( updateTime_ > 0 ) {
Expand Down Expand Up @@ -1518,7 +1519,7 @@ void EcalEndcapMonitorClient::analyze(void) {
s = me->valueString();
sscanf(s.c_str(), "i=%d", &evtType_);
if ( runType_ == -1 ) runType_ = evtType_;
if ( debug_ ) std::cout << "Found '" << prefixME_ << "/EcalInfo/RUNTYPE'" << std::endl;
if ( debug_ ) std::cout << "Found '" << prefixME_ << "/EcalInfo/RUNTYPE' " << s << std::endl;
}

// if the run number from the Event is less than zero,
Expand Down
3 changes: 1 addition & 2 deletions DQMOffline/Ecal/src/EcalZmassTask.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Description: [one line class summary]
//
// Original Author: Vieri Candelise
// Created: Wed May 11 14:53:26 CEST 2011
// $Id: EcalZmassTask.cc,v 1.5 2012/02/28 16:39:18 yiiyama Exp $
// $Id: EcalZmassTask.cc,v 1.6 2013/04/02 10:46:16 yiiyama Exp $
//
//

Expand Down Expand Up @@ -236,7 +236,6 @@ EcalZmassTask::analyze (const edm::Event & iEvent,

if (elIsAccepted>1){
double e_ee_invMass=0;
if (elIsAccepted>2) edm::LogWarning("EcalZmassTask") << "WARNING: In this events we have more than two electrons accpeted!!!!!!!";
if (LV.size()==2){
TLorentzVector e_pair = LV[0] + LV[1];
e_ee_invMass = e_pair.M ();
Expand Down
2 changes: 1 addition & 1 deletion DataFormats/GeometryVector/interface/Basic2DVector.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define GeometryVector_Basic2DVector_h
#include "DataFormats/Math/interface/SIMDVec.h"

#if ( defined(__REFLEX__) || defined(__CINT__) )
#if ( defined(IN_DICTBUILD) || defined(__REFLEX__) || defined(__CINT__) )
#include "DataFormats/GeometryVector/interface/oldBasic2DVector.h"
#elif defined(USE_EXTVECT)
#include "DataFormats/GeometryVector/interface/extBasic2DVector.h"
Expand Down
2 changes: 1 addition & 1 deletion DataFormats/GeometryVector/interface/Basic3DVector.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "DataFormats/Math/interface/SIMDVec.h"


#if ( defined(__REFLEX__) || defined(__CINT__) )
#if ( defined(IN_DICTBUILD) || defined(__REFLEX__) || defined(__CINT__) )
#include "DataFormats/GeometryVector/interface/oldBasic3DVector.h"
#elif defined(USE_EXTVECT)
#include "DataFormats/GeometryVector/interface/extBasic3DVector.h"
Expand Down
3 changes: 2 additions & 1 deletion DataFormats/GeometryVector/interface/PV2DBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ class PV2DBase {
* are too restrictive (preferably never).
*/
const BasicVectorType& basicVector() const { return theVector;}
#ifndef __REFLEX__
MathVector const & mathVector() const { return theVector.v;}
MathVector & mathVector() { return theVector.v;}

#endif


T x() const { return basicVector().x();}
Expand Down
3 changes: 2 additions & 1 deletion DataFormats/GeometryVector/interface/PV3DBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ class PV3DBase {
* are too restrictive (preferably never).
*/
const BasicVectorType& basicVector() const { return theVector;}
#ifndef __REFLEX__
MathVector const & mathVector() const { return theVector.v;}
MathVector & mathVector() { return theVector.v;}

#endif

T x() const { return basicVector().x();}
T y() const { return basicVector().y();}
Expand Down
3 changes: 3 additions & 0 deletions DataFormats/GeometryVector/interface/extBasic3DVector.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ class Basic3DVector {
MathVector const & mathVector() const { return v;}
MathVector & mathVector() { return v;}

T operator[](int i) const { return v[i];}
T & operator[](int i) { return v[i];}


/// Cartesian x coordinate
T x() const { return v[0];}
Expand Down
14 changes: 11 additions & 3 deletions DataFormats/GeometryVector/interface/oldBasic2DVector.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#ifndef GeometryVector_oldBasic2DVector_h
#define GeometryVector_oldBasic2DVector_h
#if defined(__CINT__) && !defined(__REFLEX__)
#if ( defined(IN_DICTBUILD) || defined(__CINT__) ) && !defined(__REFLEX__)
#define __REFLEX__
#endif

#include "DataFormats/GeometryVector/interface/Phi.h"
#include "DataFormats/GeometryVector/interface/PreciseFloatType.h"
#include "DataFormats/GeometryVector/interface/CoordinateSets.h"
#ifndef __REFLEX__
#include "DataFormats/Math/interface/SSEVec.h"
#include "DataFormats/Math/interface/SIMDVec.h"
#endif


Expand Down Expand Up @@ -48,7 +48,15 @@ class Basic2DVector {
Basic2DVector( const T& x, const T& y) : theX(x), theY(y) {}


#ifndef __REFLEX__
#if defined(USE_EXTVECT)
// constructor from Vec2 or vec4
template<typename U>
Basic2DVector(Vec2<U> const& iv) :
theX(iv[0]), theY(iv[1]) {}
template<typename U>
Basic2DVector(Vec4<U> const& iv) :
theX(iv.arr[0]), theY(iv.arr[1]) {}
#elif defined(USE_SSEVECT)
// constructor from Vec2 or vec4
template<typename U>
Basic2DVector(mathSSE::Vec2<U> const& iv) :
Expand Down
18 changes: 15 additions & 3 deletions DataFormats/GeometryVector/interface/oldBasic3DVector.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef GeometryVector_oldBasic3DVector_h
#define GeometryVector_oldBasic3DVector_h
#if defined(__CINT__) && !defined(__REFLEX__)
#if ( defined(IN_DICTBUILD) || defined(__CINT__) ) && !defined(__REFLEX__)
#define __REFLEX__
#endif
#include "DataFormats/GeometryVector/interface/Basic2DVector.h"
Expand All @@ -9,11 +9,12 @@
#include "DataFormats/GeometryVector/interface/PreciseFloatType.h"
#include "DataFormats/GeometryVector/interface/CoordinateSets.h"
#ifndef __REFLEX__
#include "DataFormats/Math/interface/SSEVec.h"
#include "DataFormats/Math/interface/SIMDVec.h"
#endif
#include <iosfwd>
#include <cmath>


namespace detailsBasic3DVector {
inline float __attribute__((always_inline)) __attribute__ ((pure))
eta(float x, float y, float z) { float t(z/std::sqrt(x*x+y*y)); return ::asinhf(t);}
Expand Down Expand Up @@ -67,7 +68,12 @@ class Basic3DVector {
theX(p.x()), theY(p.y()), theZ(p.z()), theW(0) {}


#ifndef __REFLEX__
#if defined(USE_EXTVECT)
template<typename U>
Basic3DVector(Vec4<U> const& iv) :
theX(iv[0]), theY(iv[1]), theZ(iv[2]), theW(0) {}
#elif defined(USE_SSEVECT)

// constructor from Vec4
template<typename U>
Basic3DVector(mathSSE::Vec4<U> const& iv) :
Expand Down Expand Up @@ -99,6 +105,12 @@ class Basic3DVector {
theX = p.x(); theY = p.y(); theZ = p.z();
}


T operator[](int i) const { return *((&theX)+i) ;}
T & operator[](int i) { return *((&theX)+i);}



/// Cartesian x coordinate
T x() const { return theX;}

Expand Down
2 changes: 2 additions & 0 deletions DataFormats/GeometryVector/interface/sseBasic3DVector.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ class Basic3DVector {
MathVector const & mathVector() const { return v;}
MathVector & mathVector() { return v;}

T operator[](int i) const { return v[i];}
T & operator[](int i) { return v[i];}

/// Cartesian x coordinate
T x() const { return v.o.theX;}
Expand Down
2 changes: 2 additions & 0 deletions DataFormats/Math/src/SSEVec.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if !defined(__arm__)
#include "DataFormats/Math/interface/SSEVec.h"
#include "DataFormats/Math/interface/SSERot.h"
using namespace mathSSE;
Expand Down Expand Up @@ -40,3 +41,4 @@ std::ostream & operator<<(std::ostream & out, Rot2D const & r){
return out << r.axis[0] << '\n' << r.axis[1];
}

#endif // __arm__
7 changes: 7 additions & 0 deletions DataFormats/Math/test/SSEVec_t.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if !defined(__arm__)
#include "DataFormats/Math/interface/SSEVec.h"

#include<cmath>
Expand Down Expand Up @@ -276,3 +277,9 @@ int main() {
return 0;
}
#endif

#else // arm
int main() {
return 0;
}
#endif
2 changes: 1 addition & 1 deletion FastSimulation/Calorimetry/python/HcalResponse_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
0.8,0.76,0.8,0.9,0.9,
0.8,0.9,0.72,0.6,1.,
0.8,0.76,0.8,0.9,0.9,
0.8,0.9,0.72,0.6,1.),
0.8,0.9,0.72,0.6,1.,1.),


#response & resolution, separated into barrel, endcap, and forward regions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
* See header file for a description of this class.
*
* $Date: 2012/11/19 15:56:56 $
* $Revision: 1.4 $
* $Date: 2013/03/27 17:30:04 $
* $Revision: 1.6 $
* \author C. Battilana CIEMAT
*/

Expand Down Expand Up @@ -61,13 +61,13 @@ void DTTPGParamsWriter::analyze(const Event & event, const EventSetup& eventSetu

while(std::getline(inputFile_, line)) {
DTChamberId chId;
float fine;
int coarse;
float fine = 0.;
int coarse = 0;
pharseLine(line,chId,fine,coarse);
phaseMap_->set(chId,coarse,fine,DTTimeUnits::ns);
if (debug_) {
float fineDB;
int coarseDB;
float fineDB = 0.;
int coarseDB = 0;
phaseMap_->get(chId,coarseDB,fineDB,DTTimeUnits::ns);
std::cout << "[DTTPGParamsWriter] Read data for chamber " << chId
<< ". File params -> fine: " << fine << " coarse: " << coarse
Expand All @@ -93,7 +93,7 @@ void DTTPGParamsWriter::pharseLine(std::string &line, DTChamberId& chId, float &
std::vector<std::string> elements;
boost::algorithm::split(elements,line,boost::algorithm::is_any_of(string(" \t\n"))); // making string conversion explicit (needed to cope with -Warray-bounds in slc5_ia32_gcc434
if (elements.size() != 5) {
throw cms::Exception("DTTPGParamsWriter") << "wrong number of entries in line : " << line << " pleas check your input file syntax!";
std::cout << "[DTTPGParamsWriter] wrong number of entries in line : " << line << " pleas check your input file syntax!" << std::endl;
} else {
chId = DTChamberId(atoi(elements[0].c_str()),atoi(elements[1].c_str()),atoi(elements[2].c_str()));
fine = atof(elements[3].c_str());
Expand Down
Loading

0 comments on commit 5b59f3a

Please sign in to comment.