Commit 51dc916c authored by Dominik Smith's avatar Dominik Smith
Browse files

Updated formatting with clang-format-11 and new rules.

parent 8e42869f
......@@ -30,6 +30,7 @@
#include "CbmTofSimpClusterizer.h"
#include "CbmTrdClusterFinder.h"
#include "CbmTrdHitProducer.h"
#include <FairFileSource.h>
#include <FairMonitor.h>
#include <FairParAsciiFileIo.h>
......@@ -37,6 +38,7 @@
#include <FairRunAna.h>
#include <FairRuntimeDb.h>
#include <FairSystemInfo.h>
#include <TStopwatch.h>
#endif
......@@ -75,13 +77,9 @@
** from the ROOT prompt without user intervention.
**
**/
void run_reco(TString input = "",
Int_t nTimeSlices = -1,
Int_t firstTimeSlice = 0,
TString output = "",
TString sEvBuildRaw = "",
TString setup = "sis100_electron",
TString paramFile = "") {
void run_reco(TString input = "", Int_t nTimeSlices = -1, Int_t firstTimeSlice = 0, TString output = "",
TString sEvBuildRaw = "", TString setup = "sis100_electron", TString paramFile = "")
{
// ========================================================================
// Adjust this part according to your requirements
......@@ -93,7 +91,7 @@ void run_reco(TString input = "",
// ----- Environment --------------------------------------------------
TString myName = "run_reco"; // this macro's name for screen output
TString myName = "run_reco"; // this macro's name for screen output
TString srcDir = gSystem->Getenv("VMCWORKDIR"); // top source directory
// ------------------------------------------------------------------------
......@@ -146,21 +144,17 @@ void run_reco(TString input = "",
const Char_t* npar[4] = {"asic", "digi", "gas", "gain"};
TObjString* trdParFile(NULL);
for (Int_t i(0); i < 4; i++) {
trdParFile = new TObjString(srcDir + "/parameters/trd/trd_" + geoTag + "."
+ npar[i] + ".par");
trdParFile = new TObjString(srcDir + "/parameters/trd/trd_" + geoTag + "." + npar[i] + ".par");
parFileList->Add(trdParFile);
std::cout << "-I- " << myName << ": Using parameter file "
<< trdParFile->GetString() << std::endl;
std::cout << "-I- " << myName << ": Using parameter file " << trdParFile->GetString() << std::endl;
}
}
// - TOF digitisation parameters
if (CbmSetup::Instance()->GetGeoTag(ECbmModuleId::kTof, geoTag)) {
TObjString* tofBdfFile =
new TObjString(srcDir + "/parameters/tof/tof_" + geoTag + ".digibdf.par");
TObjString* tofBdfFile = new TObjString(srcDir + "/parameters/tof/tof_" + geoTag + ".digibdf.par");
parFileList->Add(tofBdfFile);
std::cout << "-I- " << myName << ": Using parameter file "
<< tofBdfFile->GetString() << std::endl;
std::cout << "-I- " << myName << ": Using parameter file " << tofBdfFile->GetString() << std::endl;
}
// ------------------------------------------------------------------------
......@@ -195,12 +189,10 @@ void run_reco(TString input = "",
if (sEvBuildRaw.EqualTo("Ideal", TString::ECaseCompare::kIgnoreCase)) {
FairTask* evBuildRaw = new CbmBuildEventsIdeal();
run->AddTask(evBuildRaw);
std::cout << "-I- " << myName << ": Added task " << evBuildRaw->GetName()
<< std::endl;
std::cout << "-I- " << myName << ": Added task " << evBuildRaw->GetName() << std::endl;
eventBased = kTRUE;
} //? Ideal raw event building
else if (sEvBuildRaw.EqualTo("Real2018",
TString::ECaseCompare::kIgnoreCase)) {
else if (sEvBuildRaw.EqualTo("Real2018", TString::ECaseCompare::kIgnoreCase)) {
CbmMcbm2018EventBuilder* evBuildRaw = new CbmMcbm2018EventBuilder();
evBuildRaw->SetFixedTimeWindow(500.);
......@@ -209,13 +201,11 @@ void run_reco(TString input = "",
evBuildRaw->SetUseBaseMuchDigi(kTRUE);
run->AddTask(evBuildRaw);
std::cout << "-I- " << myName << ": Added task " << evBuildRaw->GetName()
<< std::endl;
std::cout << "-I- " << myName << ": Added task " << evBuildRaw->GetName() << std::endl;
eventBased = kTRUE;
} else if (sEvBuildRaw.EqualTo("Real2019",
TString::ECaseCompare::kIgnoreCase)) {
CbmMcbm2019TimeWinEventBuilderTask* evBuildRaw =
new CbmMcbm2019TimeWinEventBuilderTask();
}
else if (sEvBuildRaw.EqualTo("Real2019", TString::ECaseCompare::kIgnoreCase)) {
CbmMcbm2019TimeWinEventBuilderTask* evBuildRaw = new CbmMcbm2019TimeWinEventBuilderTask();
//Choose between NoOverlap, MergeOverlap, AllowOverlap
evBuildRaw->SetEventOverlapMode(EOverlapMode::AllowOverlap);
......@@ -228,8 +218,7 @@ void run_reco(TString input = "",
if (!useTrd) evBuildRaw->RemoveDetector(kEventBuilderDetTrd);
if (!useSts) {
std::cerr << "-E- " << myName << ": Sts must be present for raw event "
<< "building using ``Real2019'' option. Terminating macro."
<< std::endl;
<< "building using ``Real2019'' option. Terminating macro." << std::endl;
return;
}
// Remove STS as it will be our reference
......@@ -247,12 +236,10 @@ void run_reco(TString input = "",
evBuildRaw->SetTriggerWindow(ECbmModuleId::kSts, -500, 500);
run->AddTask(evBuildRaw);
std::cout << "-I- " << myName << ": Added task " << evBuildRaw->GetName()
<< std::endl;
std::cout << "-I- " << myName << ": Added task " << evBuildRaw->GetName() << std::endl;
eventBased = kTRUE;
} else if (sEvBuildRaw.EqualTo("Real",
TString::ECaseCompare::kIgnoreCase)) {
}
else if (sEvBuildRaw.EqualTo("Real", TString::ECaseCompare::kIgnoreCase)) {
CbmTaskBuildRawEvents* evBuildRaw = new CbmTaskBuildRawEvents();
//Choose between NoOverlap, MergeOverlap, AllowOverlap
......@@ -266,8 +253,7 @@ void run_reco(TString input = "",
if (!useTrd) evBuildRaw->RemoveDetector(kRawEventBuilderDetTrd);
if (!useSts) {
std::cerr << "-E- " << myName << ": Sts must be present for raw event "
<< "building using ``Real2019'' option. Terminating macro."
<< std::endl;
<< "building using ``Real2019'' option. Terminating macro." << std::endl;
return;
}
// Remove STS as it will be our reference
......@@ -285,14 +271,12 @@ void run_reco(TString input = "",
evBuildRaw->SetTriggerWindow(ECbmModuleId::kSts, -500, 500);
run->AddTask(evBuildRaw);
std::cout << "-I- " << myName << ": Added task " << evBuildRaw->GetName()
<< std::endl;
std::cout << "-I- " << myName << ": Added task " << evBuildRaw->GetName() << std::endl;
eventBased = kTRUE;
} //? Real raw event building
else {
std::cerr << "-E- " << myName << ": Unknown option " << sEvBuildRaw
<< " for raw event building! Terminating macro execution."
<< std::endl;
<< " for raw event building! Terminating macro execution." << std::endl;
return;
}
} //? event-based reco
......@@ -309,16 +293,14 @@ void run_reco(TString input = "",
// ----- Local reconstruction in MVD ----------------------------------
if (useMvd) {
CbmMvdClusterfinder* mvdCluster =
new CbmMvdClusterfinder("MVD Cluster Finder", 0, 0);
CbmMvdClusterfinder* mvdCluster = new CbmMvdClusterfinder("MVD Cluster Finder", 0, 0);
run->AddTask(mvdCluster);
std::cout << "-I- : Added task " << mvdCluster->GetName() << std::endl;
CbmMvdHitfinder* mvdHit = new CbmMvdHitfinder("MVD Hit Finder", 0, 0);
mvdHit->UseClusterfinder(kTRUE);
run->AddTask(mvdHit);
std::cout << "-I- " << myName << ": Added task " << mvdHit->GetName()
<< std::endl;
std::cout << "-I- " << myName << ": Added task " << mvdHit->GetName() << std::endl;
}
// ------------------------------------------------------------------------
......@@ -328,8 +310,7 @@ void run_reco(TString input = "",
CbmRecoSts* stsReco = new CbmRecoSts(kCbmRecoTimeslice);
if (eventBased) stsReco->SetMode(kCbmRecoEvent);
run->AddTask(stsReco);
std::cout << "-I- " << myName << ": Added task " << stsReco->GetName()
<< std::endl;
std::cout << "-I- " << myName << ": Added task " << stsReco->GetName() << std::endl;
}
// ------------------------------------------------------------------------
......@@ -338,8 +319,7 @@ void run_reco(TString input = "",
if (useRich) {
CbmRichHitProducer* richHitProd = new CbmRichHitProducer();
run->AddTask(richHitProd);
std::cout << "-I- " << myName << ": Added task " << richHitProd->GetName()
<< std::endl;
std::cout << "-I- " << myName << ": Added task " << richHitProd->GetName() << std::endl;
}
// ------------------------------------------------------------------------
......@@ -358,8 +338,8 @@ void run_reco(TString input = "",
// --- Hit finder for GEMs
FairTask* muchReco = new CbmMuchFindHitsGem(parFile.Data(), muchFlag);
run->AddTask(muchReco);
std::cout << "-I- " << myName << ": Added task " << muchReco->GetName()
<< " with parameter file " << parFile << std::endl;
std::cout << "-I- " << myName << ": Added task " << muchReco->GetName() << " with parameter file " << parFile
<< std::endl;
}
// ------------------------------------------------------------------------
......@@ -369,34 +349,29 @@ void run_reco(TString input = "",
Double_t triggerThreshold = 0.5e-6; // SIS100
CbmTrdClusterFinder* trdCluster = new CbmTrdClusterFinder();
if (eventBased)
trdCluster->SetTimeBased(kFALSE);
if (eventBased) trdCluster->SetTimeBased(kFALSE);
else
trdCluster->SetTimeBased(kTRUE);
trdCluster->SetNeighbourEnable(true, false);
trdCluster->SetMinimumChargeTH(triggerThreshold);
trdCluster->SetRowMerger(true);
run->AddTask(trdCluster);
std::cout << "-I- " << myName << ": Added task " << trdCluster->GetName()
<< std::endl;
std::cout << "-I- " << myName << ": Added task " << trdCluster->GetName() << std::endl;
CbmTrdHitProducer* trdHit = new CbmTrdHitProducer();
run->AddTask(trdHit);
std::cout << "-I- " << myName << ": Added task " << trdHit->GetName()
<< std::endl;
std::cout << "-I- " << myName << ": Added task " << trdHit->GetName() << std::endl;
}
// ------------------------------------------------------------------------
// ----- Local reconstruction in TOF ----------------------------------
if (useTof) {
CbmTofSimpClusterizer* tofCluster =
new CbmTofSimpClusterizer("TOF Simple Clusterizer", 0);
CbmTofSimpClusterizer* tofCluster = new CbmTofSimpClusterizer("TOF Simple Clusterizer", 0);
tofCluster->SetOutputBranchPersistent("TofHit", kTRUE);
tofCluster->SetOutputBranchPersistent("TofDigiMatch", kTRUE);
run->AddTask(tofCluster);
std::cout << "-I- " << myName << ": Added task " << tofCluster->GetName()
<< std::endl;
std::cout << "-I- " << myName << ": Added task " << tofCluster->GetName() << std::endl;
}
// ------------------------------------------------------------------------
......@@ -405,8 +380,7 @@ void run_reco(TString input = "",
if (usePsd) {
CbmPsdHitProducer* psdHit = new CbmPsdHitProducer();
run->AddTask(psdHit);
std::cout << "-I- " << myName << ": Added task " << psdHit->GetName()
<< std::endl;
std::cout << "-I- " << myName << ": Added task " << psdHit->GetName() << std::endl;
}
// ------------------------------------------------------------------------
......@@ -433,21 +407,18 @@ void run_reco(TString input = "",
l1->SetStsMaterialBudgetFileName(parFile.Data());
}
run->AddTask(l1);
std::cout << "-I- " << myName << ": Added task " << l1->GetName()
<< std::endl;
std::cout << "-I- " << myName << ": Added task " << l1->GetName() << std::endl;
CbmStsTrackFinder* stsTrackFinder = new CbmL1StsTrackFinder();
if (eventBased) {
FairTask* stsFindTracks =
new CbmStsFindTracksEvents(stsTrackFinder, useMvd);
FairTask* stsFindTracks = new CbmStsFindTracksEvents(stsTrackFinder, useMvd);
run->AddTask(stsFindTracks);
std::cout << "-I- " << myName << ": Added task "
<< stsFindTracks->GetName() << std::endl;
} else {
std::cout << "-I- " << myName << ": Added task " << stsFindTracks->GetName() << std::endl;
}
else {
FairTask* stsFindTracks = new CbmStsFindTracks(0, stsTrackFinder, useMvd);
run->AddTask(stsFindTracks);
std::cout << "-I- " << myName << ": Added task "
<< stsFindTracks->GetName() << std::endl;
std::cout << "-I- " << myName << ": Added task " << stsFindTracks->GetName() << std::endl;
}
}
// ------------------------------------------------------------------------
......@@ -465,8 +436,7 @@ void run_reco(TString input = "",
CbmPrimaryVertexFinder* pvFinder = new CbmPVFinderKF();
CbmFindPrimaryVertex* findVertex = new CbmFindPrimaryVertex(pvFinder);
run->AddTask(findVertex);
std::cout << "-I- " << myName << ": Added task " << findVertex->GetName()
<< std::endl;
std::cout << "-I- " << myName << ": Added task " << findVertex->GetName() << std::endl;
// ----------------------------------------------------------------------
......@@ -549,8 +519,7 @@ void run_reco(TString input = "",
std::cout << "Macro finished successfully." << std::endl;
std::cout << "Output file is " << outFile << std::endl;
std::cout << "Parameter file is " << parFile << std::endl;
std::cout << "Real time " << rtime << " s, CPU time " << ctime << " s"
<< std::endl;
std::cout << "Real time " << rtime << " s, CPU time " << ctime << " s" << std::endl;
FairSystemInfo sysInfo;
Float_t maxMemory = sysInfo.GetMaxMemory();
std::cout << "<DartMeasurement name=\"MaxMemory\" type=\"numeric/double\">";
......
......@@ -23,14 +23,15 @@
/// FAIRSOFT headers (geant, boost, ...)
/// C/C++ headers
#include <tuple>
#include <boost/any.hpp>
#include <array>
#include <map>
#include <set>
#include <tuple>
#include <vector>
#include <boost/any.hpp>
class TimesliceMetaData;
class CbmEvent;
class TClonesArray;
......@@ -39,26 +40,26 @@ class TH2;
class TNamed;
class TCanvas;
enum class EOverlapModeRaw { NoOverlap, MergeOverlap, AllowOverlap };
enum class EOverlapModeRaw
{
NoOverlap,
MergeOverlap,
AllowOverlap
};
class RawEventBuilderDetector {
public:
RawEventBuilderDetector() { ; }
RawEventBuilderDetector(ECbmModuleId detIdIn,
ECbmDataType dataTypeIn,
std::string sNameIn) {
RawEventBuilderDetector(ECbmModuleId detIdIn, ECbmDataType dataTypeIn, std::string sNameIn)
{
detId = detIdIn;
dataType = dataTypeIn;
sName = sNameIn;
}
RawEventBuilderDetector(ECbmModuleId detIdIn,
ECbmDataType dataTypeIn,
std::string sNameIn,
UInt_t uTriggerMinDigisIn,
Int_t iTriggerMaxDigisIn,
Double_t fdTimeWinBegIn,
Double_t fdTimeWinEndIn)
: RawEventBuilderDetector(detIdIn, dataTypeIn, sNameIn) {
RawEventBuilderDetector(ECbmModuleId detIdIn, ECbmDataType dataTypeIn, std::string sNameIn, UInt_t uTriggerMinDigisIn,
Int_t iTriggerMaxDigisIn, Double_t fdTimeWinBegIn, Double_t fdTimeWinEndIn)
: RawEventBuilderDetector(detIdIn, dataTypeIn, sNameIn)
{
fuTriggerMinDigis = uTriggerMinDigisIn;
fiTriggerMaxDigis = iTriggerMaxDigisIn;
......@@ -66,12 +67,8 @@ public:
fdTimeWinEnd = fdTimeWinEndIn;
}
bool operator==(const RawEventBuilderDetector& other) const {
return (other.detId == this->detId);
}
bool operator!=(const RawEventBuilderDetector& other) const {
return (other.detId != this->detId);
}
bool operator==(const RawEventBuilderDetector& other) const { return (other.detId == this->detId); }
bool operator!=(const RawEventBuilderDetector& other) const { return (other.detId != this->detId); }
Double_t GetTimeWinRange() { return fdTimeWinEnd - fdTimeWinBeg; }
......@@ -107,8 +104,7 @@ static const RawEventBuilderDetector kRawEventBuilderDetPsd =
RawEventBuilderDetector(ECbmModuleId::kPsd, ECbmDataType::kPsdDigi, "Psd");
static const RawEventBuilderDetector kRawEventBuilderDetT0 =
RawEventBuilderDetector(ECbmModuleId::kT0, ECbmDataType::kT0Digi, "T0");
static const RawEventBuilderDetector kRawEventBuilderDetUndef =
RawEventBuilderDetector();
static const RawEventBuilderDetector kRawEventBuilderDetUndef = RawEventBuilderDetector();
class CbmAlgoBuildRawEvents {
......@@ -134,20 +130,11 @@ public:
void SetFillHistos(Bool_t var) { fbFillHistos = var; }
void ResetHistograms(Bool_t bResetTime = kTRUE);
void SetReferenceDetector(ECbmModuleId refDet,
ECbmDataType dataTypeIn,
std::string sNameIn,
UInt_t uTriggerMinDigisIn = 0,
Int_t iTriggerMaxDigisIn = -1,
Double_t fdTimeWinBegIn = -100,
Double_t fdTimeWinEndIn = 100);
void AddDetector(ECbmModuleId selDet,
ECbmDataType dataTypeIn,
std::string sNameIn,
UInt_t uTriggerMinDigisIn = 0,
Int_t iTriggerMaxDigisIn = -1,
Double_t fdTimeWinBegIn = -100,
Double_t fdTimeWinEndIn = 100);
void SetReferenceDetector(ECbmModuleId refDet, ECbmDataType dataTypeIn, std::string sNameIn,
UInt_t uTriggerMinDigisIn = 0, Int_t iTriggerMaxDigisIn = -1,
Double_t fdTimeWinBegIn = -100, Double_t fdTimeWinEndIn = 100);
void AddDetector(ECbmModuleId selDet, ECbmDataType dataTypeIn, std::string sNameIn, UInt_t uTriggerMinDigisIn = 0,
Int_t iTriggerMaxDigisIn = -1, Double_t fdTimeWinBegIn = -100, Double_t fdTimeWinEndIn = 100);
void SetReferenceDetector(RawEventBuilderDetector refDetIn);
void AddDetector(RawEventBuilderDetector selDet);
......@@ -156,12 +143,10 @@ public:
void SetTriggerMinNumber(ECbmModuleId selDet, UInt_t uVal);
void SetTriggerMaxNumber(ECbmModuleId selDet, Int_t iVal);
void
SetTriggerWindow(ECbmModuleId selDet, Double_t dWinBeg, Double_t dWinEnd);
void SetTriggerWindow(ECbmModuleId selDet, Double_t dWinBeg, Double_t dWinEnd);
void SetTsParameters(Double_t dTsStartTime,
Double_t dTsLength,
Double_t dTsOverLength) {
void SetTsParameters(Double_t dTsStartTime, Double_t dTsLength, Double_t dTsOverLength)
{
fdTsStartTime = dTsStartTime;
fdTsLength = dTsLength;
fdTsOverLength = dTsOverLength;
......@@ -169,46 +154,32 @@ public:
/// Control flags
void SetEventOverlapMode(EOverlapModeRaw mode) { fOverMode = mode; }
void SetIgnoreTsOverlap(Bool_t bFlagIn = kTRUE) {
fbIgnoreTsOverlap = bFlagIn;
}
void SetIgnoreTsOverlap(Bool_t bFlagIn = kTRUE) { fbIgnoreTsOverlap = bFlagIn; }
void ChangeMuchBeamtimeDigiFlag(Bool_t bFlagIn = kFALSE) {
fbUseMuchBeamtimeDigi = bFlagIn;
}
void ChangeMuchBeamtimeDigiFlag(Bool_t bFlagIn = kFALSE) { fbUseMuchBeamtimeDigi = bFlagIn; }
/// For monitor algos
void AddHistoToVector(TNamed* pointer, std::string sFolder = "") {
fvpAllHistoPointers.push_back(
std::pair<TNamed*, std::string>(pointer, sFolder));
}
std::vector<std::pair<TNamed*, std::string>> GetHistoVector() {
return fvpAllHistoPointers;
void AddHistoToVector(TNamed* pointer, std::string sFolder = "")
{
fvpAllHistoPointers.push_back(std::pair<TNamed*, std::string>(pointer, sFolder));
}
void AddCanvasToVector(TCanvas* pointer, std::string sFolder = "") {
fvpAllCanvasPointers.push_back(
std::pair<TCanvas*, std::string>(pointer, sFolder));
}
std::vector<std::pair<TCanvas*, std::string>> GetCanvasVector() {
return fvpAllCanvasPointers;
std::vector<std::pair<TNamed*, std::string>> GetHistoVector() { return fvpAllHistoPointers; }
void AddCanvasToVector(TCanvas* pointer, std::string sFolder = "")
{
fvpAllCanvasPointers.push_back(std::pair<TCanvas*, std::string>(pointer, sFolder));
}
std::vector<std::pair<TCanvas*, std::string>> GetCanvasVector() { return fvpAllCanvasPointers; }
/// Set digi containers
void SetT0Digis(const std::vector<CbmTofDigi>* T0DigiVec) {
fT0DigiVec = T0DigiVec;
}
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;
}
void SetMuchDigis(std::vector<CbmMuchDigi>* MuchDigis) { fMuchDigis = MuchDigis; }
void SetTrdDigis(std::vector<CbmTrdDigi>* TrdDigis) { fTrdDigis = TrdDigis; }
void SetTofDigis(std::vector<CbmTofDigi>* TofDigis) { fTofDigis = TofDigis; }
void SetRichDigis(std::vector<CbmRichDigi>* RichDigis) {
fRichDigis = RichDigis;
}
void SetRichDigis(std::vector<CbmRichDigi>* RichDigis) { fRichDigis = RichDigis; }
void SetPsdDigis(std::vector<CbmPsdDigi>* PsdDigis) { fPsdDigis = PsdDigis; }
void
SetMuchBeamTimeDigis(std::vector<CbmMuchBeamTimeDigi>* MuchBeamTimeDigis) {
void SetMuchBeamTimeDigis(std::vector<CbmMuchBeamTimeDigi>* MuchBeamTimeDigis)
{
fMuchBeamTimeDigis = MuchBeamTimeDigis;
}
......@@ -243,27 +214,20 @@ private:
/// User parameters
/// Control flags
Bool_t fbIgnoreTsOverlap = kFALSE; //! Ignore data in Overlap part of the TS
Bool_t fbFillHistos {kTRUE}; //! Switch ON/OFF filling of histograms
Bool_t fbIgnoreTsOverlap = kFALSE; //! Ignore data in Overlap part of the TS
Bool_t fbFillHistos {kTRUE}; //! Switch ON/OFF filling of histograms
Bool_t fbUseMuchBeamtimeDigi = kTRUE; //! Switch between MUCH digi classes
/// Event building mode and detectors selection
EOverlapModeRaw fOverMode {EOverlapModeRaw::AllowOverlap};
RawEventBuilderDetector fRefDet =
RawEventBuilderDetector(ECbmModuleId::kT0, ECbmDataType::kT0Digi, "T0");
RawEventBuilderDetector fRefDet = RawEventBuilderDetector(ECbmModuleId::kT0, ECbmDataType::kT0Digi, "T0");
std::vector<RawEventBuilderDetector> fvDets = {
RawEventBuilderDetector(ECbmModuleId::kSts, ECbmDataType::kStsDigi, "kSts"),
RawEventBuilderDetector(ECbmModuleId::kMuch,
ECbmDataType::kMuchDigi,
"kMuch"),
RawEventBuilderDetector(ECbmModuleId::kMuch, ECbmDataType::kMuchDigi, "kMuch"),
RawEventBuilderDetector(ECbmModuleId::kTrd, ECbmDataType::kTrdDigi, "kTrd"),
RawEventBuilderDetector(ECbmModuleId::kTof, ECbmDataType::kTofDigi, "kTof"),
RawEventBuilderDetector(ECbmModuleId::kRich,
ECbmDataType::kRichDigi,
"kRich"),
RawEventBuilderDetector(ECbmModuleId::kPsd,
ECbmDataType::kPsdDigi,
"kPsd")};
RawEventBuilderDetector(ECbmModuleId::kRich, ECbmDataType::kRichDigi, "kRich"),
RawEventBuilderDetector(ECbmModuleId::kPsd, ECbmDataType::kPsdDigi, "kPsd")};
Double_t fdEarliestTimeWinBeg = kdDefaultTimeWinBeg;
Double_t fdLatestTimeWinEnd = kdDefaultTimeWinEnd;
......@@ -295,9 +259,8 @@ private:
const Digi* GetDigi(UInt_t uDigi);
/// Data ouptut
CbmEvent* fCurrentEvent =
nullptr; //! pointer to the event which is currently build
std::vector<CbmEvent*> fEventVector = {}; //! vector with all created events
CbmEvent* fCurrentEvent = nullptr; //! pointer to the event which is currently build
std::vector<CbmEvent*> fEventVector = {}; //! vector with all created events
/// Monitoring histograms
/// => Pointers should be filled with TH1*, TH2*, TProfile*, ...
......@@ -315,23 +278,19 @@ private:
std::vector<std::pair<TCanvas*, std::string>>
fvpAllCanvasPointers; //! Vector of pointers to canvases + optional folder name
TH1* fhEventTime = nullptr; //! histogram with the seed time of the events
TH1* fhEventDt =
nullptr; //! histogram with the interval in seed time of consecutive events
TH1* fhEventSize =
nullptr; //! histogram with the nb of all digis in the event
TH2* fhNbDigiPerEvtTime =
nullptr; //! histogram with the nb of all digis per event vs seed time of the events
TH1* fhEventTime = nullptr; //! histogram with the seed time of the events
TH1* fhEventDt = nullptr; //! histogram with the interval in seed time of consecutive events
TH1* fhEventSize = nullptr; //! histogram with the nb of all digis in the event
TH2* fhNbDigiPerEvtTime = nullptr; //! histogram with the nb of all digis per event vs seed time of the events
std::vector<TH2*> fvhNbDigiPerEvtTimeDet =
{}; //! histograms with the nb of digis in each detector per event vs seed time of the events
/// Internal state variables
UInt_t fuCurEv = 0; //! Event Counter
UInt_t fuErrors = 0; //! Error Counter
UInt_t fuNrTs = 0; //! Timeslice Counter
Double_t fdPrevEvtTime = 0.; //! Save previous time information
Double_t fdPrevEvtEndTime =
0.; //! Save previous event last digi time information
UInt_t fuCurEv = 0; //! Event Counter
UInt_t fuErrors = 0; //! Error Counter
UInt_t fuNrTs = 0; //! Timeslice Counter
Double_t fdPrevEvtTime = 0.; //! Save previous time information
Double_t fdPrevEvtEndTime = 0.; //! Save previous event last digi time information
ClassDefNV(CbmAlgoBuildRawEvents, 1);
};
......
......@@ -11,10 +11,13 @@
#include "CbmMatch.h"
#include "CbmModuleList.h"
#include "CbmStsDigi.h"
#include "FairLogger.h"
#include "FairRootManager.h"
#include "TClonesArray.h"
#include "TStopwatch.h"
#include <cassert>
#include <iomanip>
#include <iostream>
......@@ -24,8 +27,7 @@ using namespace std;
// ===== Constructor =====================================================
CbmBuildEventsQA::CbmBuildEventsQA()
: FairTask("BuildEventsQA"), fEvents(NULL), fNofEntries(0) {}
CbmBuildEventsQA::CbmBuildEventsQA() : FairTask("BuildEventsQA"), fEvents(NULL), fNofEntries(0) {}
// ===========================================================================
......@@ -35,7 +37,8 @@ CbmBuildEventsQA::~CbmBuildEventsQA() {}
// ===== Task initialisation =============================================
InitStatus CbmBuildEventsQA::Init() {
InitStatus CbmBuildEventsQA::Init()
{
// --- Get FairRootManager instance
FairRootManager* ioman = FairRootManager::Instance();
......@@ -53,12 +56,9 @@ InitStatus CbmBuildEventsQA::Init() {
fDigiMan->Init();
// --- Check input data
for (ECbmModuleId system = ECbmModuleId::kMvd;
system < ECbmModuleId::kNofSystems;
++system) {
for (ECbmModuleId system = ECbmModuleId::kMvd; system < ECbmModuleId::kNofSystems; ++system) {
if (fDigiMan->IsMatchPresent(system)) {