ATLAS Offline Software
Loading...
Searching...
No Matches
Defs.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4#include <MuonCondData/Defs.h>
5
6namespace MuonCond {
7
8DcsFsmState getFsmStateEnum(const std::string& fsmState){
9 if(fsmState=="UNKNOWN" ) return DcsFsmState::UNKNOWN;
10 if(fsmState=="ON" ) return DcsFsmState::ON;
11 if(fsmState=="OFF" ) return DcsFsmState::OFF;
12 if(fsmState=="STANDBY" ) return DcsFsmState::STANDBY;
13 if(fsmState=="DEAD" ) return DcsFsmState::DEAD;
14 if(fsmState=="UNPLUGGED") return DcsFsmState::UNPLUGGED;
15 if(fsmState=="RAMP_UP" ) return DcsFsmState::RAMP_UP;
16 if(fsmState=="RAMP_DOWN") return DcsFsmState::RAMP_DOWN;
17 if(fsmState=="TRIP" ) return DcsFsmState::TRIP;
18 if(fsmState=="RECOVERY" ) return DcsFsmState::RECOVERY;
19 if(fsmState=="LOCKED" ) return DcsFsmState::LOCKED;
20 return DcsFsmState::NONE;
21}
22std::string getFsmStateStrg(DcsFsmState fsmState) {
23 switch (fsmState) {
25 return "UNKNOWN";
26 case DcsFsmState::ON:
27 return "ON";
29 return "OFF";
31 return "STANDBY";
33 return "DEAD";
35 return "UNPLUGGED";
37 return "RAMP_UP";
39 return "RAMP_DOWN";
41 return "TRIP";
43 return "RECOVERY" ;
45 return "LOCKED";
47 return "NONE";
48 }
49 return "NONE";
50}
51
52std::ostream& operator<<(std::ostream& ostr, const MuonCond::DcsConstants& dcs) {
53 ostr<<"DCS (STATE/standby/ready): "<<MuonCond::getFsmStateStrg(dcs.fsmState);
54 ostr<<"/"<<dcs.standbyVolt;
55 ostr<<"/"<<dcs.readyVolt;
56 return ostr;
57}
58}
std::string getFsmStateStrg(DcsFsmState fsmState)
Definition Defs.cxx:22
DcsFsmState getFsmStateEnum(const std::string &fsmState)
Definition Defs.cxx:8
std::ostream & operator<<(std::ostream &ostr, const DcsConstants &dcs)
Definition Defs.cxx:52
Helper struct to cache all dcs constants in a common place of the memory.