5#ifndef TRIGSERVICES_TRIGCOOLUPDATEHELPER_H
6#define TRIGSERVICES_TRIGCOOLUPDATEHELPER_H
19#include "GaudiKernel/ServiceHandle.h"
20#include "GaudiKernel/StatusCode.h"
26#include "GaudiKernel/EventIDBase.h"
30#include "CTPfragment/CTPExtraWordsFormat.h"
63 virtual StatusCode
start()
override;
64 virtual StatusCode
stop()
override;
83 StatusCode
getFolderName(CTPfragment::FolderIndex idx, std::string& folderName)
const;
106 StatusCode
resetFolders(
const std::vector<std::string>& folders);
123 ToolHandle<GenericMonitoringTool>
m_monTool{
this,
"MonTool", {},
"Monitoring tool"};
126 this,
"CoolFolderMap", {},
"Name of COOL folder containing folder map"};
129 this,
"Folders", {},
"List of folders that can be updated during the run"};
132 this,
"CtpRobId", 0x770001,
"ROB ID of CTP fragment containing the extra payload"};
uint32_t CLID
The Class ID type.
Abstract interface to IOVDbSvc to access IOVRange and tag information.
Header file to be included by clients of the Monitored infrastructure.
TrigCOOLUpdateHelper(const std::string &type, const std::string &name, const IInterface *parent)
virtual StatusCode start() override
Gaudi::Property< std::vector< std::string > > m_folders
std::map< std::string, FolderInfo > m_folderInfo
CLID/name mapping of COOL folders.
virtual StatusCode stop() override
std::map< CTPfragment::FolderIndex, std::string > m_folderNames
Map to store the folder update index -> name mapping.
std::map< CTPfragment::FolderIndex, FolderUpdate > m_folderUpdates
Map to store scheduled/done COOL folder updates.
StatusCode resetFolder(const std::string &folder)
Reset COOL folder.
StatusCode hltCoolUpdate(const EventContext &ctx)
Perform COOL udpates if needed.
SmartIF< IIOVDbSvc > m_iovDbSvc
ToolHandle< GenericMonitoringTool > m_monTool
StatusCode readFolderInfo()
Read information about existing COOL folders.
StatusCode resetFolders(const std::vector< std::string > &folders)
Reset list of COOL folders.
Gaudi::Property< std::string > m_coolFolderName
virtual StatusCode initialize() override
Gaudi::Property< uint32_t > m_ctpRobId
StatusCode extractFolderUpdates(const EventContext &ctx)
Decode COOL folder updates according to extra payload in CTP fragment.
StatusCode getFolderName(CTPfragment::FolderIndex idx, std::string &folderName) const
Return folder name to index.
SmartIF< IIOVSvc > m_iovSvc
ServiceHandle< IROBDataProviderSvc > m_robDataProviderSvc
Struct to hold CLID <-> folder name mapping.
FolderUpdate(const CTPfragment::FolderEntry &entry)
EventIDBase::number_type lumiBlock
CTPfragment::FolderIndex folderIndex