Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions EventFiltering/Zorro.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class Zorro
void setBCtolerance(int tolerance) { mBCtolerance = tolerance; }

ZorroSummary* getZorroSummary() { return &mZorroSummary; }

private:
ZorroSummary mZorroSummary{"ZorroSummary", "ZorroSummary"};

Expand Down
9 changes: 6 additions & 3 deletions EventFiltering/ZorroSummary.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@

#include "TCollection.h"

void ZorroSummary::Copy(TObject& c) const {
void ZorroSummary::Copy(TObject& c) const
{
static_cast<ZorroSummary&>(c) = *this;
}

Long64_t ZorroSummary::Merge(TCollection* list) {
Long64_t ZorroSummary::Merge(TCollection* list)
{
if (!list) {
return 0;
}
Expand Down Expand Up @@ -49,7 +51,8 @@ Long64_t ZorroSummary::Merge(TCollection* list) {
return n;
}

double ZorroSummary::getNormalisationFactor(int toiId) const {
double ZorroSummary::getNormalisationFactor(int toiId) const
{
double totalTOI{0.}, totalTVX{0.};
ULong64_t totalAnalysedTOI{0};
for (const auto& [runNumber, toiCounters] : mTOIcounters) {
Expand Down
20 changes: 12 additions & 8 deletions EventFiltering/ZorroSummary.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,22 @@
#include <unordered_map>
#include <vector>

class ZorroSummary : public TNamed {
public:
class ZorroSummary : public TNamed
{
public:
ZorroSummary() = default;
ZorroSummary(const char* name, const char* objTitle) : TNamed(name, objTitle) {}
virtual ~ZorroSummary() = default; // NOLINT: Making this override breaks compilation for unknown reason
virtual ~ZorroSummary() = default; // NOLINT: Making this override breaks compilation for unknown reason
virtual void Copy(TObject& c) const; // NOLINT: Making this override breaks compilation for unknown reason
virtual Long64_t Merge(TCollection* list);

void setupTOIs(int ntois, const std::string& toinames) {
void setupTOIs(int ntois, const std::string& toinames)
{
mNtois = ntois;
mTOInames = toinames;
}
void setupRun(int runNumber, double tvxCountes, const std::vector<double>& toiCounters) {
void setupRun(int runNumber, double tvxCountes, const std::vector<double>& toiCounters)
{
if (mRunNumber == runNumber) {
return;
}
Expand All @@ -44,7 +47,8 @@ class ZorroSummary : public TNamed {
mCurrentAnalysedTOIcounters = &mAnalysedTOIcounters[runNumber];
}
double getNormalisationFactor(int toiId) const;
void increaseTOIcounter(int runNumber, int toiId) {
void increaseTOIcounter(int runNumber, int toiId)
{
if (runNumber != mRunNumber) {
return;
}
Expand All @@ -56,8 +60,8 @@ class ZorroSummary : public TNamed {
const auto& getTVXcounters() const { return mTVXcounters; }
const auto& getAnalysedTOIcounters() const { return mAnalysedTOIcounters; }

private:
int mRunNumber = 0; //! Run currently being analysed
private:
int mRunNumber = 0; //! Run currently being analysed
std::vector<ULong64_t>* mCurrentAnalysedTOIcounters = nullptr; //! Analysed TOI counters for the current run

int mNtois = 0;
Expand Down