RangeSetInfo.h
Go to the documentation of this file.
1 #ifndef art_Framework_IO_Root_detail_RangeSetInfo_h
2 #define art_Framework_IO_Root_detail_RangeSetInfo_h
3 
6 
7 #include <vector>
8 
9 namespace art {
10  namespace detail {
11 
12  // The RangeSetInfo struct is an intermediary structure between
13  // querying the SQLite database and creating the RangeSet. It
14  // allows one to combine all the necessary information for a
15  // RangeSet, without having to call 'merge' multiple times, which,
16  // under the covers, calls collapse, which can be expensive. By
17  // collecting RangeSetInfo objects, and calling the 'update'
18  // function, the appropriate RangeSet information can be collected
19  // and then provided to the RangeSet c'tor, where a collapse is
20  // done only once.
21 
22  struct RangeSetInfo {
23 
24  explicit RangeSetInfo(RunNumber_t const r, std::vector<EventRange>&& ers);
25 
26  bool is_invalid() const;
27  static RangeSetInfo
29  {
30  return RangeSetInfo{};
31  }
32  void update(RangeSetInfo&& rsi, bool compact);
33 
35  std::vector<EventRange> ranges{};
36 
37  private:
38  RangeSetInfo() = default;
39  };
40  }
41 }
42 
43 #endif /* art_Framework_IO_Root_detail_RangeSetInfo_h */
44 
45 // Local variables:
46 // mode: c++
47 // End:
std::vector< EventRange > ranges
Definition: RangeSetInfo.h:35
static RangeSetInfo invalid()
Definition: RangeSetInfo.h:28
Definition: run.py:1
void update(RangeSetInfo &&rsi, bool compact)
TRandom3 r(0)
Service to store calibration data products (CDP) in the SQLite3 metadatabase of a file...
Definition: FillParentInfo.h:8
IDNumber_t< Level::Run > RunNumber_t
Definition: IDNumber.h:119