ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
VP1Trig::VP1TriggerTool Class Reference

#include <VP1TriggerTool.h>

Inheritance diagram for VP1Trig::VP1TriggerTool:
Collaboration diagram for VP1Trig::VP1TriggerTool:

Public Member Functions

 VP1TriggerTool ()
 
virtual ~VP1TriggerTool ()
 
VP1TriggerTooloperator= (const VP1TriggerTool &)=delete
 
 VP1TriggerTool (const VP1TriggerTool &)=delete
 
void process (StoreGateSvc *storeGate)
 
void clear ()
 
bool isReady ()
 
void setTrigLvlToProcess (QString triglvl)
 
QString getTrigLvlToProcess ()
 
void setDataContainerFormat (char ctnid)
 
char getDataContainerFormat ()
 
int getMuonCount ()
 
QList< QTreeWidgetItem * > getTriggerData_QTree (QString)
 
void log_info (const QString &msg)
 
void log_warning (const QString &msg)
 
void log_verbose (const QString &msg)
 
void log_error (const QString &msg)
 
void log_fatal (const QString &msg)
 
void log_debug (const QString &msg)
 
std::string prefix (std::string str)
 
QString qstr (char c)
 
QString qstr (std::string str)
 

Static Public Member Functions

static const QString pfx1 ()
 
static const QString pfx2 ()
 
static const QString pfx3 ()
 

Private Attributes

VP1TriggerProcessorm_triggerprocessor
 
bool m_status
 
std::string m_name
 
int m_lvl
 

Detailed Description

Definition at line 37 of file VP1TriggerTool.h.

Constructor & Destructor Documentation

◆ VP1TriggerTool() [1/2]

VP1Trig::VP1TriggerTool::VP1TriggerTool ( )

Definition at line 28 of file VP1TriggerTool.cxx.

29  : Logger("VP1TriggerTool"),
30  m_status(false)
31 {
32  //Initialize VP1TriggerProcessor
33  log_info("Initializing VP1Trig::VP1TriggerProcessor");
36 }

◆ ~VP1TriggerTool()

VP1Trig::VP1TriggerTool::~VP1TriggerTool ( )
virtual

Definition at line 41 of file VP1TriggerTool.cxx.

42 {
43  log_verbose("destructor");
44  delete m_triggerprocessor;
45 }

◆ VP1TriggerTool() [2/2]

VP1Trig::VP1TriggerTool::VP1TriggerTool ( const VP1TriggerTool )
delete

Member Function Documentation

◆ clear()

void VP1Trig::VP1TriggerTool::clear ( )

Definition at line 70 of file VP1TriggerTool.cxx.

71 {
72  log_verbose("Clear system-wide allocated memory");
73  m_status=false;
75 }

◆ getDataContainerFormat()

char VP1Trig::VP1TriggerTool::getDataContainerFormat ( )

Definition at line 130 of file VP1TriggerTool.cxx.

131 {
132  log_verbose("Requesting preset data format from VP1Trig::VP1TriggerProcessor");
134 }

◆ getMuonCount()

int VP1Trig::VP1TriggerTool::getMuonCount ( )

Definition at line 139 of file VP1TriggerTool.cxx.

140 {
141  log_verbose("Requesting number of muons from VP1Trig::VP1TriggerProcessor");
143 }

◆ getTriggerData_QTree()

QList< QTreeWidgetItem * > VP1Trig::VP1TriggerTool::getTriggerData_QTree ( QString  triglvl)

Definition at line 148 of file VP1TriggerTool.cxx.

149 {
150  log_verbose("Requesting data in QTree format from VP1Trig::VP1TriggerProcessor");
151  return m_triggerprocessor->getQTrigData(triglvl);
152 }

◆ getTrigLvlToProcess()

QString VP1Trig::VP1TriggerTool::getTrigLvlToProcess ( )

Definition at line 108 of file VP1TriggerTool.cxx.

109 {
110  log_verbose("Requesting preset trigger level flag from VP1Trig::VP1TriggerProcessor");
111  return m_triggerprocessor->getTrigLvl();
112 }

◆ isReady()

bool VP1Trig::VP1TriggerTool::isReady ( )

Definition at line 85 of file VP1TriggerTool.cxx.

86 {
87  log_verbose("Requesting DAQ status from VP1Trig::VP1TriggerProcessor");
89  return true;
90  return false;
91 }

◆ log_debug()

void VP1Trig::Logger::log_debug ( const QString &  msg)
inherited

Definition at line 54 of file graphics/VP1/VP1Systems/VP1TriggerSystems/src/Logger.cxx.

54  {
55  std::cout<<prefix(m_name)<<"DEBUG "<<msg.toStdString()<<std::endl;
56 }

◆ log_error()

void VP1Trig::Logger::log_error ( const QString &  msg)
inherited

Definition at line 46 of file graphics/VP1/VP1Systems/VP1TriggerSystems/src/Logger.cxx.

46  {
47  std::cout<<prefix(m_name)<<"ERROR "<<msg.toStdString()<<std::endl;
48 }

◆ log_fatal()

void VP1Trig::Logger::log_fatal ( const QString &  msg)
inherited

Definition at line 49 of file graphics/VP1/VP1Systems/VP1TriggerSystems/src/Logger.cxx.

49  {
50  std::cout<<prefix(m_name)<<"FATAL "<<msg.toStdString()<<std::endl;
51 }

◆ log_info()

void VP1Trig::Logger::log_info ( const QString &  msg)
inherited

Definition at line 32 of file graphics/VP1/VP1Systems/VP1TriggerSystems/src/Logger.cxx.

32  {
33  if(m_lvl>=1)
34  std::cout<<prefix(m_name)<<"INFO "<<msg.toStdString()<<std::endl;
35 }

◆ log_verbose()

void VP1Trig::Logger::log_verbose ( const QString &  msg)
inherited

Definition at line 40 of file graphics/VP1/VP1Systems/VP1TriggerSystems/src/Logger.cxx.

40  {
41  if(m_lvl>=3)
42  std::cout<<prefix(m_name)<<"VERBOSE "<<msg.toStdString()<<std::endl;
43 }

◆ log_warning()

void VP1Trig::Logger::log_warning ( const QString &  msg)
inherited

Definition at line 36 of file graphics/VP1/VP1Systems/VP1TriggerSystems/src/Logger.cxx.

36  {
37  if(m_lvl>=2)
38  std::cout<<prefix(m_name)<<"WARNING "<<msg.toStdString()<<std::endl;
39 }

◆ operator=()

VP1TriggerTool& VP1Trig::VP1TriggerTool::operator= ( const VP1TriggerTool )
delete

◆ pfx1()

static const QString VP1Trig::Logger::pfx1 ( )
inlinestaticinherited

◆ pfx2()

static const QString VP1Trig::Logger::pfx2 ( )
inlinestaticinherited

◆ pfx3()

static const QString VP1Trig::Logger::pfx3 ( )
inlinestaticinherited

◆ prefix()

std::string VP1Trig::Logger::prefix ( std::string  str)
inherited

Definition at line 61 of file graphics/VP1/VP1Systems/VP1TriggerSystems/src/Logger.cxx.

62 {
63  //15 character prefix standard
64  if(int(str.size())>15) {
65  str=str.substr(0,15);
66  str=str+std::string("... ");
67  return str;
68  }
69  else if(int(str.size())==15) {
70  str=str+std::string(" ");
71  return str;
72  }
73  int q=21-int(str.size());
74  for(int i=0;i<q;++i)
75  str=str+std::string(" ");
76  return str;
77 }

◆ process()

void VP1Trig::VP1TriggerTool::process ( StoreGateSvc storeGate)

Definition at line 50 of file VP1TriggerTool.cxx.

51 {
52  if(m_status)
53  clear();
54 
55  log_info("Load trigger data from StoreGate");
58  m_status=true;
59  log_info("Successfully retrieved the VP1TriggerTool!");
60  }
61  else {
62  m_status=false;
63  log_error("VP1Trig::VP1TriggerProcessor not initialized!");
64  }
65 }

◆ qstr() [1/2]

QString VP1Trig::Logger::qstr ( char  c)
inherited

Definition at line 82 of file graphics/VP1/VP1Systems/VP1TriggerSystems/src/Logger.cxx.

83 {
84  std::stringstream ss; ss<<c;
85  std::string cStr=ss.str();
86  ss.str(std::string()); ss.clear();
87  return QString::fromStdString(cStr);
88 }

◆ qstr() [2/2]

QString VP1Trig::Logger::qstr ( std::string  str)
inherited

Definition at line 93 of file graphics/VP1/VP1Systems/VP1TriggerSystems/src/Logger.cxx.

94 {
95  return QString::fromStdString(str);
96 }

◆ setDataContainerFormat()

void VP1Trig::VP1TriggerTool::setDataContainerFormat ( char  ctnid)

Definition at line 120 of file VP1TriggerTool.cxx.

121 {
122  //Container IDs: [v]ector, [q]tree, [a]ll available
123  log_verbose("Presetting data format in VP1Trig::VP1TriggerProcessor");
125 }

◆ setTrigLvlToProcess()

void VP1Trig::VP1TriggerTool::setTrigLvlToProcess ( QString  triglvl)

Definition at line 99 of file VP1TriggerTool.cxx.

100 {
101  log_verbose("Presetting trigger level flag in VP1Trig::VP1TriggerProcessor");
102  m_triggerprocessor->setTrigLvl(triglvl);
103 }

Member Data Documentation

◆ m_lvl

int VP1Trig::Logger::m_lvl
privateinherited

◆ m_name

std::string VP1Trig::Logger::m_name
privateinherited

◆ m_status

bool VP1Trig::VP1TriggerTool::m_status
private

Definition at line 73 of file VP1TriggerTool.h.

◆ m_triggerprocessor

VP1TriggerProcessor* VP1Trig::VP1TriggerTool::m_triggerprocessor
private

Definition at line 72 of file VP1TriggerTool.h.


The documentation for this class was generated from the following files:
VP1Trig::Logger::m_name
std::string m_name
Definition: graphics/VP1/VP1Systems/VP1TriggerSystems/VP1TriggerSystems/Logger.h:70
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
VP1Trig::VP1TriggerProcessor::loadData
void loadData(StoreGateSvc *m_storeGate)
Definition: VP1TriggerProcessor.cxx:68
VP1Trig::VP1TriggerProcessor::initialize
void initialize()
Definition: VP1TriggerProcessor.cxx:58
VP1Trig::VP1TriggerProcessor::getDaqStatus
bool getDaqStatus()
Definition: VP1TriggerProcessor.cxx:329
VP1Trig::VP1TriggerProcessor::clearSystem
void clearSystem()
Definition: VP1TriggerProcessor.cxx:299
VP1Trig::Logger::log_verbose
void log_verbose(const QString &msg)
Definition: graphics/VP1/VP1Systems/VP1TriggerSystems/src/Logger.cxx:40
VP1Trig::VP1TriggerProcessor::getInitStatus
bool getInitStatus()
Definition: VP1TriggerProcessor.cxx:320
VP1Trig::VP1TriggerProcessor::setTrigLvl
void setTrigLvl(QString triglvl)
Definition: VP1TriggerProcessor.cxx:409
VP1Trig::Logger::m_lvl
int m_lvl
Definition: graphics/VP1/VP1Systems/VP1TriggerSystems/VP1TriggerSystems/Logger.h:71
VP1Trig::VP1TriggerProcessor::getDataFormat
char getDataFormat()
Definition: VP1TriggerProcessor.cxx:338
lumiFormat.i
int i
Definition: lumiFormat.py:85
VP1Trig::VP1TriggerTool::m_status
bool m_status
Definition: VP1TriggerTool.h:73
VP1Trig::Logger::log_error
void log_error(const QString &msg)
Definition: graphics/VP1/VP1Systems/VP1TriggerSystems/src/Logger.cxx:46
VP1Trig::VP1TriggerProcessor::setDataFormat
void setDataFormat(char ctnid)
Definition: VP1TriggerProcessor.cxx:422
VP1Trig::VP1TriggerProcessor::getQTrigData
QList< QTreeWidgetItem * > getQTrigData(QString)
Definition: VP1TriggerProcessor.cxx:365
VP1Trig::VP1TriggerTool::m_triggerprocessor
VP1TriggerProcessor * m_triggerprocessor
Definition: VP1TriggerTool.h:72
VP1Trig::VP1TriggerProcessor
Definition: VP1TriggerProcessor.h:40
VP1Trig::Logger::log_info
void log_info(const QString &msg)
Definition: graphics/VP1/VP1Systems/VP1TriggerSystems/src/Logger.cxx:32
VP1Trig::Logger::prefix
std::string prefix(std::string str)
Definition: graphics/VP1/VP1Systems/VP1TriggerSystems/src/Logger.cxx:61
python.CaloScaleNoiseConfig.str
str
Definition: CaloScaleNoiseConfig.py:78
extractSporadic.q
list q
Definition: extractSporadic.py:98
str
Definition: BTagTrackIpAccessor.cxx:11
VP1Trig::Logger::Logger
Logger()
Definition: graphics/VP1/VP1Systems/VP1TriggerSystems/src/Logger.cxx:19
python.compressB64.c
def c
Definition: compressB64.py:93
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
VP1Trig::VP1TriggerProcessor::getTrigLvl
QString getTrigLvl()
Definition: VP1TriggerProcessor.cxx:347
VP1Trig::VP1TriggerProcessor::getMuonsInEvt
int getMuonsInEvt()
Definition: VP1TriggerProcessor.cxx:356
python.PyKernel.storeGate
storeGate
Definition: PyKernel.py:40
VP1Trig::VP1TriggerTool::clear
void clear()
Definition: VP1TriggerTool.cxx:70