diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..f100eb8b183bbd2859b8c91d5b94cdb6054ecc25 --- /dev/null +++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetMonitoring/InDetGlobalMonitoring diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalBCMTool.cxx b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalBCMTool.cxx index 3fbd71a2b278ec1730e8b1e5d23a9b81afcb9711..2d2661de03016d833937e1b1dccafaf8c6900e3c 100755 --- a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalBCMTool.cxx +++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalBCMTool.cxx @@ -1,4 +1,3 @@ - /* Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ @@ -46,14 +45,13 @@ using namespace TMath; #define BCM_LVL1A 18 //Some variables -static unsigned int bcid_start = 0; //to choose the first bcid displayed -static unsigned int bcids_displayed = 3570; //to choose the number of bcids displayed when bcid as x-axis -static unsigned int bcid_max = 0; -static signed int ecr_start = 0; //to chose the first ECR displayed -static unsigned int ecrs_displayed = 256; //to chose the number of ecrs displayed when ECR as X-axis +static const unsigned int bcid_start = 0; //to choose the first bcid displayed +static const unsigned int bcids_displayed = 3570; //to choose the number of bcids displayed when bcid as x-axis +static const signed int ecr_start = 0; //to chose the first ECR displayed +static const unsigned int ecrs_displayed = 256; //to chose the number of ecrs displayed when ECR as X-axis static const unsigned int bc_readout = 31; // length of read out per L1A, at the moment 31 BCs re read out -static unsigned int lb_start = 0; -static unsigned int lb_max = 5000; +static const unsigned int lb_start = 0; +static const unsigned int lb_max = 5000; // the declare property can be used to make variables accessible through python InDetGlobalBCMTool::InDetGlobalBCMTool( @@ -592,7 +590,7 @@ bool deltat_data::operator<(const deltat_data &data){ } bool bcid_select(const deltat_data &data){ - return (data.bcid <bcid_max); + return (data.bcid <data.bcid_max); } StatusCode InDetGlobalBCMTool::fillHistograms(){ @@ -1069,7 +1067,10 @@ StatusCode InDetGlobalBCMTool::fillHistograms(){ } }//end of bcid if }//end of c loop - bcid_max=(positions_A[gain].front()).bcid; + // Need to set bcid_max before using bcid_select method + for (deltat_data& data : positions_C[gain]) { + data.bcid_max = (positions_A[gain].front()).bcid; + } positions_C[gain].remove_if(bcid_select); positions_A[gain].pop_front(); }//end of a loop diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalBCMTool.h b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalBCMTool.h index 639076d4089e8eca3bebad159a35058252c1da4f..d580920fa540c627a44515cce57e2aa9fe6ab741 100755 --- a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalBCMTool.h +++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalBCMTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /** @file InDetGlobalBCMTool.h @@ -141,10 +141,11 @@ private: class deltat_data{ public: unsigned int bcid; + unsigned int bcid_max; unsigned int ecr; unsigned int position; unsigned int detector; - unsigned int lvl1a; + unsigned int lvl1a; deltat_data(); bool operator<(const deltat_data &data); // deltat_data min(const deltat_data &data);