Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add option for sequential RootEmbeddedFileSequence to not recycle files #20403

Merged
merged 4 commits into from Sep 8, 2017
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions DQM/SiStripMonitorHardware/interface/CMHistograms.hh
Expand Up @@ -41,12 +41,12 @@ public:

CMHistograms();

~CMHistograms();
~CMHistograms() override;

//initialise histograms
void initialise(const edm::ParameterSet& iConfig,
std::ostringstream* pDebugStream
);
) override;

void fillHistograms(const std::vector<CMvalues>& aVec, float aTime, unsigned int aFedId);

Expand All @@ -61,9 +61,9 @@ public:

void bookAllFEDHistograms(DQMStore::IBooker &);

bool tkHistoMapEnabled(unsigned int aIndex=0);
bool tkHistoMapEnabled(unsigned int aIndex=0) override;

TkHistoMap * tkHistoMapPointer(unsigned int aIndex=0);
TkHistoMap * tkHistoMapPointer(unsigned int aIndex=0) override;

protected:

Expand Down
2 changes: 1 addition & 1 deletion DQM/SiStripMonitorHardware/interface/FEDErrors.hh
Expand Up @@ -151,7 +151,7 @@ public:

//FE/Channel check: rate of channels with error (only considering connected channels)
float fillNonFatalFEDErrors(const sistrip::FEDBuffer* aBuffer,
const SiStripFedCabling* aCabling = 0);
const SiStripFedCabling* aCabling = nullptr);

//fill errors: define the order of importance.
bool fillFEDErrors(const FEDRawData& aFedData,
Expand Down
8 changes: 4 additions & 4 deletions DQM/SiStripMonitorHardware/interface/FEDHistograms.hh
Expand Up @@ -34,12 +34,12 @@ public:

FEDHistograms();

~FEDHistograms();
~FEDHistograms() override;

//initialise histograms
void initialise(const edm::ParameterSet& iConfig,
std::ostringstream* pDebugStream
);
) override;

void fillCountersHistograms(const FEDErrors::FEDCounters & aFedLevelCounters,
const FEDErrors::ChannelCounters & aChLevelCounters,
Expand Down Expand Up @@ -86,9 +86,9 @@ public:

void bookAllFEDHistograms(DQMStore::IBooker & , bool);

bool tkHistoMapEnabled(unsigned int aIndex=0);
bool tkHistoMapEnabled(unsigned int aIndex=0) override;

TkHistoMap * tkHistoMapPointer(unsigned int aIndex=0);
TkHistoMap * tkHistoMapPointer(unsigned int aIndex=0) override;

MonitorElement *cmHistPointer(bool aApv1);

Expand Down
10 changes: 5 additions & 5 deletions DQM/SiStripMonitorHardware/interface/SPYHistograms.h
Expand Up @@ -56,12 +56,12 @@ class SPYHistograms: public HistogramBase {

SPYHistograms();

~SPYHistograms();
~SPYHistograms() override;

//initialise histograms
void initialise(const edm::ParameterSet& iConfig,
std::ostringstream* pDebugStream
);
) override;

//book the top level histograms
void bookTopLevelHistograms(DQMStore::IBooker &);
Expand All @@ -84,12 +84,12 @@ class SPYHistograms: public HistogramBase {
const unsigned int aFedId,
const unsigned int aFedChannel);

bool tkHistoMapEnabled(unsigned int aIndex=0){
bool tkHistoMapEnabled(unsigned int aIndex=0) override{
return false;
};

TkHistoMap * tkHistoMapPointer(unsigned int aIndex=0){
return 0;
TkHistoMap * tkHistoMapPointer(unsigned int aIndex=0) override{
return nullptr;
};

protected:
Expand Down
6 changes: 3 additions & 3 deletions DQM/SiStripMonitorHardware/interface/SiStripFEDSpyBuffer.h
Expand Up @@ -34,8 +34,8 @@ namespace sistrip {
public:
//construct from buffer
FEDSpyBuffer(const uint8_t* fedBuffer, const size_t fedBufferSize);
virtual ~FEDSpyBuffer();
virtual void print(std::ostream& os) const;
~FEDSpyBuffer() override;
void print(std::ostream& os) const override;

//get the run number from the corresponding global run
uint32_t globalRunNumber() const;
Expand All @@ -51,7 +51,7 @@ namespace sistrip {
//checks that a delay chip is complete i.e. that it all came from the same event
bool delayChipGood(const uint8_t delayChip) const;
//checks that a channel is usable (i.e. that the delay chip it is on is good)
virtual bool channelGood(const uint8_t internalFEDannelNum) const;
bool channelGood(const uint8_t internalFEDannelNum) const override;
private:
//mapping of channel index to position in data
static const uint8_t channelPositionsInData_[FEDCH_PER_DELAY_CHIP];
Expand Down
Expand Up @@ -177,7 +177,7 @@ namespace sistrip {
if (productWrapper) {
return productWrapper->product();
} else {
return NULL;
return nullptr;
}
}

Expand Down
12 changes: 6 additions & 6 deletions DQM/SiStripMonitorHardware/src/BuildTrackerMap.cc
Expand Up @@ -57,11 +57,11 @@ class BuildTrackerMapPlugin : public edm::EDAnalyzer
public:

explicit BuildTrackerMapPlugin(const edm::ParameterSet&);
~BuildTrackerMapPlugin();
~BuildTrackerMapPlugin() override;
private:
virtual void beginJob() override;
virtual void analyze(const edm::Event&, const edm::EventSetup&) override;
virtual void endJob() override;
void beginJob() override;
void analyze(const edm::Event&, const edm::EventSetup&) override;
void endJob() override;

void read(bool aMechView,
std::string aFile,
Expand Down Expand Up @@ -160,7 +160,7 @@ void BuildTrackerMapPlugin::read(bool aMechView,
std::vector<TkHistoMap *> tkHistoMap;

unsigned int nHists = tkHistoMapNameVec_.size();
tkHistoMap.resize(nHists,0);
tkHistoMap.resize(nHists,nullptr);
aValidVec.resize(nHists,true);

std::string dirName = folderName_;
Expand Down Expand Up @@ -369,7 +369,7 @@ BuildTrackerMapPlugin::endJob()

//(pset_,pDD1);
lTkMap->setPalette(1);
lTkMap->showPalette(1);
lTkMap->showPalette(true);
if (!tkHistoMapVec_.at(i) || !isValidMap_.at(i)) {
std::cout << "Warning, tkHistoMap is invalid for element " << i << "... continuing ..." << std::endl;
continue;
Expand Down
22 changes: 11 additions & 11 deletions DQM/SiStripMonitorHardware/src/CMHistograms.cc
Expand Up @@ -75,7 +75,7 @@ void CMHistograms::fillHistograms(const std::vector<CMvalues>& aVec, float aTime

}//loop on elements

if (aVec.size() > 0) {
if (!aVec.empty()) {
lMean = lMean / (2*aVec.size());
lPrevMean = lPrevMean / (2*aVec.size());
}
Expand Down Expand Up @@ -147,16 +147,16 @@ void CMHistograms::bookTopLevelHistograms(DQMStore::IBooker & ibooker)

//book map after, as it creates a new folder...
if (tkMapConfig_.enabled){
tkmapCM_[0] = new TkHistoMap("SiStrip/TkHisto","TkHMap_MeanCMAPV",0.,500);
tkmapCM_[1] = new TkHistoMap("SiStrip/TkHisto","TkHMap_RmsCMAPV",0.,500);
tkmapCM_[2] = new TkHistoMap("SiStrip/TkHisto","TkHMap_MeanCMAPV0minusAPV1",-500.,500);
tkmapCM_[3] = new TkHistoMap("SiStrip/TkHisto","TkHMap_RmsCMAPV0minusAPV1",-500.,500);
tkmapCM_[0] = new TkHistoMap("SiStrip/TkHisto","TkHMap_MeanCMAPV",0.,true);
tkmapCM_[1] = new TkHistoMap("SiStrip/TkHisto","TkHMap_RmsCMAPV",0.,true);
tkmapCM_[2] = new TkHistoMap("SiStrip/TkHisto","TkHMap_MeanCMAPV0minusAPV1",-500.,true);
tkmapCM_[3] = new TkHistoMap("SiStrip/TkHisto","TkHMap_RmsCMAPV0minusAPV1",-500.,true);
}
else {
tkmapCM_[0] = 0;
tkmapCM_[1] = 0;
tkmapCM_[2] = 0;
tkmapCM_[3] = 0;
tkmapCM_[0] = nullptr;
tkmapCM_[1] = nullptr;
tkmapCM_[2] = nullptr;
tkmapCM_[3] = nullptr;
}

for ( unsigned int i = sistrip::FED_ID_MIN; i <= sistrip::FED_ID_MAX; i++ )
Expand Down Expand Up @@ -204,8 +204,8 @@ void CMHistograms::bookChannelsHistograms(DQMStore::IBooker & ibooker , unsigned
fedIdStream << fedId;

ibooker.setCurrentFolder(fedKey.path());
medianperChannelMap_[fedId].resize(sistrip::FEDCH_PER_FED,0);
medianAPV0minusAPV1perChannelMap_[fedId].resize(sistrip::FEDCH_PER_FED,0);
medianperChannelMap_[fedId].resize(sistrip::FEDCH_PER_FED,nullptr);
medianAPV0minusAPV1perChannelMap_[fedId].resize(sistrip::FEDCH_PER_FED,nullptr);

for (unsigned int iCh(0); iCh < sistrip::FEDCH_PER_FED; iCh++){

Expand Down
6 changes: 3 additions & 3 deletions DQM/SiStripMonitorHardware/src/FEDErrors.cc
Expand Up @@ -390,14 +390,14 @@ bool FEDErrors::fillFEDErrors(const FEDRawData& aFedData,


if (printDebug() && aPrintDebug>2) {
const sistrip::FEDBufferBase* debugBuffer = NULL;
const sistrip::FEDBufferBase* debugBuffer = nullptr;

if (buffer.get()) debugBuffer = buffer.get();
//else if (bufferBase.get()) debugBuffer = bufferBase.get();
if (debugBuffer) {
std::vector<FEDErrors::APVLevelErrors> & lChVec = getAPVLevelErrors();
std::ostringstream debugStream;
if (lChVec.size()) {
if (!lChVec.empty()) {
std::sort(lChVec.begin(),lChVec.end());
debugStream << "[FEDErrors] Cabled channels which had errors: ";

Expand Down Expand Up @@ -858,7 +858,7 @@ void FEDErrors::fillEventProperties(long long dbx) {

void FEDErrors::incrementLumiErrors(const bool hasError,
const unsigned int aSubDet){
if (!lumiErr_.nTotal.size()) return;
if (lumiErr_.nTotal.empty()) return;
if (aSubDet >= lumiErr_.nTotal.size()) {
edm::LogError("SiStripMonitorHardware") << " -- FED " << fedID_
<< ", invalid subdetid : " << aSubDet
Expand Down
2 changes: 1 addition & 1 deletion DQM/SiStripMonitorHardware/src/FEDHistograms.cc
Expand Up @@ -809,7 +809,7 @@ void FEDHistograms::bookTopLevelHistograms(DQMStore::IBooker & ibooker , std::st
if (tkMapConfig_.enabled){
tkmapFED_ = new TkHistoMap(topFolderName,"TkHMap_FractionOfBadChannels",0.,true);
}
else tkmapFED_ = 0;
else tkmapFED_ = nullptr;

}

Expand Down
12 changes: 6 additions & 6 deletions DQM/SiStripMonitorHardware/src/HistogramBase.cc
Expand Up @@ -37,7 +37,7 @@ void HistogramBase::getConfigForHistogram(HistogramConfig & aConfig,
)
{

aConfig.monitorEle = 0;
aConfig.monitorEle = nullptr;
aConfig.enabled = false;
aConfig.nBins = 0;
aConfig.min = aConfig.max = 0.;
Expand Down Expand Up @@ -98,7 +98,7 @@ void HistogramBase::bookHistogram(DQMStore::IBooker & ibooker , HistogramConfig
aConfig.monitorEle = ibooker.book1D(name,title,nBins,min,max);
aConfig.monitorEle->setAxisTitle(xAxisTitle,1);
} else {
aConfig.monitorEle = 0;
aConfig.monitorEle = nullptr;
}

}
Expand All @@ -118,7 +118,7 @@ void HistogramBase::bookHistogram(DQMStore::IBooker & ibooker , HistogramConfig
aHist = ibooker.book1D(name,title,nBins,min,max);
aHist->setAxisTitle(xAxisTitle,1);
} else {
aHist = 0;
aHist = nullptr;
}

}
Expand Down Expand Up @@ -151,7 +151,7 @@ void HistogramBase::book2DHistogram(DQMStore::IBooker & ibooker , HistogramConfi
aConfig.monitorEle->setAxisTitle(xAxisTitle,1);
aConfig.monitorEle->setAxisTitle(yAxisTitle,2);
} else {
aConfig.monitorEle=NULL;
aConfig.monitorEle=nullptr;
}
}

Expand All @@ -175,7 +175,7 @@ void HistogramBase::book2DHistogram(DQMStore::IBooker & ibooker , HistogramConfi
aHist->setAxisTitle(xAxisTitle,1);
aHist->setAxisTitle(yAxisTitle,2);
} else {
aHist=NULL;
aHist=nullptr;
}
}

Expand Down Expand Up @@ -206,7 +206,7 @@ void HistogramBase::bookProfile(DQMStore::IBooker & ibooker , HistogramConfig &
aConfig.monitorEle->setAxisTitle(xAxisTitle,1);
aConfig.monitorEle->setAxisTitle(yAxisTitle,2);
} else {
aConfig.monitorEle = NULL;
aConfig.monitorEle = nullptr;
}
}

Expand Down
6 changes: 3 additions & 3 deletions DQM/SiStripMonitorHardware/src/SiStripCMMonitor.cc
Expand Up @@ -64,7 +64,7 @@ class SiStripCMMonitorPlugin : public DQMEDAnalyzer
public:

explicit SiStripCMMonitorPlugin(const edm::ParameterSet&);
~SiStripCMMonitorPlugin();
~SiStripCMMonitorPlugin() override;
private:

struct Statistics {
Expand All @@ -73,7 +73,7 @@ class SiStripCMMonitorPlugin : public DQMEDAnalyzer
float Counter;
};

virtual void analyze(const edm::Event&, const edm::EventSetup&) override;
void analyze(const edm::Event&, const edm::EventSetup&) override;
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
void dqmBeginRun(const edm::Run& , const edm::EventSetup& ) override;

Expand Down Expand Up @@ -143,7 +143,7 @@ SiStripCMMonitorPlugin::SiStripCMMonitorPlugin(const edm::ParameterSet& iConfig)
<< "[SiStripCMMonitorPlugin]\tPrintDebugMessages? " << (printDebug_ ? "yes" : "no") << std::endl;
}

std::ostringstream* pDebugStream = (printDebug_>1 ? &debugStream : NULL);
std::ostringstream* pDebugStream = (printDebug_>1 ? &debugStream : nullptr);

cmHists_.initialise(iConfig,pDebugStream);

Expand Down
24 changes: 12 additions & 12 deletions DQM/SiStripMonitorHardware/src/SiStripFEDDataCheck.cc
Expand Up @@ -55,12 +55,12 @@ class SiStripFEDCheckPlugin : public DQMEDAnalyzer
{
public:
explicit SiStripFEDCheckPlugin(const edm::ParameterSet&);
~SiStripFEDCheckPlugin();
~SiStripFEDCheckPlugin() override;
static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);

private:
virtual void analyze(const edm::Event&, const edm::EventSetup&) override;
virtual void endRun(edm::Run const&, edm::EventSetup const&) override;
void analyze(const edm::Event&, const edm::EventSetup&) override;
void endRun(edm::Run const&, edm::EventSetup const&) override;

void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;

Expand Down Expand Up @@ -126,11 +126,11 @@ SiStripFEDCheckPlugin::SiStripFEDCheckPlugin(const edm::ParameterSet& iConfig)
, doPLOTfedNonFatalErrors_ (iConfig.getParameter<bool>("doPLOTfedNonFatalErrors"))
, doPLOTnFEDinVsLS_ (iConfig.getParameter<bool>("doPLOTnFEDinVsLS") )
, doPLOTnFEDinWdataVsLS_ (iConfig.getParameter<bool>("doPLOTnFEDinWdataVsLS") )
, fedsPresent_ (NULL)
, fedFatalErrors_ (NULL)
, fedNonFatalErrors_(NULL)
, nFEDinVsLS_ (NULL)
, nFEDinWdataVsLS_ (NULL)
, fedsPresent_ (nullptr)
, fedFatalErrors_ (nullptr)
, fedNonFatalErrors_(nullptr)
, nFEDinVsLS_ (nullptr)
, nFEDinWdataVsLS_ (nullptr)
, updateFrequency_(iConfig.getUntrackedParameter<unsigned int>("HistogramUpdateFrequency",0))
, fedsPresentBinContents_ (FEDNumbering::MAXSiStripFEDID+1,0)
, fedFatalErrorBinContents_ (FEDNumbering::MAXSiStripFEDID+1,0)
Expand Down Expand Up @@ -207,7 +207,7 @@ SiStripFEDCheckPlugin::analyze(const edm::Event& iEvent, const edm::EventSetup&

//check data exists
if (!fedData.size() || !fedData.data()) {
fillPresent(fedId,0);
fillPresent(fedId,false);
continue;
}
if (verbose_) std::cout << "FED " << fedId;
Expand All @@ -217,7 +217,7 @@ SiStripFEDCheckPlugin::analyze(const edm::Event& iEvent, const edm::EventSetup&
if (fedData.size() && fedData.data()) nFEDinWdata++;

//fill buffer present histogram
fillPresent(fedId,1);
fillPresent(fedId,true);

//check for fatal errors
//no need for debug output
Expand Down Expand Up @@ -250,7 +250,7 @@ SiStripFEDCheckPlugin::analyze(const edm::Event& iEvent, const edm::EventSetup&
}

if (hasFatalErrors) {
fillFatalError(fedId,1);
fillFatalError(fedId,true);
if (printDebug_) {
if (!buffer.get()) buffer.reset(new sistrip::FEDBuffer(fedData.data(),fedData.size(),true));
edm::LogInfo("SiStripFEDCheck") << "Fatal error with FED ID " << fedId << ". Check summary: "
Expand All @@ -261,7 +261,7 @@ SiStripFEDCheckPlugin::analyze(const edm::Event& iEvent, const edm::EventSetup&
}
}
else {
fillFatalError(fedId,0);
fillFatalError(fedId,false);
//fill non-fatal errors histogram if there were no fatal errors
fillNonFatalError(fedId,rateNonFatal);
if (printDebug_ && rateNonFatal > 0) {
Expand Down
4 changes: 2 additions & 2 deletions DQM/SiStripMonitorHardware/src/SiStripFEDDump.cc
Expand Up @@ -24,9 +24,9 @@ class SiStripFEDDumpPlugin : public DQMEDAnalyzer
{
public:
explicit SiStripFEDDumpPlugin(const edm::ParameterSet&);
~SiStripFEDDumpPlugin();
~SiStripFEDDumpPlugin() override;
private:
virtual void analyze(const edm::Event&, const edm::EventSetup&) override;
void analyze(const edm::Event&, const edm::EventSetup&) override;
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;

//tag of FEDRawData collection
Expand Down