CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends
PPSTimingCalibrationLUT Class Reference

#include <PPSTimingCalibrationLUT.h>

Classes

struct  Key
 Helper structure for indexing calibration data. More...
 

Public Types

using BinMap = std::map< Key, std::vector< double > >
 

Public Member Functions

std::vector< double > bins (int key1, int key2, int key3, int key4) const
 
 PPSTimingCalibrationLUT ()=default
 
 PPSTimingCalibrationLUT (const BinMap &binMap)
 
 ~PPSTimingCalibrationLUT ()=default
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

BinMap binMap_
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 
std::ostream & operator<< (std::ostream &os, const PPSTimingCalibrationLUT &data)
 

Detailed Description

Definition at line 19 of file PPSTimingCalibrationLUT.h.

Member Typedef Documentation

◆ BinMap

using PPSTimingCalibrationLUT::BinMap = std::map<Key, std::vector<double> >

Definition at line 33 of file PPSTimingCalibrationLUT.h.

Constructor & Destructor Documentation

◆ PPSTimingCalibrationLUT() [1/2]

PPSTimingCalibrationLUT::PPSTimingCalibrationLUT ( )
default

◆ PPSTimingCalibrationLUT() [2/2]

PPSTimingCalibrationLUT::PPSTimingCalibrationLUT ( const BinMap binMap)
inline

Definition at line 36 of file PPSTimingCalibrationLUT.h.

36 : binMap_(binMap) {}

◆ ~PPSTimingCalibrationLUT()

PPSTimingCalibrationLUT::~PPSTimingCalibrationLUT ( )
default

Member Function Documentation

◆ bins()

std::vector< double > PPSTimingCalibrationLUT::bins ( int  key1,
int  key2,
int  key3,
int  key4 
) const

Definition at line 34 of file PPSTimingCalibrationLUT.cc.

References binMap_, crabWrapper::key, and MillePedeFileConverter_cfg::out.

Referenced by CTPPSDiamondRecHitProducerAlgorithm::build().

34  {
35  Key key{key1, key2, key3, key4};
36  auto out = binMap_.find(key);
37  if (out == binMap_.end())
38  return {};
39  return out->second;
40 }

◆ serialize()

template<class Archive >
void PPSTimingCalibrationLUT::serialize ( Archive &  ar,
const unsigned int  version 
)
private

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 46 of file PPSTimingCalibrationLUT.h.

◆ cond::serialization::access

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 46 of file PPSTimingCalibrationLUT.h.

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const PPSTimingCalibrationLUT data 
)
friend

Definition at line 42 of file PPSTimingCalibrationLUT.cc.

42  {
43  os << "\nSECTOR STATION PLANE CHANNEL SAMPLES \n";
44  for (const auto& kv : data.binMap_) {
45  os << kv.first << "\n[";
46  for (size_t i = 0; i < kv.second.size(); ++i)
47  os << (i > 0 ? ", " : "") << kv.second.at(i);
48  os << " ]\n";
49  }
50  return os;
51 }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79

Member Data Documentation

◆ binMap_

BinMap PPSTimingCalibrationLUT::binMap_
private

Definition at line 44 of file PPSTimingCalibrationLUT.h.

Referenced by bins().