Commit c544d32c authored by Dominik Smith's avatar Dominik Smith
Browse files

CbmBuildRawEvents: Moved initialization of T0 digi vector from Algo to Task.

parent 24236f6e
......@@ -126,12 +126,8 @@ void CbmAlgoBuildRawEvents::Finish() {
// ---------------------------------------------------------------------
Bool_t CbmAlgoBuildRawEvents::CheckDataAvailable(RawEventBuilderDetector& det) {
// Get a handle from the IO manager
FairRootManager* ioman = FairRootManager::Instance();
if (ECbmModuleId::kT0 == det.detId) {
// T0 is not included in DigiManager
fT0DigiVec = ioman->InitObjectAs<std::vector<CbmTofDigi> const*>("T0Digi");
if (!fT0DigiVec) {
LOG(info) << "No T0 digi input found.";
return kFALSE;
......
......@@ -194,6 +194,9 @@ public:
}
/// Set digi containers
void SetT0Digis(const std::vector<CbmTofDigi>* T0DigiVec) {
fT0DigiVec = T0DigiVec;
}
void SetStsDigis(std::vector<CbmStsDigi>* StsDigis) { fStsDigis = StsDigis; }
void SetMuchDigis(std::vector<CbmMuchDigi>* MuchDigis) {
fMuchDigis = MuchDigis;
......@@ -274,10 +277,10 @@ private:
/// FIXME: usage of CbmDigiManager in FairMq context?!?
/// => Maybe by registering vector (or vector reference) to ioman in Device?
//CbmDigiManager* fDigiMan = nullptr; //!
const std::vector<CbmTofDigi>* fT0DigiVec = nullptr; //!
TClonesArray* fTimeSliceMetaDataArray = nullptr; //!
const TimesliceMetaData* pTsMetaData = nullptr;
TClonesArray* fTimeSliceMetaDataArray = nullptr; //!
const TimesliceMetaData* pTsMetaData = nullptr;
const std::vector<CbmTofDigi>* fT0DigiVec = nullptr;
const std::vector<CbmMuchDigi>* fMuchDigis = nullptr;
const std::vector<CbmMuchBeamTimeDigi>* fMuchBeamTimeDigis = nullptr;
const std::vector<CbmStsDigi>* fStsDigis = nullptr;
......
......@@ -41,6 +41,15 @@ InitStatus CbmTaskBuildRawEvents::Init() {
/// Get a handle from the IO manager
FairRootManager* ioman = FairRootManager::Instance();
//T0 not included in digi manager.
fT0Digis = ioman->InitObjectAs<std::vector<CbmTofDigi> const*>("T0Digi");
if (!fT0Digis) {
LOG(info) << "No T0 digi input.";
} else {
LOG(info) << "T0 digi input.";
fpAlgo->SetT0Digis(fT0Digis);
}
// Get a pointer to the previous already existing data level
fDigiMan = CbmDigiManager::Instance();
if (fbUseMuchBeamtimeDigi) { fDigiMan->UseMuchBeamTimeDigi(); }
......
......@@ -93,6 +93,7 @@ private:
void SaveHistos();
CbmDigiManager* fDigiMan = nullptr;
const std::vector<CbmTofDigi>* fT0Digis = nullptr;
std::vector<CbmMuchDigi>* fMuchDigis = nullptr;
std::vector<CbmMuchBeamTimeDigi>* fMuchBeamTimeDigis = nullptr;
std::vector<CbmStsDigi>* fStsDigis = nullptr;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment