|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef _ZDCINJPULSERAMPMAP_H
6 #define _ZDCINJPULSERAMPMAP_H
9 #include <nlohmann/json.hpp>
58 using RunRangeDescr = std::tuple<unsigned int, unsigned int, std::string, float>;
91 throw std::runtime_error(
"Invalid Injected Pulser configuration");
94 throw std::runtime_error(
"Invalid Injected Pulser configuration");
100 unsigned int firstLB = stepsConfig.first;
103 return std::make_pair(firstLB,
steps);
125 return result.second.size();
135 return std::floor(
float(
lumiBlock - firstLB)/map.size());
147 unsigned int vecIndex = (
lumiBlock - firstLB) % map.size();
std::vector< float > StepsVector
bool parseJsonFile(std::ifstream &ifs)
int getCycleNumber(const Token &token, unsigned int lumiBlock) const
std::tuple< unsigned int, unsigned int, std::string, float > RunRangeDescr
const std::string & getFilePath() const
unsigned int getNumSteps(const Token &token) const
std::pair< unsigned int, StepsVector > getContext(const Token &token) const
Token lookupRun(unsigned int runNumber, bool allowDefault=false)
std::vector< const StepsDescr * > m_activeConfigs
void fillVVector(StepsVector &stepVec, const nlohmann::json &entry)
This class provides a token that identifies in a unique way objects on the persistent storage.
void readPulserSteps(StepsDescr &steps, const json &stepsJson)
std::vector< RunRangeDescr > m_runRangeDescrs
float scaleFactor() const
Token(int index, float scaleFactor)
Class mimicking the AthMessaging class from the offline software.
unsigned int getFirstLumiBlock(const Token &token) const
float getPulserAmplitude(const Token &token, unsigned int lumiBlock) const
static const ZdcInjPulserAmpMap * getInstance()
std::map< std::string, StepsDescr > m_stepsConfigs
std::pair< unsigned int, StepsVector > StepsDescr