diff --git a/mvd/CbmMvdDigitizer.cxx b/mvd/CbmMvdDigitizer.cxx index 5e046b420aab75a59d68148ca3c65ad51ba3d8a7..a8f0eeef0eea07a583db4a64166da3db0ce0c3f1 100644 --- a/mvd/CbmMvdDigitizer.cxx +++ b/mvd/CbmMvdDigitizer.cxx @@ -279,6 +279,18 @@ InitStatus CbmMvdDigitizer::Init() if (fNoiseSensors) fDetector->SetProduceNoise(); + // --- Read list of inactive channels + if (!fInactiveChannelFileName.IsNull()) { + LOG(info) << GetName() << ": Reading inactive channels from " << fInactiveChannelFileName; + auto result = ReadInactiveChannels(); + if (!result.second) { + LOG(error) << GetName() << ": Error in reading from file! Task will be inactive."; + return kFATAL; + } + LOG(info) << GetName() << ": " << std::get<0>(result) << " lines read from file, " << fInactiveChannels.size() + << " channels set inactive"; + } + // Screen output cout << GetName() << " initialised with parameters: " << endl; //PrintParameters(); diff --git a/sim/detectors/bmon/CbmBmonDigitize.cxx b/sim/detectors/bmon/CbmBmonDigitize.cxx index 052fbade4c56a7ed9ce775256c80c3c0596355e0..810f732f57764959a9753fd6d92934997c353947 100644 --- a/sim/detectors/bmon/CbmBmonDigitize.cxx +++ b/sim/detectors/bmon/CbmBmonDigitize.cxx @@ -89,7 +89,21 @@ InitStatus CbmBmonDigitize::Init() LOG(info) << "=========================================================="; LOG(info) << GetName() << ": Initialisation"; LOG(info) << "Time resolution is " << fResolution << " [ns]"; + RegisterOutput(); + + // --- Read list of inactive channels + if (!fInactiveChannelFileName.IsNull()) { + LOG(info) << GetName() << ": Reading inactive channels from " << fInactiveChannelFileName; + auto result = ReadInactiveChannels(); + if (!result.second) { + LOG(error) << GetName() << ": Error in reading from file! Task will be inactive."; + return kFATAL; + } + LOG(info) << GetName() << ": " << std::get<0>(result) << " lines read from file, " << fInactiveChannels.size() + << " channels set inactive"; + } + LOG(info) << GetName() << ": Initialisation successful"; LOG(info) << "=========================================================="; std::cout << std::endl; diff --git a/sim/detectors/much/CbmMuchDigitizeGem.cxx b/sim/detectors/much/CbmMuchDigitizeGem.cxx index 069def350e8999936d361a0bb5cff711921af21b..a4c9f32cc87249bb2961d9fe7dd14a6028327983 100644 --- a/sim/detectors/much/CbmMuchDigitizeGem.cxx +++ b/sim/detectors/much/CbmMuchDigitizeGem.cxx @@ -462,6 +462,18 @@ InitStatus CbmMuchDigitizeGem::Init() // else fgDeltaResponse[i] = exp(-(time-fPeakingTime)/fRemainderTime); //} + // --- Read list of inactive channels + if (!fInactiveChannelFileName.IsNull()) { + LOG(info) << GetName() << ": Reading inactive channels from " << fInactiveChannelFileName; + auto result = ReadInactiveChannels(); + if (!result.second) { + LOG(error) << GetName() << ": Error in reading from file! Task will be inactive."; + return kFATAL; + } + LOG(info) << GetName() << ": " << std::get<0>(result) << " lines read from file, " << fInactiveChannels.size() + << " channels set inactive"; + } + // --- Enable histogram if want to enalyze Noise spectrum. //noise = new TH1D("noise", "Noise Generated per Event NoiseRate 10e-8", 100 , 0 , 200); LOG(info) << GetName() << ": Initialisation successful"; diff --git a/sim/detectors/psd/CbmPsdSimpleDigitizer.cxx b/sim/detectors/psd/CbmPsdSimpleDigitizer.cxx index 5d2e48c30cf9ea046fbddad81474e22c32339d1c..d1c9fe4937401bf6eeec338ed9ef8afd18bff2a4 100644 --- a/sim/detectors/psd/CbmPsdSimpleDigitizer.cxx +++ b/sim/detectors/psd/CbmPsdSimpleDigitizer.cxx @@ -70,6 +70,18 @@ InitStatus CbmPsdSimpleDigitizer::Init() // Create and register output array RegisterOutput(); + // --- Read list of inactive channels + if (!fInactiveChannelFileName.IsNull()) { + LOG(info) << GetName() << ": Reading inactive channels from " << fInactiveChannelFileName; + auto result = ReadInactiveChannels(); + if (!result.second) { + LOG(error) << GetName() << ": Error in reading from file! Task will be inactive."; + return kFATAL; + } + LOG(info) << GetName() << ": " << std::get<0>(result) << " lines read from file, " << fInactiveChannels.size() + << " channels set inactive"; + } + // Statistics fNofEvents = 0; fNofPoints = 0; diff --git a/sim/detectors/rich/CbmRichDigitizer.cxx b/sim/detectors/rich/CbmRichDigitizer.cxx index 05be1505ea9b290045446944cdea6090b3f50af5..6b6761cd6ed0154b02a3b7d14db50bfcc066eefc 100644 --- a/sim/detectors/rich/CbmRichDigitizer.cxx +++ b/sim/detectors/rich/CbmRichDigitizer.cxx @@ -92,6 +92,17 @@ InitStatus CbmRichDigitizer::Init() RegisterOutput(); + // --- Read list of inactive channels + if (!fInactiveChannelFileName.IsNull()) { + LOG(info) << GetName() << ": Reading inactive channels from " << fInactiveChannelFileName; + auto result = ReadInactiveChannels(); + if (!result.second) { + LOG(error) << GetName() << ": Error in reading from file! Task will be inactive."; + return kFATAL; + } + LOG(info) << GetName() << ": " << std::get<0>(result) << " lines read from file, " << fInactiveChannels.size() + << " channels set inactive"; + } LOG(info) << GetName() << ": Initialisation successful"; diff --git a/sim/detectors/tof/CbmTofDigitize.cxx b/sim/detectors/tof/CbmTofDigitize.cxx index 9453373af297d496719f9eb4b5b555bf3871b7f5..32f8b487d16a00daab503276874d12ce05a04d93 100644 --- a/sim/detectors/tof/CbmTofDigitize.cxx +++ b/sim/detectors/tof/CbmTofDigitize.cxx @@ -263,6 +263,19 @@ InitStatus CbmTofDigitize::Init() if (kFALSE == CreateHistos()) return kFATAL; + // --- Read list of inactive channels + if (!fInactiveChannelFileName.IsNull()) { + LOG(info) << GetName() << ": Reading inactive channels from " << fInactiveChannelFileName; + auto result = ReadInactiveChannels(); + if (!result.second) { + LOG(error) << GetName() << ": Error in reading from file! Task will be inactive."; + return kFATAL; + } + LOG(info) << GetName() << ": " << std::get<0>(result) << " lines read from file, " << fInactiveChannels.size() + << " channels set inactive"; + } + + LOG(info) << GetName() << ": Initialisation successful"; LOG(info) << "=========================================================="; return kSUCCESS; diff --git a/sim/detectors/trd/CbmTrdDigitizer.cxx b/sim/detectors/trd/CbmTrdDigitizer.cxx index a328d179b11f3b10bdea1b7a1eaf5c8766fc18ee..2a36c4f66251a91d7774de25bb4ff9ddce4c6799 100644 --- a/sim/detectors/trd/CbmTrdDigitizer.cxx +++ b/sim/detectors/trd/CbmTrdDigitizer.cxx @@ -130,6 +130,18 @@ InitStatus CbmTrdDigitizer::Init() // Set time-based mode if appropriate SetTimeBased(fEventMode ? kFALSE : kTRUE); + // --- Read list of inactive channels + if (!fInactiveChannelFileName.IsNull()) { + LOG(info) << GetName() << ": Reading inactive channels from " << fInactiveChannelFileName; + auto result = ReadInactiveChannels(); + if (!result.second) { + LOG(error) << GetName() << ": Error in reading from file! Task will be inactive."; + return kFATAL; + } + LOG(info) << GetName() << ": " << std::get<0>(result) << " lines read from file, " << fInactiveChannels.size() + << " channels set inactive"; + } + RegisterOutput();