Public Types | Public Member Functions | Private Attributes | List of all members
nl::timing::SpillMessage Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-09-23/Commissioning/Nearline/TimingPlots/SpillMessage.h"

Inheritance diagram for nl::timing::SpillMessage:
nl::timing::LogMessage

Public Types

enum  SpillType {
  kNuMI, kBNB, kNuMItclk, kBNBtclk,
  kAccelOneHztclk, kFake, kTestConnection, kNSpillType,
  kSuperCycle, kNuMISampleTrig, kNuMIReset
}
 
enum  MessageType { kSpillSent, kTimeDrift, kUnknown }
 

Public Member Functions

 SpillMessage (std::string path, MessageType type=MessageType::kSpillSent)
 
 SpillMessage (nl::timing::LogMessage logMsg)
 
 ~SpillMessage ()
 
SpillType GetSpillType ()
 
MessageType Type ()
 
std::string Text ()
 

Private Attributes

SpillType _spillType
 
uint64_t _novaTime
 
struct timespec _unixTime
 

Detailed Description

Definition at line 12 of file SpillMessage.h.

Member Enumeration Documentation

Enumerator
kSpillSent 
kTimeDrift 
kUnknown 

Definition at line 22 of file LogMessage.h.

Enumerator
kNuMI 
kBNB 
kNuMItclk 
kBNBtclk 
kAccelOneHztclk 
kFake 
kTestConnection 
kNSpillType 
kSuperCycle 
kNuMISampleTrig 
kNuMIReset 

Definition at line 15 of file SpillMessage.h.

15  {
16  kNuMI, //MIBS $74 proton extraction into NuMI
17  kBNB, //$1B paratisitic beam inhibit
18  kNuMItclk, //tevatron clock, either $A9 or $AD depending on xml parameter
19  kBNBtclk, //booster extraction, $1F (possibly sequence with $1D depending on configuration
20  kAccelOneHztclk, //$8F 1 Hz clock
21  kFake, //assigned if there is a parity error
24  kSuperCycle, //$00, Super cycle and master clock reset
25  kNuMISampleTrig, //$A4,NuMI cycle sample trigger, reference for $A5
26  kNuMIReset //$A5, NuMI reset for beam
27  };

Constructor & Destructor Documentation

nl::timing::SpillMessage::SpillMessage ( std::string  path,
MessageType  type = MessageType::kSpillSent 
)

Definition at line 11 of file SpillMessage.cxx.

11  : LogMessage(rawtext, type)
12  {
13  // TODO: regex spill typess
14  }
LogMessage(std::string rawtext, MessageType type=MessageType::kUnknown)
Definition: LogMessage.cxx:18
nl::timing::SpillMessage::SpillMessage ( nl::timing::LogMessage  logMsg)

Definition at line 17 of file SpillMessage.cxx.

References _spillType, ana::kFake, submit_cafana::regex, and nl::timing::LogMessage::Text().

17  : LogMessage(logMsg.Text(), logMsg.Type())
18  {
19  // Get spill type
20 
21  std::regex spillTypeNuMI("NuMI\\(0\\)");
22  std::regex spillTypeBNB("BNB\\(1\\)");
23  std::regex spillTypeNuMItclk("NuMItclk\\(2\\)");
24  std::regex spillTypeBNBtclk("BNBtclk\\(3\\)");
25  std::regex spillTypeAccelOneHztclk("AccelOneHztclk\\(4\\)");
26  std::regex spillTypeFake("Fake\\(5\\)");
27  std::regex spillTypeTest("TestConnection\\(6\\)");
28  std::regex spillTypeSpillType("NSpillType\\(7\\)");
29  std::regex spillTypeSuperCycle("SuperCycle\\(8\\)");
30  std::regex spillTypeNuMISampleTrig("NuMISampleTrig\\(9\\)");
31  std::regex spillTypeNuMIReset("NuMIReset\\(10\\)");
32 
33  if (std::regex_search(logMsg.Text(), spillTypeNuMI)) this->_spillType = nl::timing::SpillMessage::SpillType::kNuMI;
34  if (std::regex_search(logMsg.Text(), spillTypeNuMItclk)) this->_spillType = nl::timing::SpillMessage::SpillType::kNuMItclk;
35  if (std::regex_search(logMsg.Text(), spillTypeBNB)) this->_spillType = nl::timing::SpillMessage::SpillType::kBNB;
36  if (std::regex_search(logMsg.Text(), spillTypeBNBtclk)) this->_spillType = nl::timing::SpillMessage::SpillType::kBNBtclk;
37  if (std::regex_search(logMsg.Text(), spillTypeAccelOneHztclk)) this->_spillType = nl::timing::SpillMessage::SpillType::kAccelOneHztclk;
38  if (std::regex_search(logMsg.Text(), spillTypeFake)) this->_spillType = nl::timing::SpillMessage::SpillType::kFake;
39  if (std::regex_search(logMsg.Text(), spillTypeTest)) this->_spillType = nl::timing::SpillMessage::SpillType::kTestConnection;
40  if (std::regex_search(logMsg.Text(), spillTypeSuperCycle)) this->_spillType = nl::timing::SpillMessage::SpillType::kSuperCycle;
41  if (std::regex_search(logMsg.Text(), spillTypeNuMISampleTrig)) this->_spillType = nl::timing::SpillMessage::SpillType::kNuMISampleTrig;
42  if (std::regex_search(logMsg.Text(), spillTypeNuMIReset)) this->_spillType = nl::timing::SpillMessage::SpillType::kNuMIReset;
43 
44 
45 
46  }
MessageType Type()
Definition: LogMessage.h:31
std::string Text()
Definition: LogMessage.h:32
LogMessage(std::string rawtext, MessageType type=MessageType::kUnknown)
Definition: LogMessage.cxx:18
nl::timing::SpillMessage::~SpillMessage ( )

Definition at line 49 of file SpillMessage.cxx.

49 {}

Member Function Documentation

SpillType nl::timing::SpillMessage::GetSpillType ( )
inline

Definition at line 33 of file SpillMessage.h.

References _spillType.

33 { return _spillType; }
std::string nl::timing::LogMessage::Text ( )
inlineinherited

Definition at line 32 of file LogMessage.h.

References nl::timing::LogMessage::_raw.

Referenced by SpillMessage().

32 { return _raw; };
MessageType nl::timing::LogMessage::Type ( )
inlineinherited

Definition at line 31 of file LogMessage.h.

References nl::timing::LogMessage::_type.

31 { return _type; };

Member Data Documentation

uint64_t nl::timing::SpillMessage::_novaTime
private

Definition at line 37 of file SpillMessage.h.

SpillType nl::timing::SpillMessage::_spillType
private

Definition at line 36 of file SpillMessage.h.

Referenced by GetSpillType(), and SpillMessage().

struct timespec nl::timing::SpillMessage::_unixTime
private

Definition at line 38 of file SpillMessage.h.


The documentation for this class was generated from the following files: