Changeset 20096 for trunk


Ignore:
Timestamp:
05/07/21 12:37:39 (3 years ago)
Author:
tbretz
Message:
root 6.24 requires some more includes, clasng 10 is a bit more picky about overload warinings and casting, gErrorMutex i deprecated -> so we can only lock our error handler again ourselves... well... mess ahead... thank you.
Location:
trunk/Mars
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mbase/MLog.cc

    r14079 r20096  
    9999#include <iomanip>
    100100
     101#if ROOT_VERSION_CODE >= ROOT_VERSION(6,24,00)
     102#include <mutex>
     103#endif
     104
     105
    101106#include <TROOT.h>      // gROOT->GetListOfCleanups()
    102107#include <TSystem.h>
     
    150155MLog gLog;
    151156
     157/// Serializes error output, destructed by the gROOT destructor via ReleaseDefaultErrorHandler()
     158 static std::mutex *GetErrorMutex() {
     159    static std::mutex *m = new std::mutex();
     160    return m;
     161 }
     162 
    152163// --------------------------------------------------------------------------
    153164//
     
    760771    // if abort is set it aborts the application.
    761772   if (gErrorIgnoreLevel == kUnset) {
    762       R__LOCKGUARD2(gErrorMutex);
     773#if ROOT_VERSION_CODE < ROOT_VERSION(6,24,00)
     774       R__LOCKGUARD2(gErrorMutex);
     775#else
     776       std::lock_guard<std::mutex> guard(*GetErrorMutex());
     777#endif
    763778
    764779      gErrorIgnoreLevel = 0;
     
    789804void MLog::ErrorHandlerPrint(Int_t level, const char *location, const char *msg)
    790805{
     806#if ROOT_VERSION_CODE < ROOT_VERSION(6,24,00)
    791807    R__LOCKGUARD2(gErrorMutex);
     808#else
     809    std::lock_guard<std::mutex> guard(*GetErrorMutex());
     810#endif
    792811
    793812    if (level >= kError)
  • trunk/Mars/mcamera/MCameraDC.cc

    r9010 r20096  
    106106Float_t MCameraDC::GetMin() const
    107107{
    108     Float_t val = (UInt_t)-1;
     108    Float_t val = std::numeric_limits<Float_t>::max();
    109109    for (int i=0; i<fArray.GetSize(); i++)
    110110        val = TMath::Min(val, GetCurrent(i));
  • trunk/Mars/mhbase/MH3.cc

    r19345 r20096  
    918918            return kTRUE;
    919919        case kLabelsX:
    920             static_cast<TProfile2D*>(fHist)->Fill(labelx, y,      z);
     920            static_cast<TProfile2D*>(fHist)->Fill(labelx, y,      z, 1.);
    921921            return kTRUE;
    922922        case kLabelsY:
    923             static_cast<TProfile2D*>(fHist)->Fill(x,      labely, z);
     923            static_cast<TProfile2D*>(fHist)->Fill(x,      labely, z, 1.);
    924924            return kTRUE;
    925925        case kLabelsXY:
    926             static_cast<TProfile2D*>(fHist)->Fill(labelx, labely, z);
     926            static_cast<TProfile2D*>(fHist)->Fill(labelx, labely, z, 1.);
    927927            return kTRUE;
    928928        }
  • trunk/Mars/mhcalib/MHCalibrationChargeBlindPix.cc

    r8911 r20096  
    8181#include <TH2D.h>
    8282#include <TRandom.h>
     83#include <TLine.h> // root 6.24
    8384
    8485#include "MLog.h"
  • trunk/Mars/mhflux/MHAlpha.cc

    r19304 r20096  
    5050#include <TCanvas.h>
    5151#include <TPaveStats.h>
     52#include <TLine.h> // root 6.24
    5253
    5354#include "MHillas.h"
  • trunk/Mars/mhflux/MHFalseSource.cc

    r19304 r20096  
    127127#include <TPaveText.h>
    128128#include <TStopwatch.h>
     129#include <TLine.h> // root 6.24
    129130
    130131#include "MGeomCam.h"
Note: See TracChangeset for help on using the changeset viewer.