Skip to content

Commit

Permalink
move checkBookAPVColls call from bookHistograms to dqmBeginRun
Browse files Browse the repository at this point in the history
  • Loading branch information
mmusich committed Feb 26, 2018
1 parent fa9cf97 commit 51793f4
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions CalibTracker/SiStripChannelGain/src/SiStripGainsPCLWorker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ SiStripGainsPCLWorker::dqmBeginRun(edm::Run const& run, edm::EventSetup const& i

using namespace edm;

edm::ESHandle<TrackerGeometry> tkGeom_;
iSetup.get<TrackerDigiGeometryRecord>().get( tkGeom_ );
const TrackerGeometry *bareTkGeomPtr = &(*tkGeom_);

checkBookAPVColls(bareTkGeomPtr,histograms); // check whether APV colls are booked and do so if not yet done

edm::ESHandle<SiStripGain> gainHandle;
iSetup.get<SiStripGainRcd>().get(gainHandle);
if(!gainHandle.isValid()){edm::LogError("SiStripGainPCLWorker")<< "gainHandle is not valid\n"; exit(0);}
Expand Down Expand Up @@ -297,9 +303,12 @@ SiStripGainsPCLWorker::dqmAnalyze(edm::Event const& iEvent, edm::EventSetup cons
<<" i "<< i
<<" useCalibration "<< useCalibration
<<" FirstSetOfConstants "<< FirstSetOfConstants
<<" APV->PreviousGain " << APV->PreviousGain
<<" APV->CalibGain " << APV->CalibGain
<<" APV->DetId "<< APV->DetId
<<" APV->Index "<< APV->Index
<<" Charge "<< Charge
<<" Path "<< (*path)[i]
<<" ClusterChargeOverPath "<< ClusterChargeOverPath
<<std::endl;

Expand Down Expand Up @@ -499,12 +508,6 @@ SiStripGainsPCLWorker::fillDescriptions(edm::ConfigurationDescriptions& descript
void
SiStripGainsPCLWorker::bookHistograms(DQMStore::ConcurrentBooker & ibooker, edm::Run const& run, edm::EventSetup const& setup, APVGain::APVGainHistograms & histograms) const {

edm::ESHandle<TrackerGeometry> tkGeom_;
setup.get<TrackerDigiGeometryRecord>().get( tkGeom_ );
const TrackerGeometry *bareTkGeomPtr = &(*tkGeom_);

checkBookAPVColls(bareTkGeomPtr,histograms); // check whether APV colls are booked and do so if not yet done

ibooker.cd();
std::string dqm_dir = m_DQMdir;
const char* tag = dqm_tag_[statCollectionFromMode(m_calibrationMode.c_str())].c_str();
Expand Down

0 comments on commit 51793f4

Please sign in to comment.