Commit 5a316681 authored by Pascal Raisig's avatar Pascal Raisig Committed by Pierre-Alain Loizeau
Browse files

Minor upgrades mainly to the printout statements

parent 6d658101
......@@ -256,16 +256,16 @@ public:
*/
void Finish()
{
LOG(info) << fName << "::Finish. Unpacked \n " << fNrProcessedTs << " Timeslices with \n " << fNrCreatedRawMsgs
<< " Raw Messages,\n " << fNrCreatedDigis << " Digis,\n " << fNrEpochMsgs << " Epoch Messages,\n "
<< fNrCreatedInfoMsgs << " Info Messages.\n ";
LOG(info) << fName << "::Finish. \n Number of CrcValidFlags " << fNrCrcValidFlags
<< " \n Number of OverflowFlimFlags " << fNrOverflowFlimFlags << " \n Number of OverflowUserFlags "
<< fNrOverflowUserFlags << " \n Number of DataErrorFlags " << fNrDataErrorFlags << "\n";
LOG(info) << fName << "::Finish.-------------------------\n Unpack process : \n " << fNrProcessedTs
<< " Timeslices with \n " << fNrCreatedRawMsgs << " Raw Messages,\n " << fNrCreatedDigis << " Digis,\n "
<< fNrEpochMsgs << " Epoch Messages,\n " << fNrCreatedInfoMsgs << " Info Messages.\n " << fNrCrcValidFlags
<< " CrcValidFlags \n " << fNrOverflowFlimFlags << " OverflowFlimFlags \n " << fNrOverflowUserFlags
<< " OverflowUserFlags \n " << fNrDataErrorFlags << " DataErrorFlags \n ";
// Additional explicit finish of the derived class used during runtime.
finish();
LOG(info) << fName << "::Finish. Done! ------------------\n";
}
/**
......
......@@ -153,19 +153,15 @@ public:
* @param ioman Pointer to the FairRootManager instance
* @param branchname by default TOutput::GetBranchName() is used for the first output. If branchname is not empty that branchname is used.
*/
void Init(FairRootManager* ioman, std::string branchname = "")
void Init(FairRootManager* ioman)
{
LOG(info) << fName << "::Init() ---------------------------------";
if (fDoWriteOutput) {
if (branchname.empty()) {
fOutputVec = new std::vector<TOutput>();
ioman->RegisterAny(TOutput::GetBranchName(), fOutputVec, kTRUE);
LOG(info) << fName << "::registerBranchToTree(" << TOutput::GetBranchName() << ")";
}
else {
fOutputVec = new std::vector<TOutput>();
ioman->RegisterAny(branchname.data(), fOutputVec, kTRUE);
LOG(info) << fName << "::registerBranchToTree(" << branchname.data() << ")";
}
fOutputVec = new std::vector<TOutput>();
ioman->RegisterAny(GetOutputBranchName().data(), fOutputVec, kTRUE);
LOG(info) << fName << "::registerBranchToTree(" << GetOutputBranchName().data() << ")";
}
/** @todo for the optional outputs it is more complicated to check if they exist. Needs exceptions for the std::nullptr_t. Should be added at some point in time. */
......@@ -188,6 +184,8 @@ public:
// Set the global system time offset
if (fAlgo) fAlgo->SetSystemTimeOffset(fSystemTimeOffset);
LOG(info) << fName << " succesful initialized -----------------\n";
}
/** @brief Prepare the Unpacker algorithm for the run, to be implemented in the derived classes. */
......
......@@ -57,7 +57,7 @@ Bool_t CbmRecoUnpack::Init()
// --- Register the branch for the Timeslice start time
fCbmTsEventHeader = new CbmTsEventHeader();
ioman->RegisterAny("TsEventHeader", fCbmTsEventHeader, kTRUE);
LOG(info) << "CbmRecoUnpack::Init() registered CbmTsEventHeader to output tree!";
LOG(info) << "CbmRecoUnpack::Init() registered CbmTsEventHeader to output tree!\n";
// --- Psd
......@@ -71,12 +71,12 @@ Bool_t CbmRecoUnpack::Init()
// --- Trd
if (fTrdConfig) fTrdConfig->Init(ioman);
// --- TRD2D
if (fTrdConfig2D->GetOutputBranchName() == CbmTrdDigi::GetBranchName()) {
if (fTrdConfig2D->GetOutputBranchName() == fTrdConfig->GetOutputBranchName()) {
fTrdConfig2D->SetOutputVec(fTrdConfig->GetOutputVec());
if (fTrdConfig2D) fTrdConfig2D->InitUnpacker();
}
else {
if (fTrdConfig2D) fTrdConfig2D->Init(ioman, fTrdConfig2D->GetOutputBranchName());
if (fTrdConfig2D) fTrdConfig2D->Init(ioman);
}
// This is an ugly work around, because the TRD and TRD2D want to access the same vector and there is no function to retrieve a writeable vector<obj> from the FairRootManager, especially before the branches are created, as far as I am aware. The second option workaround is in in Init() to look for the fasp config and create a separate branch for fasp created CbmTrdDigis PR 072021
......
Markdown is supported
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