diff --git a/Calorimeter/CaloRec/python/CaloCellGetter.py b/Calorimeter/CaloRec/python/CaloCellGetter.py index e3971b97c7a0f0d3b3f1e891dbe6462369652e0b..21e3696968e71be92100315c2029160c43f41c38 100644 --- a/Calorimeter/CaloRec/python/CaloCellGetter.py +++ b/Calorimeter/CaloRec/python/CaloCellGetter.py @@ -49,8 +49,6 @@ class CaloCellGetter (Configured) : from LArROD.LArRODFlags import larRODFlags from AthenaCommon.GlobalFlags import globalflags if larRODFlags.readDigits() and globalflags.DataSource() == 'data': - if "LArRawChannelContainer/LArRawChannels" not in svcMgr.ByteStreamAddressProviderSvc.TypeNames: - svcMgr.ByteStreamAddressProviderSvc.TypeNames += ["LArRawChannelContainer/LArRawChannels"] from LArROD.LArRawChannelBuilderDefault import LArRawChannelBuilderDefault LArRawChannelBuilderDefault() diff --git a/LArCalorimeter/LArCnv/LArByteStream/python/LArRawDataReadingConfig.py b/LArCalorimeter/LArCnv/LArByteStream/python/LArRawDataReadingConfig.py new file mode 100644 index 0000000000000000000000000000000000000000..462734e1f8c44d37dcc14d5fd13bacecb69c244f --- /dev/null +++ b/LArCalorimeter/LArCnv/LArByteStream/python/LArRawDataReadingConfig.py @@ -0,0 +1,41 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator +from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg +from LArByteStream.LArByteStreamConf import LArRawDataReadingAlg +from LArGeoAlgsNV.LArGMConfig import LArGMCfg + +def LArRawDataReadingCfg(configFlags): + acc=ComponentAccumulator() + acc.merge(LArGMCfg(configFlags)) #Needed for identifier helpers + acc.merge(ByteStreamReadCfg(configFlags)) + acc.addEventAlgo(LArRawDataReadingAlg()) + return acc + + +if __name__=="__main__": + + from AthenaConfiguration.AllConfigFlags import ConfigFlags + from AthenaCommon.Logging import log + from AthenaCommon.Constants import DEBUG + from AthenaCommon.Configurable import Configurable + Configurable.configurableRun3Behavior=1 + log.setLevel(DEBUG) + + from AthenaConfiguration.TestDefaults import defaultTestFiles + ConfigFlags.LAr.doAlign=False + ConfigFlags.Input.Files = defaultTestFiles.RAW + ConfigFlags.lock() + + acc=LArRawDataReadingCfg(ConfigFlags) + + from LArEventTest.LArEventTestConf import DumpLArRawChannels + from LArCabling.LArCablingConfig import LArOnOffIdMappingCfg + acc.merge(LArOnOffIdMappingCfg(ConfigFlags)) + acc.addEventAlgo(DumpLArRawChannels(LArRawChannelContainerName="LArRawChannels",)) + + #acc.getService("IOVDbSvc").OutputLevel=VERBOSE + + f=open("LArRawDataReading.pkl","w") + acc.store(f) + f.close() diff --git a/LArCalorimeter/LArCnv/LArByteStream/src/LArRawDataReadingAlg.cxx b/LArCalorimeter/LArCnv/LArByteStream/src/LArRawDataReadingAlg.cxx new file mode 100644 index 0000000000000000000000000000000000000000..ceafd6460a73d8b3df2329741ec47ae13b0520e3 --- /dev/null +++ b/LArCalorimeter/LArCnv/LArByteStream/src/LArRawDataReadingAlg.cxx @@ -0,0 +1,248 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include "LArRawDataReadingAlg.h" +#include "LArIdentifier/LArOnlineID.h" +#include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h" +#include "LArRawEvent/LArRawChannelContainer.h" +#include "LArRawEvent/LArDigitContainer.h" +#include "LArRawEvent/LArFebHeaderContainer.h" +#include "eformat/Version.h" +#include "eformat/index.h" + +#include "LArByteStream/LArRodBlockStructure.h" +#include "LArByteStream/LArRodBlockPhysicsV5.h" +#include "LArByteStream/LArRodBlockPhysicsV6.h" + +LArRawDataReadingAlg::LArRawDataReadingAlg(const std::string& name, ISvcLocator* pSvcLocator) : + AthReentrantAlgorithm(name, pSvcLocator) {} + + StatusCode LArRawDataReadingAlg::initialize() { + if (m_rawChannelKey.key().size()>0) { + ATH_CHECK(m_rawChannelKey.initialize()); + } + else { + m_doRawChannels=false; + } + + if (m_digitKey.key().size()>0) { + ATH_CHECK(m_digitKey.initialize()); + } + else { + m_doDigits=false; + } + + if (m_febHeaderKey.key().size()>0) { + ATH_CHECK(m_febHeaderKey.initialize()); + } + else { + m_doFebHeaders=false; + } + + + ATH_CHECK(m_robDataProviderSvc.retrieve()); + ATH_CHECK(detStore()->retrieve(m_onlineId,"LArOnlineID")); + return StatusCode::SUCCESS; +} + +StatusCode LArRawDataReadingAlg::execute(const EventContext& ctx) const { + LArRawChannelContainer* rawChannels=nullptr; + LArDigitContainer* digits=nullptr; + LArFebHeaderContainer* febHeaders=nullptr; + + if (m_doRawChannels) { + SG::WriteHandle<LArRawChannelContainer> rawChannelsHdl(m_rawChannelKey,ctx); + ATH_CHECK(rawChannelsHdl.record(std::make_unique<LArRawChannelContainer>())); + rawChannels=rawChannelsHdl.ptr(); + rawChannels->reserve(182468); //Total number of LAr readout channels + } + + if (m_doDigits) { + SG::WriteHandle<LArDigitContainer> digitsHdl(m_digitKey,ctx); + ATH_CHECK(digitsHdl.record(std::make_unique<LArDigitContainer>())); + digits=digitsHdl.ptr(); + digits->reserve(1000); //Approximate number of Digits above threshold + } + + if (m_doFebHeaders) { + SG::WriteHandle<LArFebHeaderContainer> febHeadersHdl(m_febHeaderKey,ctx); + ATH_CHECK(febHeadersHdl.record(std::make_unique<LArFebHeaderContainer>())); + febHeaders=febHeadersHdl.ptr(); + febHeaders->reserve(1524); //Total number of LAr Front End Boards + } + + //Get full events and filter out LAr ROBs + const RawEvent* fullEvent=m_robDataProviderSvc->getEvent(ctx); + std::map<eformat::SubDetectorGroup, std::vector<const uint32_t*> > rawEventTOC; + eformat::helper::build_toc(*fullEvent, rawEventTOC); + auto larRobs=rawEventTOC.find(eformat::LAR); + if (larRobs==rawEventTOC.end()) { + ATH_MSG_DEBUG("No LAr data found in this event. Recording empty LArRawChannelContainer"); + return StatusCode::SUCCESS; + } + + + std::unique_ptr<LArRodBlockStructure> rodBlock; + uint16_t rodMinorVersion=0x0; + uint32_t rodBlockType=0x0; + + + for (const uint32_t* robPtr : larRobs->second) { + OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment rob(robPtr); + ATH_MSG_VERBOSE("Decoding ROB fragment 0x" << std::hex << rob.rob_source_id () << " with " << std::dec << rob.rod_fragment_size_word() << "ROB words"); + + if (rob.rod_fragment_size_word() <3) { + ATH_MSG_ERROR("Encountered corrupt ROD fragment, less than 3 words!"); + if (m_failOnCorruption) { + return StatusCode::FAILURE; + }else + continue; + } + + eformat::helper::Version ver(rob.rod_version()); + //(re-)init rodBlock only once per event or if (very unlikly or even impossible) some FEBs have a differnt firmware + if (rodBlock==nullptr || rodMinorVersion !=ver.minor_version() || rodBlockType!=(rob.rod_detev_type()&0xff)) { + rodMinorVersion=ver.minor_version(); + rodBlockType=rob.rod_detev_type()&0xff; + ATH_MSG_VERBOSE("Found version " << rodMinorVersion << " of Rod Block Type " << rodBlockType); + if (rodBlockType==4) { //Physics mode + switch(rodMinorVersion) { + case 12: //Physics mode v6 09.03.2011 for LHC + rodBlock.reset(new LArRodBlockPhysicsV6); + break; + case 11: //Physics mode v5 16.06.2008 for LHC + case 10: //Physics mode v5 16.06.2008 for LHC + rodBlock.reset(new LArRodBlockPhysicsV5); + break; + default: + ATH_MSG_ERROR("Found unsupported ROD Block version " << rodMinorVersion + << " of ROD block type " << rodBlockType); + return m_failOnCorruption ? StatusCode::FAILURE : StatusCode::SUCCESS; + }// end switch(rodMinorVersion) + }//end of rodBlockType==4 + else { + ATH_MSG_ERROR("Found unsupported Rod block type " << rodBlockType); + return m_failOnCorruption ? StatusCode::FAILURE : StatusCode::SUCCESS; + } + }//End if need to re-init RodBlock + + const uint32_t* pData=rob.rod_data(); + const uint32_t nData=rob.rod_ndata(); + if (!rodBlock->setFragment(pData,nData)) { + ATH_MSG_ERROR("Failed to assign fragment pointer to LArRodBlockStructure"); + return StatusCode::FAILURE; + } + + if(m_verifyChecksum) { + const uint32_t onsum = rodBlock->onlineCheckSum(); + const uint32_t offsum = rodBlock->offlineCheckSum(); + if(onsum!=offsum) { + ATH_MSG_ERROR("Checksum error:"); + ATH_MSG_ERROR("online checksum = 0x" << MSG::hex << onsum); + ATH_MSG_ERROR("offline checksum = 0x" << MSG::hex << offsum << MSG::dec); + if (m_failOnCorruption) + return StatusCode::FAILURE; + else + continue; //Jump to the next ROD-block + } + } + + //Loop over FEBs in ROD: + do { + HWIdentifier fId(Identifier32(rodBlock->getFEBID())); + if (!m_onlineId->isValidId(fId)) { + ATH_MSG_ERROR("Invalid FEB identifer 0x" << std::hex << fId.get_identifier32().get_compact()); + if (m_failOnCorruption) + return StatusCode::FAILURE; + else + continue; + } + const int NthisFebChannel=m_onlineId->channelInSlotMax(fId); + + //Decode RawChanels (if requested) + if (m_doRawChannels) { + int32_t energy; + int32_t time; + int32_t quality; + uint32_t gain; + int fcNb; + while (rodBlock->getNextEnergy(fcNb,energy,time,quality,gain)) { + if (fcNb>=NthisFebChannel) + continue; + + HWIdentifier cId = m_onlineId->channel_Id(fId,fcNb); + uint16_t iquality = 0; + uint16_t iprovenance = 0x1000; + if (quality>0) { + iprovenance |= 0x2000; + iquality = (quality & 0xFFFF); + } + rawChannels->emplace_back(cId, energy, time, iquality, iprovenance, (CaloGain::CaloGain)gain); + }//end getNextEnergyLoop + }//end if m_doRawChannels + + //Decode LArDigits (if requested) + if (m_doDigits) { + uint32_t gain; + int fcNb; + std::vector<short> samples; + while (rodBlock->getNextRawData(fcNb,samples,gain)) { + if (fcNb>=NthisFebChannel) + continue; + if (samples.size()==0) continue; // Ignore missing cells + HWIdentifier cId = m_onlineId->channel_Id(fId,fcNb); + digits->emplace_back(new LArDigit(cId, (CaloGain::CaloGain)gain, std::move(samples))); + samples.clear(); + }//end getNextRawData loop + }//end if m_doDigits + + //Decode FebHeaders (if requested) + if (m_doFebHeaders) { + std::unique_ptr<LArFebHeader> larFebHeader(new LArFebHeader(fId)); + larFebHeader->SetFormatVersion(rob.rod_version()); + larFebHeader->SetSourceId(rob.rod_source_id()); + larFebHeader->SetRunNumber(rob.rod_run_no()); + larFebHeader->SetELVL1Id(rob.rod_lvl1_id()); + larFebHeader->SetBCId(rob.rod_bc_id()); + larFebHeader->SetLVL1TigType(rob.rod_lvl1_trigger_type()); + larFebHeader->SetDetEventType(rob.rod_detev_type()); + + //set DSP data + const unsigned nsample=rodBlock->getNumberOfSamples(); + larFebHeader->SetRodStatus(rodBlock->getStatus()); + larFebHeader->SetDspCodeVersion(rodBlock->getDspCodeVersion()); + larFebHeader->SetDspEventCounter(rodBlock->getDspEventCounter()); + larFebHeader->SetRodResults1Size(rodBlock->getResults1Size()); + larFebHeader->SetRodResults2Size(rodBlock->getResults2Size()); + larFebHeader->SetRodRawDataSize(rodBlock->getRawDataSize()); + larFebHeader->SetNbSweetCells1(rodBlock->getNbSweetCells1()); + larFebHeader->SetNbSweetCells2(rodBlock->getNbSweetCells2()); + larFebHeader->SetNbSamples(nsample); + larFebHeader->SetOnlineChecksum(rodBlock->onlineCheckSum()); + larFebHeader->SetOfflineChecksum(rodBlock->offlineCheckSum()); + + if(!rodBlock->hasControlWords()) { + larFebHeader->SetFebELVL1Id(rob.rod_lvl1_id()); + larFebHeader->SetFebBCId(rob.rod_bc_id()); + } else { + const uint16_t evtid = rodBlock->getCtrl1(0) & 0x1f; + const uint16_t bcid = rodBlock->getCtrl2(0) & 0x1fff; + larFebHeader->SetFebELVL1Id(evtid); + larFebHeader->SetFebBCId(bcid); + for(int iadc=0;iadc<16;iadc++) { + larFebHeader->SetFebCtrl1(rodBlock->getCtrl1(iadc)); + larFebHeader->SetFebCtrl2(rodBlock->getCtrl2(iadc)); + larFebHeader->SetFebCtrl3(rodBlock->getCtrl3(iadc)); + } + for(unsigned int i = 0; i<nsample; i++ ) { + larFebHeader->SetFebSCA(rodBlock->getRadd(0,i) & 0xff); + } + }//end else no control words + febHeaders->push_back(std::move(larFebHeader)); + }//end if m_doFebHeaders + + }while (rodBlock->nextFEB()); //Get NextFeb + } //end loop over ROBs + return StatusCode::SUCCESS; +} diff --git a/LArCalorimeter/LArCnv/LArByteStream/src/LArRawDataReadingAlg.h b/LArCalorimeter/LArCnv/LArByteStream/src/LArRawDataReadingAlg.h new file mode 100644 index 0000000000000000000000000000000000000000..16152ba179c44bfc7da32a8fe66c41b08b2ccc44 --- /dev/null +++ b/LArCalorimeter/LArCnv/LArByteStream/src/LArRawDataReadingAlg.h @@ -0,0 +1,54 @@ +//Dear emacs, this is -*-c++-*- +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARBYTESTREAM_LARRAWDATAREADINDINGALG_H +#define LARBYTESTREAM_LARRAWDATAREADINDINGALG_H + +#include "AthenaBaseComps/AthReentrantAlgorithm.h" +#include "StoreGate/WriteHandle.h" +#include "StoreGate/ReadCondHandle.h" +#include "LArCabling/LArOnOffIdMapping.h" +#include "GaudiKernel/ServiceHandle.h" + + +//Event classes +class LArRawChannelContainer; +class LArDigitContainer; +class LArFebHeaderContainer; +class LArOnlineID; +class IROBDataProviderSvc; + +class LArRawDataReadingAlg : public AthReentrantAlgorithm { + public: + LArRawDataReadingAlg(const std::string& name, ISvcLocator* pSvcLocator); + + StatusCode initialize() override; + StatusCode execute(const EventContext& ctx) const override; + + private: + //Event output: + SG::WriteHandleKey<LArRawChannelContainer> m_rawChannelKey{this,"LArRawChannelKey","LArRawChannels", + "SG key of the LArRawChannelContainer"}; + SG::WriteHandleKey<LArDigitContainer> m_digitKey{this,"LArDigitKey","FREE"}; + SG::WriteHandleKey<LArFebHeaderContainer> m_febHeaderKey{this,"LArFebHeaderKey","LArFebHeader"}; + + //Service providing the input data + ServiceHandle<IROBDataProviderSvc> m_robDataProviderSvc{this,"ROBDataProviderSvc","ROBDataProviderSvc"}; + + //Other properties: + BooleanProperty m_verifyChecksum{this,"VerifyChecksum",true,"Calculate and compare checksums to detect data transmission errors"}; + BooleanProperty m_failOnCorruption{this,"FailOnCorruption",true,"Return FAILURE if data corruption is found"}; + + //Identifier helper + const LArOnlineID* m_onlineId=nullptr; + + //Switches set in initialize() based of SG keys of output object + bool m_doRawChannels=true; + bool m_doDigits=true; + bool m_doFebHeaders=true; + +}; + +#endif diff --git a/LArCalorimeter/LArCnv/LArByteStream/src/components/LArByteStream_entries.cxx b/LArCalorimeter/LArCnv/LArByteStream/src/components/LArByteStream_entries.cxx index b9c6f83e3b0e2df49b947facbad68abbf7b0cfab..a60b8cb93d279e55322e9ea24f799b6fa5ce4cc2 100644 --- a/LArCalorimeter/LArCnv/LArByteStream/src/components/LArByteStream_entries.cxx +++ b/LArCalorimeter/LArCnv/LArByteStream/src/components/LArByteStream_entries.cxx @@ -8,12 +8,14 @@ #include "LArByteStream/LArRodDecoder.h" #include "LArByteStream/LArABBADecoder.h" #include "ByteStreamCnvSvcBase/CollectionByteStreamCnv.h" +#include "../LArRawDataReadingAlg.h" //#include "LArByteStream/LArRawChannelCollByteStreamTool.h" // Containers DECLARE_COMPONENT( LArRawDataContByteStreamTool ) DECLARE_COMPONENT( LArRodDecoder ) DECLARE_COMPONENT( LArABBADecoder ) +DECLARE_COMPONENT( LArRawDataReadingAlg ) DECLARE_CONVERTER( LArRawChannelContByteStreamCnv ) DECLARE_CONVERTER( LArDigitContByteStreamCnv ) diff --git a/LArCalorimeter/LArROD/python/LArDigits.py b/LArCalorimeter/LArROD/python/LArDigits.py index 39988f06cf21ba68f7c79298d639ef2acc2acb01..59a39d212db1ce970ea1501a655f6941de12b0d6 100644 --- a/LArCalorimeter/LArROD/python/LArDigits.py +++ b/LArCalorimeter/LArROD/python/LArDigits.py @@ -19,20 +19,20 @@ class DefaultLArDigitThinner (LArDigitThinner) : self.EnergyCut_HEC = 5000 self.EnergyCut_FCAL = 20000 + from AthenaCommon.AlgSequence import AlgSequence + topSequence = AlgSequence() from AthenaCommon.GlobalFlags import globalflags if globalflags.DataSource()=='data': - if globalflags.InputFormat() == 'bytestream': - from AthenaCommon.AppMgr import ServiceMgr as svcMgr - if not "LArDigitContainer/FREE" in svcMgr.ByteStreamAddressProviderSvc.TypeNames: - svcMgr.ByteStreamAddressProviderSvc.TypeNames += ["LArDigitContainer/FREE"] + if globalflags.InputFormat() == 'bytestream': + from LArByteStream.LArByteStreamConf import LArRawDataReadingAlg + if LArRawDataReadingAlg() not in topSequence: + topSequence+=LArRawDataReadingAlg() self.InputContainerName="FREE" LArOnOffIdMapping() if addToAlgSeq : - from AthenaCommon.AlgSequence import AlgSequence - topSequence = AlgSequence() - topSequence += self + topSequence += self def setDefaults(self, handle): pass diff --git a/LArCalorimeter/LArROD/python/LArRawChannelBuilderAlgConfig.py b/LArCalorimeter/LArROD/python/LArRawChannelBuilderAlgConfig.py index a5844018968efcb0d6be220e44e681714d3453b6..8f848e476b3b8b2786d3be1e00fc9c2735de3195 100644 --- a/LArCalorimeter/LArROD/python/LArRawChannelBuilderAlgConfig.py +++ b/LArCalorimeter/LArROD/python/LArRawChannelBuilderAlgConfig.py @@ -1,4 +1,4 @@ -from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration from LArROD.LArRODConf import LArRawChannelBuilderAlg from LArRecUtils.LArADC2MeVCondAlgConfig import LArADC2MeVCondAlgCfg from LArConfiguration.LArElecCalibDBConfig import LArElecCalibDbCfg @@ -13,8 +13,6 @@ def LArRawChannelBuilderAlgCfg(configFlags): acc.addEventAlgo(LArRawChannelBuilderAlg()) else: acc.addEventAlgo(LArRawChannelBuilderAlg(LArRawChannelKey="LArRawChannels_fromDigits")) - from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg - acc.merge(ByteStreamReadCfg(configFlags,typeNames=["LArDigitContainer/FREE",])) return acc @@ -31,7 +29,11 @@ if __name__=="__main__": ConfigFlags.Input.Files = defaultTestFiles.RAW ConfigFlags.lock() - acc=LArRawChannelBuilderAlgCfg(ConfigFlags) + from LArByteStream.LArByteStreamConf import LArRawDataReadingAlg + from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg + acc=ByteStreamReadCfg(ConfigFlags) + acc.addEventAlgo(LArRawDataReadingAlg()) + acc.merge(LArRawChannelBuilderAlgCfg(ConfigFlags)) from LArEventTest.LArEventTestConf import DumpLArRawChannels acc.addEventAlgo(DumpLArRawChannels(LArRawChannelContainerName="LArRawChannels_fromDigits",)) diff --git a/LArCalorimeter/LArROD/python/LArRawChannelBuilderDefault.py b/LArCalorimeter/LArROD/python/LArRawChannelBuilderDefault.py index c72a9acea3a55a72e0cd7e6f5c622efbf80c5b6c..c4bf671646c2643bf278daff0c2a9349429855bc 100644 --- a/LArCalorimeter/LArROD/python/LArRawChannelBuilderDefault.py +++ b/LArCalorimeter/LArROD/python/LArRawChannelBuilderDefault.py @@ -1,5 +1,6 @@ from LArROD.LArRODFlags import larRODFlags from AthenaCommon.GlobalFlags import globalflags +from LArByteStream.LArByteStreamConf import LArRawDataReadingAlg def LArRawChannelBuilderDefault(): from AthenaCommon.AlgSequence import AlgSequence @@ -7,13 +8,10 @@ def LArRawChannelBuilderDefault(): from AthenaCommon.AppMgr import ServiceMgr as svcMgr if larRODFlags.readDigits() and globalflags.InputFormat() == 'bytestream': + if LArRawDataReadingAlg() not in topSequence: + print "Adding LArRawDataReaderAlg" + topSequence+=LArRawDataReadingAlg() - if not "LArDigitContainer/FREE" in svcMgr.ByteStreamAddressProviderSvc.TypeNames: - svcMgr.ByteStreamAddressProviderSvc.TypeNames += ["LArDigitContainer/FREE"] - - if not larRODFlags.keepDSPRaw(): - svcMgr.ByteStreamAddressProviderSvc.TypeNames += ["LArRawChannelContainer/LArRawChannels"] - from LArRecUtils.LArADC2MeVCondAlgDefault import LArADC2MeVCondAlgDefault LArADC2MeVCondAlgDefault() diff --git a/LArCalorimeter/LArROD/python/LArRawChannelGetter.py b/LArCalorimeter/LArROD/python/LArRawChannelGetter.py index f268e0f807ccd79cf08fa32a1871daf424d69f7b..584a8f2a598866e1ee1881e4482b83d712d75b53 100755 --- a/LArCalorimeter/LArROD/python/LArRawChannelGetter.py +++ b/LArCalorimeter/LArROD/python/LArRawChannelGetter.py @@ -50,15 +50,8 @@ class LArRawChannelGetter ( Configured ) : from AthenaCommon.GlobalFlags import globalflags if globalflags.InputFormat() == 'bytestream': - if not "LArDigitContainer/FREE" in svcMgr.ByteStreamAddressProviderSvc.TypeNames: - svcMgr.ByteStreamAddressProviderSvc.TypeNames += ["LArDigitContainer/FREE"] if not larRODFlags.keepDSPRaw(): - if "LArRawChannelContainer/LArRawChannels" in svcMgr.ByteStreamAddressProviderSvc.TypeNames: - svcMgr.ByteStreamAddressProviderSvc.TypeNames.remove("LArRawChannelContainer/LArRawChannels") - else: - if not "LArRawChannelContainer/LArRawChannels" in svcMgr.ByteStreamAddressProviderSvc.TypeNames: - svcMgr.ByteStreamAddressProviderSvc.TypeNames += ["LArRawChannelContainer/LArRawChannels"] - + topSequence.LArRawDataReaderAlg.LArRawChannelKey="" if globalflags.DetGeo() == 'ctbh6' or globalflags.DetGeo() == 'ctbh8': from LArROD.LArRODConf import LArRawChannelBuilder diff --git a/Reconstruction/RecExample/RecExCommon/share/BSRead_config.py b/Reconstruction/RecExample/RecExCommon/share/BSRead_config.py index 6b20c2ad9d2c78d70774d7b8baef1c002ebe3197..8363cc018ef570e12c63e7a4e8383e2299233ca2 100644 --- a/Reconstruction/RecExample/RecExCommon/share/BSRead_config.py +++ b/Reconstruction/RecExample/RecExCommon/share/BSRead_config.py @@ -33,20 +33,8 @@ if rec.doMuon(): include("MuonCnvExample/MuonReadBS_jobOptions.py") if DetFlags.readRDOBS.LAr_on(): - if globalflags.DataSource()=='data': - svcMgr.ByteStreamAddressProviderSvc.TypeNames += ["LArFebHeaderContainer/LArFebHeader"] - else: # Bytestream from MC - svcMgr.ByteStreamAddressProviderSvc.TypeNames += ["LArRawChannelContainer/LArRawChannels"] - - #everything else is take care of by LArRawChanneGetter.py - -## from LArROD.LArRODFlags import larRODFlags -## if larRODFlags.readDigits() or larRODFlags.doDSP(): -## svcMgr.ByteStreamAddressProviderSvc.TypeNames += ["LArDigitContainer/FREE"] -## #if larRODFlags.readRawChannels() or not larRODFlags.doDSP(): -## # svcMgr.ByteStreamAddressProviderSvc.TypeNames += ["LArRawChannelContainer/LArRawChannels"] -## else: # Bytestream from MC -## svcMgr.ByteStreamAddressProviderSvc.TypeNames += ["LArRawChannelContainer/LArRawChannels"] + from LArByteStream.LArByteStreamConf import LArRawDataReadingAlg + topSequence+=LArRawDataReadingAlg() #Default config ist fine if DetFlags.readRDOBS.Tile_on(): svcMgr.ByteStreamAddressProviderSvc.TypeNames += [