diff --git a/core/base/CbmDaq.cxx b/core/base/CbmDaq.cxx index 9b02abaa8435e66390ddb81a496fde2185b3ae78..e9efc440bc534b84055bc80c006ce897af37e0a5 100644 --- a/core/base/CbmDaq.cxx +++ b/core/base/CbmDaq.cxx @@ -235,7 +235,8 @@ void CbmDaq::Exec(Option_t*) ULong64_t CbmDaq::FillTimeSlice(Bool_t timeLimit, Double_t tMax) { - if (timeLimit) LOG(debug) << GetName() << ": Fill time slice up to t = " << tMax << " ns"; + if (timeLimit) + LOG(debug) << GetName() << ": Fill time slice up to t = " << tMax << " ns"; else LOG(debug) << GetName() << ": Fill time slice"; LOG(debug) << GetName() << " " << GetBufferStatus(kTRUE); @@ -247,7 +248,8 @@ ULong64_t CbmDaq::FillTimeSlice(Bool_t timeLimit, Double_t tMax) ULong64_t nDataAll = 0; ULong64_t nData = 0; for (auto digitizer : fDigitizers) { - if (timeLimit) nData = digitizer.second->FillTimeSlice(fTimeSlice, tMax); + if (timeLimit) + nData = digitizer.second->FillTimeSlice(fTimeSlice, tMax); else nData = digitizer.second->FillTimeSlice(fTimeSlice); LOG(debug) << GetName() << ": " << CbmModuleList::GetModuleNameCaps(digitizer.first) << " " @@ -366,7 +368,8 @@ Double_t CbmDaq::GetBufferTimeFirst() const Double_t tMin = -1.; for (auto& digitizer : fDigitizers) { Double_t test = digitizer.second->GetDaqBufferTimeFirst(); - if (tMin < 0.) tMin = test; + if (tMin < 0.) + tMin = test; else tMin = (tMin < test ? tMin : test); } @@ -381,7 +384,8 @@ Double_t CbmDaq::GetBufferTimeLast() const Double_t tMax = -1.; for (auto& digitizer : fDigitizers) { Double_t test = digitizer.second->GetDaqBufferTimeLast(); - if (tMax < 0.) tMax = test; + if (tMax < 0.) + tMax = test; else tMax = (tMax > test ? tMax : test); } diff --git a/core/base/CbmDaq.h b/core/base/CbmDaq.h index 7fb9248232f08f2344828e7e209187a24967647d..52c62c1c49b16b3bc91123c8bae6d9922ef5b96d 100644 --- a/core/base/CbmDaq.h +++ b/core/base/CbmDaq.h @@ -43,7 +43,7 @@ class TClonesArray; **/ class CbmDaq : public FairTask { -public: + public: /** @brief Constructor ** @param eventMode If true, run in event-by-event mode ** @@ -92,7 +92,10 @@ public: ** The current default of 2,000 ns corresponds to the STS with ** dead time of 800 ns and time resolution of 5 ns. **/ - void SetLatency(Double_t time) { if (time > fLatency) fLatency = time; } + void SetLatency(Double_t time) + { + if (time > fLatency) fLatency = time; + } /** @brief Set the digitizer for a given system @@ -116,7 +119,7 @@ public: void StoreAllTimeSlices(Bool_t choice = kTRUE) { fStoreEmptySlices = choice; } -private: + private: Bool_t fIsEventByEvent; ///< Flag for event-by-event mode Double_t fTimeSliceLength; ///< Time-slice length [ns] Double_t fLatency = 5000.; ///< Maximal time disorder of input data [ns] diff --git a/core/base/CbmDigitize.h b/core/base/CbmDigitize.h index 4a4db9f9f41f2a7ed15186eecf0c513a82226b2a..aac1de4dd49e7a643f4639fc7659751daf66c3e1 100644 --- a/core/base/CbmDigitize.h +++ b/core/base/CbmDigitize.h @@ -43,23 +43,23 @@ template<class Digi> class CbmDigitize : public CbmDigitizeBase { -public: + public: /** @brief Short for data to be handled (pair of digi and match) **/ typedef std::pair<std::unique_ptr<Digi>, std::unique_ptr<CbmMatch>> Data; /** @brief Default constructor **/ - CbmDigitize() {}; + CbmDigitize(){}; /** @brief Constructor with name ** @param name Task name **/ - CbmDigitize(const char* name, const char* branchName = "") : CbmDigitizeBase(name), fBranchName(branchName) {}; + CbmDigitize(const char* name, const char* branchName = "") : CbmDigitizeBase(name), fBranchName(branchName){}; /** @brief Destructor **/ - virtual ~CbmDigitize() {}; + virtual ~CbmDigitize(){}; // -------------------------------------------------------------------------- @@ -89,7 +89,7 @@ public: ** value is 0. which does not change the default value set in ** CbmDaq. **/ - Double_t GetLatency() const { return 0.;} + Double_t GetLatency() const { return 0.; } // -------------------------------------------------------------------------- /** @brief Clear the output arrays **/ @@ -244,13 +244,13 @@ public: } // -------------------------------------------------------------------------- -private: + private: TString fBranchName = ""; ///< Output branch name std::vector<Digi>* fDigis = nullptr; //! Output array (Digi) std::vector<CbmMatch>* fMatches = nullptr; //! Output array (CbmMatch) -private: + private: /** DAQ buffer. Here, the digis and matches are buffered until they are ** filled into the time slice output (ROOT branch). ** The map key is the digi time. **/ @@ -325,7 +325,8 @@ private: } // Register datum to the time slice header - if (fCreateMatches) timeSlice->RegisterData(GetSystemId(), it->first, fMatches->at(fMatches->size() - 1)); + if (fCreateMatches) + timeSlice->RegisterData(GetSystemId(), it->first, fMatches->at(fMatches->size() - 1)); else timeSlice->RegisterData(GetSystemId(), it->first); diff --git a/core/base/CbmDigitizeBase.h b/core/base/CbmDigitizeBase.h index 172dd6e5a2ac054b7ebcc22181ff041a6f1da76c..a6610f631bb7baa710991f0a5aa74f821b8d17a3 100644 --- a/core/base/CbmDigitizeBase.h +++ b/core/base/CbmDigitizeBase.h @@ -32,7 +32,7 @@ class CbmTimeSlice; **/ class CbmDigitizeBase : public FairTask { -public: + public: /** @brief Constructor **/ CbmDigitizeBase(); @@ -181,7 +181,7 @@ public: void SetRunStartTime(Double_t time) { fRunStartTime = time; } -protected: + protected: Bool_t fEventMode; /// Flag for event-by-event mode Bool_t fProduceNoise; /// Flag for production of inter-event noise Bool_t fCreateMatches; /// Flag for creation of links to MC @@ -203,7 +203,7 @@ protected: virtual std::pair<size_t, bool> ReadInactiveChannels(); -private: + private: /** @brief Copy constructor forbidden **/ CbmDigitizeBase(const CbmDigitizeBase&) = delete; diff --git a/sim/response/base/CbmDigitization.cxx b/sim/response/base/CbmDigitization.cxx index 7c54d1fcf55a60f3814153ed7bba532c99cddc54..be8a9b99a9b9f370553fa835364f33e6200d188e 100644 --- a/sim/response/base/CbmDigitization.cxx +++ b/sim/response/base/CbmDigitization.cxx @@ -357,7 +357,8 @@ void CbmDigitization::Run(Int_t event1, Int_t event2) if (fGenerateRunInfo) LOG(info) << fName << ": Run info will be generated."; // --- Create DAQ - if (fMode == Mode::EventByEvent) fDaq = new CbmDaq(kTRUE); + if (fMode == Mode::EventByEvent) + fDaq = new CbmDaq(kTRUE); else fDaq = new CbmDaq(fTimeSliceLength); @@ -440,13 +441,15 @@ void CbmDigitization::Run(Int_t event1, Int_t event2) LOG(info) << "==================================================="; LOG(info) << fName << ": Starting run..."; if (event2 < 0) { - if (event1 >= 0) run->Run(0, event1 - 1); // Run event1 events + if (event1 >= 0) + run->Run(0, event1 - 1); // Run event1 events else run->Run(); // Run all events in input } else { if (event1 < 0) event1 = 0; - if (event1 <= event2) run->Run(event1, event2); // Run from event1 to event2 + if (event1 <= event2) + run->Run(event1, event2); // Run from event1 to event2 else run->Run(event1, event1); // Run only event1 }