Project
Loading...
Searching...
No Matches
QualityControlFlagCollection.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
12#ifndef O2_QUALITYCONTROL_QCFLAGCOLLECTION_H
13#define O2_QUALITYCONTROL_QCFLAGCOLLECTION_H
17
18// System includes
19#include <iosfwd>
20
21// ROOT includes
22#include "Rtypes.h"
23
24// O2 includes
27
28// STL
29#include <set>
30
31namespace o2
32{
33namespace quality_control
34{
35
39{
40 public:
41 using collection_t = std::set<QualityControlFlag>;
44
45 explicit QualityControlFlagCollection(std::string name, std::string detector = "TST", RangeInterval validityRange = {},
46 int runNumber = 0, std::string periodName = "Invalid", std::string passName = "Invalid",
47 std::string provenance = "qc");
48
50 void insert(const QualityControlFlag&);
51
52 size_t size() const;
53
54 // moves all non-repeating QualityControlFlags from other to this
56 // add all non-repeating QualityControlFlags from other to this.
58
59 collection_t::const_iterator begin() const;
60 collection_t::const_iterator end() const;
61
62 const std::string& getName() const;
63 const std::string& getDetector() const;
64 int getRunNumber() const;
65 const std::string& getPeriodName() const;
66 const std::string& getPassName() const;
67 const std::string& getProvenance() const;
68
69 time_type getStart() const { return mValidityRange.getMin(); }
70 time_type getEnd() const { return mValidityRange.getMax(); }
71 RangeInterval& getInterval() { return mValidityRange; }
72
73 void setStart(time_type start) { mValidityRange.setMin(start); }
74 void setEnd(time_type end) { mValidityRange.setMax(end); }
75 void setInterval(RangeInterval interval) { mValidityRange = interval; }
76
78 void streamTo(std::ostream& output) const;
80 void streamFrom(std::istream& input);
81
83 friend std::ostream& operator<<(std::ostream& output, const QualityControlFlagCollection& data);
84
85 private:
86 std::string mDetID; // three letter detector code
87 std::string mName; // some description of the collection, e.g. "Raw data checks", "QA Expert masks"
88 // with std::set we can sort the flags in time and have merge() for granted.
89 collection_t mQualityControlFlags;
90 RangeInterval mValidityRange; // we need a validity range to e.g. state that there are no TRFs for given time interval
91 int mRunNumber;
92 std::string mPeriodName;
93 std::string mPassName;
94 std::string mProvenance;
95
96 ClassDefNV(QualityControlFlagCollection, 1);
97};
98
99} // namespace quality_control
100} // namespace o2
101
102#endif // O2_QUALITYCONTROL_QCFLAGCOLLECTION_H
Class to represent an interval and some operations over it.
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char Directory with events to Events directory is and not inside events Show standalone event Run event generator maximum time bin of continuous for triggered for automatic continuous for automatic continuous triggered uint64_t
void output(const std::map< std::string, ChannelStat > &channels)
Definition rawdump.cxx:197
Class to define a flag type with a time range and comments.
void setMax(T v) GPUnoexcept()
Definition Bracket.h:134
void setMin(T v) GPUnoexcept()
Definition Bracket.h:140
void streamTo(std::ostream &output) const
write data to ostream
friend std::ostream & operator<<(std::ostream &output, const QualityControlFlagCollection &data)
overloading output stream operator
o2::math_utils::detail::Bracket< time_type > RangeInterval
void streamFrom(std::istream &input)
Read data from instream.
GLuint GLuint end
Definition glcorearb.h:469
GLuint const GLchar * name
Definition glcorearb.h:781
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
VectorOfTObjectPtrs other