File indexing completed on 2024-04-06 12:20:29
0001 #ifndef GLOBALPARAMSHELPER_H__
0002 #define GLOBALPARAMSHELPER_H__
0003
0004 #include <cassert>
0005 #include "CondFormats/L1TObjects/interface/L1TGlobalParameters.h"
0006 #include "CondFormats/DataRecord/interface/L1TGlobalParametersRcd.h"
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031 namespace l1t {
0032
0033 class GlobalParamsHelper {
0034 public:
0035 enum { VERSION = 1 };
0036
0037 ~GlobalParamsHelper();
0038
0039
0040 GlobalParamsHelper(L1TGlobalParameters* w);
0041
0042 static const GlobalParamsHelper* readFromEventSetup(const L1TGlobalParameters* es);
0043
0044 static GlobalParamsHelper* readAndWriteFromEventSetup(const L1TGlobalParameters* es);
0045
0046
0047
0048
0049
0050 inline int totalBxInEvent() const { return read_->m_totalBxInEvent; }
0051
0052 void setTotalBxInEvent(const int&);
0053
0054
0055 inline unsigned int numberPhysTriggers() const { return read_->m_numberPhysTriggers; }
0056
0057 void setNumberPhysTriggers(const unsigned int&);
0058
0059
0060 inline unsigned int numberL1Mu() const { return read_->m_numberL1Mu; }
0061
0062 void setNumberL1Mu(const unsigned int&);
0063
0064
0065 inline unsigned int numberL1EG() const { return read_->m_numberL1EG; }
0066
0067 void setNumberL1EG(const unsigned int&);
0068
0069
0070 inline unsigned int numberL1Jet() const { return read_->m_numberL1Jet; }
0071
0072 void setNumberL1Jet(const unsigned int&);
0073
0074
0075 inline unsigned int numberL1Tau() const { return read_->m_numberL1Tau; }
0076
0077 void setNumberL1Tau(const unsigned int&);
0078
0079
0080 inline unsigned int numberChips() const { return read_->m_numberChips; }
0081
0082 void setNumberChips(const unsigned int&);
0083
0084
0085 inline unsigned int pinsOnChip() const { return read_->m_pinsOnChip; }
0086
0087 void setPinsOnChip(const unsigned int&);
0088
0089
0090
0091 inline const std::vector<int>& orderOfChip() const { return read_->m_orderOfChip; }
0092
0093 void setOrderOfChip(const std::vector<int>&);
0094
0095
0096 void print(std::ostream&) const;
0097
0098
0099 const L1TGlobalParameters* getReadInstance() const { return read_; }
0100 L1TGlobalParameters* getWriteInstance() { return write_; }
0101
0102 private:
0103 GlobalParamsHelper(const L1TGlobalParameters* es);
0104 void useCopy();
0105 void check_write() { assert(write_); }
0106
0107 const L1TGlobalParameters* read_;
0108 L1TGlobalParameters* write_;
0109 bool we_own_write_;
0110 };
0111
0112 }
0113 #endif